diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea7..42a59a9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,12 @@ assignees: '' --- +(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: + +> "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." + +(Optional) Please then attach both the prompt and the model's review to the bottom of this template under "Augmented Intelligence Review". + **Describe the bug** A clear and concise description of what the bug is. @@ -36,3 +42,10 @@ If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. + +**Checklist** +- [ ] Bug description is clear and concise +- [ ] Steps to reproduce are provided +- [ ] Expected vs actual behavior is described +- [ ] (Optional) Created minimal test case demonstrating the bug +- [ ] (Optional) Attached LLM strong model review and suggestions diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md index 48d5f81..dde2411 100644 --- a/.github/ISSUE_TEMPLATE/custom.md +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -7,4 +7,10 @@ assignees: '' --- +(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: + +> "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." + +(Optional) Please then attach both the prompt and the model's review to the bottom of this template under "Augmented Intelligence Review". + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..4c321d2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,6 +7,12 @@ assignees: '' --- +(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: + +> "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." + +(Optional) Please then attach both the prompt and the model's review to the bottom of this template under "Augmented Intelligence Review". + **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] @@ -18,3 +24,10 @@ A clear and concise description of any alternative solutions or features you've **Additional context** Add any other context or screenshots about the feature request here. + +**Checklist** +- [ ] Problem description is clear and concise +- [ ] Proposed solution is well-defined +- [ ] Alternatives have been considered +- [ ] (Optional) Validated implementation approach with AI assistant +- [ ] (Optional) Attached LLM strong model review and suggestions diff --git a/json-java21-api-tracker/src/main/java/io/github/simbo1905/tracker/ApiTracker.java b/json-java21-api-tracker/src/main/java/io/github/simbo1905/tracker/ApiTracker.java index 2596c39..d7f5526 100644 --- a/json-java21-api-tracker/src/main/java/io/github/simbo1905/tracker/ApiTracker.java +++ b/json-java21-api-tracker/src/main/java/io/github/simbo1905/tracker/ApiTracker.java @@ -64,12 +64,13 @@ enum Nothing implements ApiTracker {} // GitHub base URL for upstream sources String GITHUB_BASE_URL = "https://raw.githubusercontent.com/openjdk/jdk-sandbox/refs/heads/json/src/java.base/share/classes/"; + // Shared HttpClient instance for efficient resource management + HttpClient SHARED_HTTP_CLIENT = HttpClient.newBuilder() + .connectTimeout(Duration.ofSeconds(10)) + .build(); + /// Fetches content from a URL static String fetchFromUrl(String url) { - final var httpClient = HttpClient.newBuilder() - .connectTimeout(Duration.ofSeconds(10)) - .build(); - try { final var request = HttpRequest.newBuilder() .uri(URI.create(url)) @@ -77,7 +78,7 @@ static String fetchFromUrl(String url) { .GET() .build(); - final var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); + final var response = SHARED_HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() == 200) { return response.body(); @@ -209,9 +210,6 @@ static Map fetchUpstreamSources(Set> localClasses) { LOGGER.info("Fetching upstream sources for " + localClasses.size() + " classes"); final var results = new LinkedHashMap(); - final var httpClient = HttpClient.newBuilder() - .connectTimeout(Duration.ofSeconds(10)) - .build(); for (final var clazz : localClasses) { final var className = clazz.getName(); @@ -236,7 +234,7 @@ static Map fetchUpstreamSources(Set> localClasses) { .GET() .build(); - final var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); + final var response = SHARED_HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() == 200) { final var body = response.body();