Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
(After implementing BCEL-320)
BCEL has different ClassPathRepository classes with slight modification in its underlying cache:
- ClassPathRepository uses HashMap<String, JavaClass> for JavaClass cache
- MemorySensitiveClassPathRepository uses HashMap<String, SoftReference<JavaClass>
- New LruCacheClassPathRepository by
BCEL-320will use LinkedHashMap<String, JavaClass> for JavaClass cache
The logic of loadClass, storeClass, and findClass methods are almost same (attached screenshot of ClassPathRepository and MemorySensitiveClassPathRepository as below). I think they can leverage an abstraction over the internal cache so that they will have less duplicate code.
After BCEL-320, I'm thinking to create a PR for the abstraction.
Attachments
Attachments
Issue Links
- links to