Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkage Checker fails to detect the errors in gcsio 3.0.0 #2390

Closed
suztomo opened this issue Nov 6, 2024 · 2 comments · Fixed by #2391
Closed

Linkage Checker fails to detect the errors in gcsio 3.0.0 #2390

suztomo opened this issue Nov 6, 2024 · 2 comments · Fixed by #2391
Assignees

Comments

@suztomo
Copy link
Contributor

suztomo commented Nov 6, 2024

Linkage Checker fails to detect the errors in gcsio 3.0.0

-r
--artifacts
com.google.cloud.bigdataoss:gcsio:3.0.0,com.google.protobuf:protobuf-java:4.28.2,com.google.protobuf:protobuf-java-util:4.28.2

Why is that? It reports errors on gcsio 2.2.16 successfully.

@suztomo suztomo self-assigned this Nov 6, 2024
@suztomo
Copy link
Contributor Author

suztomo commented Nov 6, 2024

The class files in gcsio 3.0.0 was silently discarded at

  /**
   * Returns true if {@code javaClass} file format is compatible with this tool. Currently
   * Java 8 and earlier are supported.
   *
   * @see <a href="https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.1">Java
   *     Virtual Machine Specification: The ClassFile Structure: minor_version, major_version</a>
   */
  private static boolean isCompatibleClassFileVersion(JavaClass javaClass) {
    int classFileMajorVersion = javaClass.getMajor();
    return 45 <= classFileMajorVersion && classFileMajorVersion <= 52;
  }

suztomo added a commit to suztomo/cloud-opensource-java that referenced this issue Nov 7, 2024
@suztomo
Copy link
Contributor Author

suztomo commented Nov 7, 2024

Nov 07, 2024 9:51:38 AM com.google.cloud.tools.opensource.classpath.ClassDumper findSymbolReferences
WARNING: com.google.cloud.bigdataoss:gcsio:3.0.0 has 130 incompatible class files (class file major version > 52).
Nov 07, 2024 9:51:38 AM com.google.cloud.tools.opensource.classpath.ClassDumper findSymbolReferences
WARNING: com.google.cloud.bigdataoss:util:3.0.0 has 60 incompatible class files (class file major version > 52).
Nov 07, 2024 9:51:39 AM com.google.cloud.tools.opensource.classpath.ClassDumper findSymbolReferences
WARNING: org.graalvm.sdk:graal-sdk:22.3.2 has 353 incompatible class files (class file major version > 52).
Nov 07, 2024 9:51:39 AM com.google.cloud.tools.opensource.classpath.ClassDumper findSymbolReferences
WARNING: xerces:xmlParserAPIs:2.6.2 has 180 incompatible class files (class file major version > 52).
Nov 07, 2024 9:51:39 AM com.google.cloud.tools.opensource.classpath.ClassDumper findSymbolReferences
WARNING: xpp3:xpp3:1.1.4c has 1 incompatible class files (class file major version > 52).

suztomo added a commit that referenced this issue Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant