Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".


13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [...]

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,21 @@ 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))
.timeout(Duration.ofSeconds(30))
.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();
Expand Down Expand Up @@ -209,9 +210,6 @@ static Map<String, String> fetchUpstreamSources(Set<Class<?>> localClasses) {
LOGGER.info("Fetching upstream sources for " + localClasses.size() + " classes");

final var results = new LinkedHashMap<String, String>();
final var httpClient = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();

for (final var clazz : localClasses) {
final var className = clazz.getName();
Expand All @@ -236,7 +234,7 @@ static Map<String, String> fetchUpstreamSources(Set<Class<?>> 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();
Expand Down