Skip to content

Commit d243dee

Browse files
authored
small fixes (#75)
1 parent 7d29d12 commit d243dee

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ assignees: ''
77

88
---
99

10+
(Optional) When submitting a bug report, please consider using an AI assistant to help create a minimal test case that demonstrates the issue. Then **before** submission, run your bug description through a strong model with a prompt such as:
11+
12+
> "Please review the AGENTS.md and README.md along with this bug report and check that it includes: a clear description of the problem, steps to reproduce, expected vs actual behavior, and a minimal test case that demonstrates the bug."
13+
14+
(Optional) Please then attach both the prompt and the model's review to the bottom of this template under "Augmented Intelligence Review".
15+
1016
**Describe the bug**
1117
A clear and concise description of what the bug is.
1218

@@ -36,3 +42,10 @@ If applicable, add screenshots to help explain your problem.
3642

3743
**Additional context**
3844
Add any other context about the problem here.
45+
46+
**Checklist**
47+
- [ ] Bug description is clear and concise
48+
- [ ] Steps to reproduce are provided
49+
- [ ] Expected vs actual behavior is described
50+
- [ ] (Optional) Created minimal test case demonstrating the bug
51+
- [ ] (Optional) Attached LLM strong model review and suggestions

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@ assignees: ''
77

88
---
99

10+
(Optional) When submitting this issue, please consider using an AI assistant to help analyze and articulate the problem. Then **before** submission, run your issue description through a strong model with a prompt such as:
11+
12+
> "Please review the AGENTS.md and README.md along with this issue description and check that it: clearly explains the problem or request, provides sufficient context, includes relevant details, and aligns with project standards."
13+
14+
(Optional) Please then attach both the prompt and the model's review to the bottom of this template under "Augmented Intelligence Review".
15+
1016

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ assignees: ''
77

88
---
99

10+
(Optional) When submitting a feature request, please consider using an AI assistant to validate your implementation approach. Then **before** submission, run your feature description through a strong model with a prompt such as:
11+
12+
> "Please review the AGENTS.md and README.md along with this feature request and check that it: aligns with project goals, doesn't duplicate existing functionality, includes concrete use cases, and suggests a reasonable implementation approach."
13+
14+
(Optional) Please then attach both the prompt and the model's review to the bottom of this template under "Augmented Intelligence Review".
15+
1016
**Is your feature request related to a problem? Please describe.**
1117
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1218

@@ -18,3 +24,10 @@ A clear and concise description of any alternative solutions or features you've
1824

1925
**Additional context**
2026
Add any other context or screenshots about the feature request here.
27+
28+
**Checklist**
29+
- [ ] Problem description is clear and concise
30+
- [ ] Proposed solution is well-defined
31+
- [ ] Alternatives have been considered
32+
- [ ] (Optional) Validated implementation approach with AI assistant
33+
- [ ] (Optional) Attached LLM strong model review and suggestions

json-java21-api-tracker/src/main/java/io/github/simbo1905/tracker/ApiTracker.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,21 @@ enum Nothing implements ApiTracker {}
6464
// GitHub base URL for upstream sources
6565
String GITHUB_BASE_URL = "https://raw.githubusercontent.com/openjdk/jdk-sandbox/refs/heads/json/src/java.base/share/classes/";
6666

67+
// Shared HttpClient instance for efficient resource management
68+
HttpClient SHARED_HTTP_CLIENT = HttpClient.newBuilder()
69+
.connectTimeout(Duration.ofSeconds(10))
70+
.build();
71+
6772
/// Fetches content from a URL
6873
static String fetchFromUrl(String url) {
69-
final var httpClient = HttpClient.newBuilder()
70-
.connectTimeout(Duration.ofSeconds(10))
71-
.build();
72-
7374
try {
7475
final var request = HttpRequest.newBuilder()
7576
.uri(URI.create(url))
7677
.timeout(Duration.ofSeconds(30))
7778
.GET()
7879
.build();
7980

80-
final var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
81+
final var response = SHARED_HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString());
8182

8283
if (response.statusCode() == 200) {
8384
return response.body();
@@ -209,9 +210,6 @@ static Map<String, String> fetchUpstreamSources(Set<Class<?>> localClasses) {
209210
LOGGER.info("Fetching upstream sources for " + localClasses.size() + " classes");
210211

211212
final var results = new LinkedHashMap<String, String>();
212-
final var httpClient = HttpClient.newBuilder()
213-
.connectTimeout(Duration.ofSeconds(10))
214-
.build();
215213

216214
for (final var clazz : localClasses) {
217215
final var className = clazz.getName();
@@ -236,7 +234,7 @@ static Map<String, String> fetchUpstreamSources(Set<Class<?>> localClasses) {
236234
.GET()
237235
.build();
238236

239-
final var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
237+
final var response = SHARED_HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString());
240238

241239
if (response.statusCode() == 200) {
242240
final var body = response.body();

0 commit comments

Comments
 (0)