Skip to content

Commit 4f88c59

Browse files
fix(deps): update errorproneversion to v2.38.0 (minor) (#13738)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lauri Tulmin <[email protected]>
1 parent 60629ce commit 4f88c59

File tree

5 files changed

+71
-103
lines changed

5 files changed

+71
-103
lines changed

conventions/src/main/kotlin/otel.errorprone-conventions.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ tasks {
6262
disable("UnnecessarilyFullyQualified")
6363

6464
// TODO (trask) use animal sniffer
65-
disable("Java7ApiChecker")
6665
disable("Java8ApiChecker")
6766
disable("AndroidJdkLibsChecker")
6867

@@ -124,8 +123,8 @@ tasks {
124123

125124
disable("NonFinalStaticField")
126125

127-
// We get this warning in modules that compile for old java versions
128-
disable("StringConcatToTextBlock")
126+
// Requires adding compile dependency to JSpecify
127+
disable("AddNullMarkedToPackageInfo")
129128

130129
if (testLatestDeps) {
131130
// Some latest dep tests are compiled for java 17 although the base version uses an older

dependencyManagement/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ val DEPENDENCY_BOMS = listOf(
3838

3939
val autoServiceVersion = "1.1.1"
4040
val autoValueVersion = "1.11.0"
41-
val errorProneVersion = "2.37.0"
41+
val errorProneVersion = "2.38.0"
4242
val byteBuddyVersion = "1.17.5"
4343
val asmVersion = "9.8"
4444
val jmhVersion = "1.37"

instrumentation-docs/src/test/java/io/opentelemetry/instrumentation/docs/parsers/GradleParserTest.java

Lines changed: 68 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ class GradleParserTest {
1616
@Test
1717
void testExtractMuzzleVersions_SinglePassBlock() {
1818
String gradleBuildFileContent =
19-
"muzzle {\n"
20-
+ " pass {\n"
21-
+ " group.set(\"org.elasticsearch.client\")\n"
22-
+ " module.set(\"rest\")\n"
23-
+ " versions.set(\"[5.0,6.4)\")\n"
24-
+ " }\n"
25-
+ "}";
19+
"""
20+
muzzle {
21+
pass {
22+
group.set("org.elasticsearch.client")
23+
module.set("rest")
24+
versions.set("[5.0,6.4)")
25+
}
26+
}""";
2627
DependencyInfo info =
2728
GradleParser.parseGradleFile(gradleBuildFileContent, InstrumentationType.JAVAAGENT);
2829
assertThat(info.versions().size()).isEqualTo(1);
@@ -33,7 +34,10 @@ void testExtractMuzzleVersions_SinglePassBlock() {
3334
@Test
3435
void testExtractLibraryVersion() {
3536
String gradleBuildFileContent =
36-
"dependencies {\n" + " library(\"org.apache.httpcomponents:httpclient:4.3\")\n" + "}";
37+
"""
38+
dependencies {
39+
library("org.apache.httpcomponents:httpclient:4.3")
40+
}""";
3741
DependencyInfo info =
3842
GradleParser.parseGradleFile(gradleBuildFileContent, InstrumentationType.LIBRARY);
3943
assertThat(info.versions().size()).isEqualTo(1);
@@ -44,11 +48,12 @@ void testExtractLibraryVersion() {
4448
@Test
4549
void testExtractLibraryUpperVersion() {
4650
String gradleBuildFileContent =
47-
"dependencies {\n"
48-
+ " library(\"org.apache.httpcomponents:httpclient:4.3\")\n"
49-
+ " testImplementation(project(\":instrumentation:apache-httpclient:apache-httpclient-4.3:testing\"))\n"
50-
+ " latestDepTestLibrary(\"org.apache.httpcomponents:httpclient:4.+\") // see apache-httpclient-5.0 module\n"
51-
+ "}";
51+
"""
52+
dependencies {
53+
library("org.apache.httpcomponents:httpclient:4.3")
54+
testImplementation(project(":instrumentation:apache-httpclient:apache-httpclient-4.3:testing"))
55+
latestDepTestLibrary("org.apache.httpcomponents:httpclient:4.+") // see apache-httpclient-5.0 module
56+
}""";
5257

5358
DependencyInfo info =
5459
GradleParser.parseGradleFile(gradleBuildFileContent, InstrumentationType.LIBRARY);
@@ -122,35 +127,37 @@ void testExtractMinimumJavaVersionIgnoredWithinIfCondition() {
122127
@Test
123128
void testExtractMuzzleVersions_MultiplePassBlocks() {
124129
String gradleBuildFileContent =
125-
"plugins {\n"
126-
+ " id(\"otel.javaagent-instrumentation\")\n"
127-
+ " id(\"otel.nullaway-conventions\")\n"
128-
+ " id(\"otel.scala-conventions\")\n"
129-
+ "}\n"
130-
+ "\n"
131-
+ "val zioVersion = \"2.0.0\"\n"
132-
+ "val scalaVersion = \"2.12\"\n"
133-
+ "\n"
134-
+ "muzzle {\n"
135-
+ " pass {\n"
136-
+ " group.set(\"dev.zio\")\n"
137-
+ " module.set(\"zio_2.12\")\n"
138-
+ " versions.set(\"[$zioVersion,)\")\n"
139-
+ " assertInverse.set(true)\n"
140-
+ " }\n"
141-
+ " pass {\n"
142-
+ " group.set(\"dev.zio\")\n"
143-
+ " module.set(\"zio_2.13\")\n"
144-
+ " versions.set(\"[$zioVersion,)\")\n"
145-
+ " assertInverse.set(true)\n"
146-
+ " }\n"
147-
+ " pass {\n"
148-
+ " group.set(\"dev.zio\")\n"
149-
+ " module.set(\"zio_3\")\n"
150-
+ " versions.set(\"[$zioVersion,)\")\n"
151-
+ " assertInverse.set(true)\n"
152-
+ " }\n"
153-
+ "}\n";
130+
"""
131+
plugins {
132+
id("otel.javaagent-instrumentation")
133+
id("otel.nullaway-conventions")
134+
id("otel.scala-conventions")
135+
}
136+
137+
val zioVersion = "2.0.0"
138+
val scalaVersion = "2.12"
139+
140+
muzzle {
141+
pass {
142+
group.set("dev.zio")
143+
module.set("zio_2.12")
144+
versions.set("[$zioVersion,)")
145+
assertInverse.set(true)
146+
}
147+
pass {
148+
group.set("dev.zio")
149+
module.set("zio_2.13")
150+
versions.set("[$zioVersion,)")
151+
assertInverse.set(true)
152+
}
153+
pass {
154+
group.set("dev.zio")
155+
module.set("zio_3")
156+
versions.set("[$zioVersion,)")
157+
assertInverse.set(true)
158+
}
159+
}
160+
""";
154161

155162
DependencyInfo info =
156163
GradleParser.parseGradleFile(gradleBuildFileContent, InstrumentationType.JAVAAGENT);
@@ -162,23 +169,25 @@ void testExtractMuzzleVersions_MultiplePassBlocks() {
162169
@Test
163170
void testExtractLogbackLibrary() {
164171
String gradleBuildFileContent =
165-
"compileOnly(\"ch.qos.logback:logback-classic\") {\n"
166-
+ " version {\n"
167-
+ " // compiling against newer version than the earliest supported version (1.0.0) to support\n"
168-
+ " // features added in 1.3.0\n"
169-
+ " strictly(\"1.3.0\")\n"
170-
+ " }\n"
171-
+ "}\n"
172-
+ "compileOnly(\"org.slf4j:slf4j-api\") {\n"
173-
+ " version {\n"
174-
+ " strictly(\"2.0.0\")\n"
175-
+ " }\n"
176-
+ "}\n"
177-
+ "compileOnly(\"net.logstash.logback:logstash-logback-encoder\") {\n"
178-
+ " version {\n"
179-
+ " strictly(\"3.0\")\n"
180-
+ " }\n"
181-
+ "}\n";
172+
"""
173+
compileOnly("ch.qos.logback:logback-classic") {
174+
version {
175+
// compiling against newer version than the earliest supported version (1.0.0) to support
176+
// features added in 1.3.0
177+
strictly("1.3.0")
178+
}
179+
}
180+
compileOnly("org.slf4j:slf4j-api") {
181+
version {
182+
strictly("2.0.0")
183+
}
184+
}
185+
compileOnly("net.logstash.logback:logstash-logback-encoder") {
186+
version {
187+
strictly("3.0")
188+
}
189+
}
190+
""";
182191

183192
DependencyInfo info =
184193
GradleParser.parseGradleFile(gradleBuildFileContent, InstrumentationType.LIBRARY);

instrumentation/spring/spring-batch-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/batch/v3_0/jsr/TestBatchlet.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,4 @@ public String process() {
2525

2626
@Override
2727
public void stop() {}
28-
29-
public String getFail() {
30-
return fail;
31-
}
32-
33-
public void setFail(String fail) {
34-
this.fail = fail;
35-
}
3628
}

instrumentation/spring/spring-batch-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/batch/v3_0/jsr/TestPartitionedItemReader.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,36 +45,4 @@ public Object readItem() {
4545
public Serializable checkpointInfo() {
4646
return null;
4747
}
48-
49-
public String getStartStr() {
50-
return startStr;
51-
}
52-
53-
public void setStartStr(String startStr) {
54-
this.startStr = startStr;
55-
}
56-
57-
public String getEndStr() {
58-
return endStr;
59-
}
60-
61-
public void setEndStr(String endStr) {
62-
this.endStr = endStr;
63-
}
64-
65-
public int getStart() {
66-
return start;
67-
}
68-
69-
public void setStart(int start) {
70-
this.start = start;
71-
}
72-
73-
public int getEnd() {
74-
return end;
75-
}
76-
77-
public void setEnd(int end) {
78-
this.end = end;
79-
}
8048
}

0 commit comments

Comments
 (0)