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

(test) six tests failing to compile because of new CodeSource constructor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 5.0
    • 5.0
    • core-libs
    • b25
    • generic
    • generic
    • Verified

      The following six RMI regression tests have started failing this past weekend:

      java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java
      java/rmi/server/RMIClassLoader/checkPermission/CheckPermission.java
      java/rmi/server/RMIClassLoader/spi/ContextInsulation.java
      java/rmi/server/RMISocketFactory/setFailureHandlerPermission/SetFailureHandlerPermission.java
      java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java
      java/rmi/transport/checkAccept/CheckAccept.java

      with compilation errors that look like this:

      /files/JDK1.5/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java:42: reference to CodeSource is ambiguous, both method CodeSource(java.net.URL,java.security.cert.Certificate[]) in java.security.CodeSource and method CodeSource(java.net.URL,java.security.CodeSigner[]) in java.security.CodeSource match
      new ProtectionDomain(new CodeSource(null, null), perms) });
                                           ^
      1 error
      result: Failed. Compilation failed

      All of the compilation errors are for code that attempts to invoke the following constructor of java.security.CodeSource:

      public CodeSource(URL url, Certificate[] certs)

      with a null "certs" argument. But the following constructor overload was recently added to CodeSource:

      public CodeSource(URL url, CodeSigner[] signers)

      which causes these constructor invocation attempts to be ambiguous at compile time. Casts need to be added to each such constructor invocation in the source code to clarify which constructor overload is intended.

            peterjones Peter Jones (Inactive)
            peterjones Peter Jones (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: