commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16880] New: - Language specs violation in Commons Logging 1.0.2 in class LogFactoryImpl
Date Fri, 07 Feb 2003 13:30:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16880>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16880

Language specs violation in Commons Logging 1.0.2 in class LogFactoryImpl

           Summary: Language specs violation in Commons Logging 1.0.2 in
                    class LogFactoryImpl
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Logging
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: d.tonhofer@m-plify.com


In Commons Logging 1.0.2, we have the folloing:

org.apache.commons.logging.LogFactory  
  defines method getContextClassLoader() as 'protected'

org.apache.commons.logging.impl.LogFactoryImpl
  calls aforementioned method inside loadClass() 
  from within the run() method of an anonymous
  subclass of PrivilegedAction.

The IBM VisualAge Java compiler does not like that.
It reports an error: "method not visible"

It is right.

The Java Language reference says in 6.6.1:

[..], if the member or constructor is declared protected, then access is
      permitted only when one of the following is true: 
      - Access to the member or constructor occurs from within the package
        containing the class in which the protected member or constructor is
        declared. (** not true in this case **)
      - Access is correct as described in 6.6.2. ("A protected member or
        constructor of an object may be accessed from outside the package in
        which it is declared only by code that is responsible for the
        implementation of that object.")
        (not true in our case...)

So, I think this method has to be made public. Which is of course unfortunate.

Similar problems have occurred with other stuff. See my bugs 6493 & 13087.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message