Skip to content

Commit 08df8f6

Browse files
committed
Update JaCoCo tool version to 0.8.13 and improve build.gradle configuration
- Updated JaCoCo tool version for enhanced test coverage reporting. - Fixed syntax for Maven repository URL. - Added exclusions in test configuration to avoid instrumenting JDK internals. - Updated HashMap instantiation in SerpApi.java for type safety.
1 parent ab95f10 commit 08df8f6

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
jacoco {
9-
toolVersion = "0.8.12"
9+
toolVersion = "0.8.13"
1010
}
1111

1212
jacocoTestReport {
@@ -33,7 +33,7 @@ java {
3333
repositories {
3434
mavenCentral()
3535

36-
maven { url "https://jitpack.io" }
36+
maven { url = "https://jitpack.io" }
3737
}
3838

3939
dependencies {
@@ -57,11 +57,16 @@ tasks.named('jar') {
5757
}
5858

5959
test {
60+
jacoco {
61+
// Avoid trying to instrument JDK internals on newest runtimes.
62+
excludes = ['java.*', 'jdk.*', 'sun.*']
63+
}
64+
6065
testLogging {
6166
events "passed", "skipped", "failed"
62-
exceptionFormat "short"
63-
showStackTraces true
64-
showStandardStreams true
67+
exceptionFormat = "short"
68+
showStackTraces = true
69+
showStandardStreams = true
6570
}
6671
}
6772

src/main/java/serpapi/SerpApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public SerpApi(Map<String, String> parameter) {
4646
* Constructor without arguments
4747
*/
4848
public SerpApi() {
49-
this.parameter = new HashMap();
49+
this.parameter = new HashMap<>();
5050
this.client = new SerpApiHttp("/search");
5151
this.client.setHttpConnectionTimeout(this.timeout);
5252
}
@@ -153,7 +153,7 @@ public String get(String path, String output, Map<String, String> parameter) thr
153153
this.client.path = path;
154154

155155
// create HTTP query
156-
Map<String, String> query = new HashMap();
156+
Map<String, String> query = new HashMap<>();
157157

158158
if (path.startsWith("/searches")) {
159159
// Only preserve API_KEY

0 commit comments

Comments
 (0)