https://issues.apache.org/bugzilla/show_bug.cgi?id=49151

           Summary: ClassCastException in BackupManager#stopInternal.
           Product: Tomcat 7
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Cluster
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: kfuj...@apache.org


In BackupManager#startInternal,
When constructor of LazyReplicatedMap throws exception, 
sessions is not LazyReplicatedMap.
Actually, AbstractReplicatedMap#init has the possibility of throwing
RuntimeException. 

In BackupManager#stopInternal ClassCastException is thrown 
because AbstractReplicatedMap#breakdown is executed regardless of the type of
sessions. 

should be changed as follows to avoid ClassCastException. 
===
skip.
if (sessions instanceof LazyReplicatedMap) {
    LazyReplicatedMap map = (LazyReplicatedMap)sessions;
    if ( map!=null ) {
        map.breakdown();
    }
}
skip.
===

This problem exists in Tomcat7.0 and 6.0.

Best Regards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to