Skip to content

Commit 616f5a9

Browse files
committed
Fix errorprone AssignmentExpression warning
1 parent a161df2 commit 616f5a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jfr-connection/src/main/java/io/opentelemetry/contrib/jfr/connection/RecordingOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ private enum Option {
6666

6767
/* If the arg is null or an empty String, return the Option's default. */
6868
private static String normalize(String arg, Option option) {
69-
return arg == null || (arg = arg.trim()).isEmpty() ? option.defaultValue : arg;
69+
arg = arg == null ? "" : arg.trim();
70+
return arg.isEmpty() ? option.defaultValue : arg;
7071
}
7172

7273
/**

0 commit comments

Comments
 (0)