Bug 50232 - org.apache.catalina.session.StoreBase has a hidden dependency on PersistentManager
Summary: org.apache.catalina.session.StoreBase has a hidden dependency on PersistentMa...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: trunk
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-08 05:09 UTC by Tiago Batista
Modified: 2010-11-09 10:32 UTC (History)
0 users



Attachments
Removes hidden dependency on PersistentStore (1.21 KB, application/octet-stream)
2010-11-08 05:09 UTC, Tiago Batista
Details
Removes the isLoaded method from PersistentManagerBase (920 bytes, patch)
2010-11-08 05:19 UTC, Tiago Batista
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Batista 2010-11-08 05:09:39 UTC
Created attachment 26270 [details]
Removes hidden dependency on PersistentStore

StoreBase.java depends explicitly on the Manager interface, however, it later casts the manager object to the PersistentManager class with out any check.

This removes that dependency, therefore allowing the usage of this store with any manager that does not extend PersistentManager.

I will later attach a path that removes the offending isLoaded() method as that may induce the same problem further along...
Comment 1 Tiago Batista 2010-11-08 05:19:24 UTC
Created attachment 26271 [details]
Removes the isLoaded method from PersistentManagerBase

This patch removes the isLoaded method that was previously called only by StoreBase. This is optional, but as that particular path of code is no longer used, it seemed like the right thing to do.
Comment 2 Mark Thomas 2010-11-09 10:32:48 UTC
Thanks for the patches. Fixed in trunk (with a slight modification) and will be included in 7.0.5 onwards.