Skip to content

Commit f486d45

Browse files
authored
Fix custom check tests on Java 25 (#14873)
1 parent 4c8c2da commit f486d45

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

custom-checks/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ dependencies {
1313

1414
otelJava {
1515
minJavaVersionSupported.set(JavaVersion.VERSION_17)
16-
// OtelInternalJavadocTest fails with 25-ea
17-
maxJavaVersionForTests.set(JavaVersion.VERSION_24)
1816
}
1917

2018
// We cannot use "--release" javac option here because that will forbid exporting com.sun.tools package.

custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelInternalJavadoc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ private static String getJavadoc(VisitorState state) {
8383
if (docCommentTree == null) {
8484
return null;
8585
}
86-
return docCommentTree.toString().replace("\n", "");
86+
return docCommentTree.toString().replace("\n", " ").replace(" * ", " ").replaceAll("\\s+", " ");
8787
}
8888
}

0 commit comments

Comments
 (0)