summaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authoraclement <aclement>2005-05-12 10:49:25 +0000
committeraclement <aclement>2005-05-12 10:49:25 +0000
commit9b730456c99c01c7381317e7c4511ae238cfd027 (patch)
tree5e88eea3b29b1f231bb5a855beed9cca4765659f /ajde
parent6f27813f57cadc4729e9c501233a1c40520b2f43 (diff)
downloadaspectj-9b730456c99c01c7381317e7c4511ae238cfd027.tar.gz
aspectj-9b730456c99c01c7381317e7c4511ae238cfd027.zip
Reduced duplication of vm checking logic.
Diffstat (limited to 'ajde')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java17
1 files changed, 3 insertions, 14 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
index 2ea90022a..525e91e52 100644
--- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
@@ -24,7 +24,9 @@ import java.util.Set;
import org.aspectj.ajde.internal.CompilerAdapter;
import org.aspectj.bridge.IMessage;
+import org.aspectj.tools.ajc.AjcTestCase;
import org.aspectj.util.FileUtil;
+import org.aspectj.util.LangUtil;
/**
* Weaving messages are complicated things. There are multiple places where weaving
@@ -68,19 +70,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
// 'expected weaving messages' files.
regenerate = false;
}
-
- private static boolean is13VMOrGreater = true;
- private static boolean is14VMOrGreater = true;
- private static boolean is15VMOrGreater = false;
-
- static {
- String vm = System.getProperty("java.vm.version");
- if (vm.startsWith("1.3")) {
- is14VMOrGreater = false;
- } else if (vm.startsWith("1.5")) {
- is15VMOrGreater = true;
- }
- }
private CompilerAdapter compilerAdapter;
@@ -175,7 +164,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave 'declare @type, @constructor, @method and @field' and check the weave messages that come out.
*/
public void testWeaveMessagesDeclareAnnotation() {
- if (!is15VMOrGreater) return; // annotation classes won't be about pre 15
+ if (!LangUtil.is15VMOrGreater()) return; // annotation classes won't be about pre 15
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Six.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);