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

SecurityException can be obtained but is not specified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.1
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      hopper
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Verified

      Description



      Name: auR10023 Date: 11/30/2001


      The javadoc for RemoteServer.setLog(java.io.OutputStream) does not
      specify SecurityException which can be obtained if there are no
      LoggingPermission("control") permission.
      Here is the javadoc for java.rmi.RemoteServer.setLog() method:

      ...
      public static void setLog(OutputStream out)

           Log RMI calls to the output stream out. If out is null, call
      logging is
           turned off.

           Parameters:
                out - the output stream to which RMI calls should be logged
           Since:
                JDK1.1
      ...


      Here is the result of execution of the
      api/java_rmi/server/RemoteServer/index.html#GetLog JCK test.

      ...
      java.security.AccessControlException: access denied
      (java.util.logging.LoggingPermission control)
              at
      java.security.AccessControlContext.checkPermission(AccessControlContext.java:273
      )
              at
      java.security.AccessController.checkPermission(AccessController.java:404)
              at
      java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
              at java.util.logging.LogManager.checkAccess(LogManager.java:762)
              at java.util.logging.Logger.setLevel(Logger.java:1074)
              at sun.rmi.runtime.Log$LoggerLog.setOutputStream(Log.java:237)
              at java.rmi.server.RemoteServer.setLog(RemoteServer.java:75)
              at
      javasoft.sqe.tests.api.java.rmi.server.RemoteServer.GetLogTests.GetLog0001(GetLo
      gTests.java:52)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
              at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
      a:28)
              at java.lang.reflect.Method.invoke(Method.java:327)
              at
      javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:407)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:203)
              at
      com.sun.jck.lib.ExecJCKTestSameJVMCmd.executeStandardTest(ExecJCKTestSameJVMCmd.
      java:226)
              at
      com.sun.jck.lib.ExecJCKTestSameJVMCmd.run(ExecJCKTestSameJVMCmd.java:160)
              at
      com.sun.javatest.agent.Agent$Task.executeCommand(Agent.java:747)
              at com.sun.javatest.agent.Agent$Task.execute(Agent.java:676)
              at
      com.sun.javatest.agent.Agent$Task.handleRequest(Agent.java:534)
              at
      com.sun.javatest.agent.Agent.handleRequestsUntilClosed(Agent.java:320)
              at com.sun.javatest.agent.Agent.access$000(Agent.java:56)
              at com.sun.javatest.agent.Agent$1.run(Agent.java:208)
              at java.lang.Thread.run(Thread.java:539)
      GetLog0001: Failed. Test case throws exception:
      java.security.AccessControlException: access denied
      (java.util.logging.LoggingPermission control)
      result: Failed. tests: 1; failed: 1; first test case failure: GetLog0001



      test result: Failed. tests: 1; failed: 1; first test case failure:
      GetLog0001


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            awollratsunw Ann Wollrath (Inactive)
            Reporter:
            avusunw Avu Avu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: