Bug 39875 - RealmBase#init() needs cleanup
RealmBase#init() needs cleanup
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
Nightly Build
Other other
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
: 42470 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-06-23 11:15 UTC by Takayoshi Kimura
Modified: 2007-05-22 19:40 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Takayoshi Kimura 2006-06-23 11:15:08 UTC
In RealmBase#init():

<quote>
    public void init() {
        this.containerLog = container.getLogger();
        if( initialized && container != null ) return;
        
        initialized=true;
        if( container== null ) {
</quote>

If the container is null, then a NPE will occurs.
The container is not null, then the if block is no longer needed.

The first line is changed at revision r372854.
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?r1=371686&r2=372854
Comment 1 Yoav Shapira 2007-03-25 08:28:43 UTC
Thank you for reporting this.  I've fixed it in SVN, and the fix should be
available in the 5.5.24 release.
 
Comment 2 Mark Thomas 2007-05-22 19:40:06 UTC
*** Bug 42470 has been marked as a duplicate of this bug. ***