aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/scoped/jar1/FullyScopedAnnotationUsage.java
diff options
context:
space:
mode:
authornickl- <github@jigsoft.co.za>2017-10-29 23:42:49 +0200
committernickl- <github@jigsoft.co.za>2017-11-12 23:52:01 +0200
commit53325f5637042322f1b810ad32c8ee3bad2915f4 (patch)
treed5153092d9a968d3f6e7c9ae912c0df036959c03 /src/test/scoped/jar1/FullyScopedAnnotationUsage.java
parente1f0bba5de4dc03a9debfab333683f07cfbcb594 (diff)
downloadjavassist-53325f5637042322f1b810ad32c8ee3bad2915f4.tar.gz
javassist-53325f5637042322f1b810ad32c8ee3bad2915f4.zip
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.
Diffstat (limited to 'src/test/scoped/jar1/FullyScopedAnnotationUsage.java')
-rw-r--r--src/test/scoped/jar1/FullyScopedAnnotationUsage.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/scoped/jar1/FullyScopedAnnotationUsage.java b/src/test/scoped/jar1/FullyScopedAnnotationUsage.java
new file mode 100644
index 00000000..c44aeb75
--- /dev/null
+++ b/src/test/scoped/jar1/FullyScopedAnnotationUsage.java
@@ -0,0 +1,29 @@
+/*
+ * Javassist, a Java-bytecode translator toolkit.
+ * Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. Alternatively, the contents of this file may be used under
+ * the terms of the GNU Lesser General Public License Version 2.1 or later,
+ * or the Apache License Version 2.0.
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ */
+package scoped.jar1;
+
+@ScopedTestAnnotation(something="notDefault")
+public class FullyScopedAnnotationUsage
+{
+ @ScopedTestAnnotation(something="notDefault")
+ public int aField;
+
+ @ScopedTestAnnotation(something="notDefault")
+ public FullyScopedAnnotationUsage(@ScopedTestAnnotation(something="notDefault") int param) {}
+
+ @ScopedTestAnnotation(something="notDefault")
+ public void doSomething(@ScopedTestAnnotation(something="notDefault") int param) {}
+}