Skip to content

Commit 9be2ca2

Browse files
authored
Merge pull request #10630 from igfoo/igfoo/ver0
Kotlin: Make newerThan symmetric
2 parents 476960e + 66a8bc5 commit 9be2ca2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/kotlin-extractor/src/main/java/com/semmle/extractor/java/OdasaOutput.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,9 @@ private boolean newerThan(TrapClassVersion tcv) {
509509
// Classes being compiled from source have major version 0 but should take precedence
510510
// over any classes with the same qualified name loaded from the classpath
511511
// in previous or subsequent extractor invocations.
512-
if (tcv.majorVersion==0)
512+
if (tcv.majorVersion == 0 && majorVersion != 0)
513513
return false;
514-
else if (majorVersion==0)
514+
else if (majorVersion == 0 && tcv.majorVersion != 0)
515515
return true;
516516
// Always consider the Kotlin extractor superior to the Java extractor, because we may decode and extract
517517
// Kotlin metadata that the Java extractor can't understand:

0 commit comments

Comments
 (0)