Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304143

[Linux] [MacOS] SystemMetrics class duplication causes builds to fail

XMLWordPrintable

      When Solaris wouldn't build without a stub "SystemMetrics.java" class, we added one in JDK-8303828.

      However, I did not know that Solaris is considered synonymous with UNIX on JDK8u, so my change created a duplicate class that caused other platforms to fail.

      12:27:11 Compiling 9797 files for BUILD_JDK
      12:27:24 /home/adoptopenjdk/workspace/build-scripts/jobs/jdk8u/jdk8u-alpine-linux-x64-temurin/workspace/build/src/jdk/src/linux/classes/jdk/internal/platform/SystemMetrics.java:27: error: duplicate class: jdk.internal.platform.SystemMetrics
      12:27:24 public class SystemMetrics {
      12:27:24 ^
      12:27:47 Note: Some input files use or override a deprecated API.
      12:27:47 Note: Recompile with -Xlint:deprecation for details.
      12:27:47 Note: Some input files use unchecked or unsafe operations.
      12:27:47 Note: Recompile with -Xlint:unchecked for details.
      12:27:47 1 error
      12:27:47 gmake[2]: *** [CompileJavaClasses.gmk:335: /home/adoptopenjdk/workspace/build-scripts/jobs/jdk8u/jdk8u-alpine-linux-x64-temurin/workspace/build/src/build/linux-x86_64-normal-server-release/jdk/classes/_the.BUILD_JDK_batch] Error 1

      Here's a fix to resolve that problem.

            afarley Adam Farley
            afarley Adam Farley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: