UtilImpl initializes _secmon field after use
--------------------------------------------

                 Key: YOKO-196
                 URL: http://issues.apache.org/jira/browse/YOKO-196
             Project: Yoko - CORBA Server
          Issue Type: Bug
          Components: orb core
            Reporter: Dain Sundstrom
         Assigned To: Dain Sundstrom


The UtilImpl static initializer on line 58 calls Util.loadClass with in turn 
calls UtilImpl.loadClass0.  The loadClass0 method uses the _secman field which 
isn't initialized until line 505.  This means that when the loadClass0 method 
is executed the _secman field will be null.  The following stack trace shows 
the problem:

Caused by: java.lang.NullPointerException
    at org.apache.yoko.rmi.impl.UtilImpl.loadClass0(UtilImpl.java:534)
    at javax.rmi.CORBA.Util.loadClass(Util.java:80)
    at org.apache.yoko.rmi.impl.UtilImpl.<clinit>(UtilImpl.java:58)

This is easily fixed by moving the _secman field to the top of the file.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to