]> source.dussan.org Git - javassist.git/commit
Fixes to javassist.scopepool 159/head
authornickl- <github@jigsoft.co.za>
Sun, 29 Oct 2017 21:42:49 +0000 (23:42 +0200)
committernickl- <github@jigsoft.co.za>
Sun, 12 Nov 2017 21:52:01 +0000 (23:52 +0200)
commit53325f5637042322f1b810ad32c8ee3bad2915f4
treed5153092d9a968d3f6e7c9ae912c0df036959c03
parente1f0bba5de4dc03a9debfab333683f07cfbcb594
Fixes to javassist.scopepool

Applied parameters and squashed all compiler warnings.
Changed loops to enhanced for where appropriate.
Fixed SoftValueHashMap:
Made it a raw type.
Overwritten implementation of the `get` method correctly unwrapped the reference but the methods
`containsValue` and `entrySet` needed to be fixed.
Implemented the remaining outstanding methods from the `java.util.Map` contract `values`, `putAll`
and `keySet`.
Dropped `AbstractMap` inheritance as we were not inheriting anything anymore.
Changed internal map to `ConcurrentHashMap' to be atomic and parallel safe.

Found original unit tests from jboss retro which are now updated to reflect the javassist
versions of the scoped pool classes. Added tests for the SoftValueHashMap including
test which overloads the heap to ensure the cache cleans itself appropriately.
14 files changed:
src/main/javassist/scopedpool/ScopedClassPool.java
src/main/javassist/scopedpool/ScopedClassPoolRepository.java
src/main/javassist/scopedpool/ScopedClassPoolRepositoryImpl.java
src/main/javassist/scopedpool/SoftValueHashMap.java
src/test/scoped/ScopedRepositoryTestCase.java [new file with mode: 0644]
src/test/scoped/TestAnnotation.java [new file with mode: 0644]
src/test/scoped/UnscopedAnnotationDefaultUsage.java [new file with mode: 0644]
src/test/scoped/UnscopedAnnotationUsage.java [new file with mode: 0644]
src/test/scoped/jar1/FullyScopedAnnotationDefaultUsage.java [new file with mode: 0644]
src/test/scoped/jar1/FullyScopedAnnotationUsage.java [new file with mode: 0644]
src/test/scoped/jar1/ScopedAnnotationDefaultUsage.java [new file with mode: 0644]
src/test/scoped/jar1/ScopedAnnotationUsage.java [new file with mode: 0644]
src/test/scoped/jar1/ScopedTestAnnotation.java [new file with mode: 0644]
src/test/scoped/jar1/TestClass1.java [new file with mode: 0644]