diff options
author | Andy Clement <aclement@pivotal.io> | 2019-11-29 07:51:50 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-11-29 07:51:50 -0800 |
commit | c3c07fdb4b93cc483317d8a314233f0b9dcf4d8b (patch) | |
tree | 9dc548125f81996e5078202758e5bdb5914512f1 /loadtime | |
parent | cc88d52fb6c60fbc79a59dec61365b7864baa942 (diff) | |
download | aspectj-c3c07fdb4b93cc483317d8a314233f0b9dcf4d8b.tar.gz aspectj-c3c07fdb4b93cc483317d8a314233f0b9dcf4d8b.zip |
polish
Diffstat (limited to 'loadtime')
8 files changed, 16 insertions, 18 deletions
diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java index 6dbbf32db..9669a2c9d 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Agent.java @@ -11,8 +11,8 @@ *******************************************************************************/ package org.aspectj.weaver.loadtime; -import java.lang.instrument.Instrumentation; import java.lang.instrument.ClassFileTransformer; +import java.lang.instrument.Instrumentation; /** * Java 1.5 preMain agent to hook in the class pre processor diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java index 6589663fd..a1f6902ee 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java @@ -11,9 +11,9 @@ *******************************************************************************/ package org.aspectj.weaver.loadtime; -import org.aspectj.bridge.IMessageHandler; -import org.aspectj.bridge.IMessage; import org.aspectj.bridge.AbortException; +import org.aspectj.bridge.IMessage; +import org.aspectj.bridge.IMessageHandler; /** * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java index 0c9611e4f..4e60c7b86 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java @@ -23,7 +23,7 @@ import org.aspectj.util.LangUtil; /** * A class that hanldes LTW options. Note: AV - I choosed to not reuse AjCompilerOptions and alike since those implies too many * dependancies on jdt and ajdt modules. - * + * * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> */ public class Options { @@ -66,7 +66,7 @@ public class Options { if (arg.length() > OPTIONVALUED_messageHandler.length()) { String handlerClass = arg.substring(OPTIONVALUED_messageHandler.length()).trim(); try { - Class handler = Class.forName(handlerClass, false, laoder); + Class<?> handler = Class.forName(handlerClass, false, laoder); weaverOption.messageHandler = ((IMessageHandler) handler.newInstance()); } catch (Throwable t) { weaverOption.messageHandler.handleMessage(new Message("Cannot instantiate message handler " + handlerClass, @@ -78,7 +78,7 @@ public class Options { // configure the other options for (Iterator<String> iterator = flags.iterator(); iterator.hasNext();) { - String arg = (String) iterator.next(); + String arg = iterator.next(); if (arg.equals(OPTION_15)) { weaverOption.java5 = true; } else if (arg.equalsIgnoreCase(OPTION_lazyTjp)) { diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java index 456fde121..3b2ee51e3 100644 --- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java +++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptorTest.java @@ -19,8 +19,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import junit.framework.TestCase; - import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.util.ClassPath; import org.aspectj.apache.bcel.util.SyntheticRepository; @@ -31,6 +29,8 @@ import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.loadtime.definition.Definition; import org.aspectj.weaver.tools.WeavingAdaptor; +import junit.framework.TestCase; + public class ClassLoaderWeavingAdaptorTest extends TestCase { public void testClassLoaderWeavingAdaptor() { diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/JRockitAgentTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/JRockitAgentTest.java index 9ed540d17..1c5a8536c 100644 --- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/JRockitAgentTest.java +++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/JRockitAgentTest.java @@ -27,11 +27,11 @@ import java.util.zip.ZipEntry; import org.aspectj.util.FileUtil; import org.aspectj.util.LangUtil; -import junit.framework.TestCase; - import com.bea.jvm.ClassPreProcessor; import com.bea.jvm.JVMFactory; +import junit.framework.TestCase; + public class JRockitAgentTest extends TestCase { protected void setUp() throws Exception { diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java index ea787dac8..9ef64a04b 100644 --- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java +++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingContextTest.java @@ -17,10 +17,10 @@ import java.net.URLClassLoader; import java.util.Enumeration; import java.util.List; -import junit.framework.TestCase; - import org.aspectj.weaver.tools.WeavingAdaptor; +import junit.framework.TestCase; + public class WeavingContextTest extends TestCase { private boolean called; diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java index 03b378ba2..406847eb2 100644 --- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java +++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java @@ -15,19 +15,17 @@ package org.aspectj.weaver.loadtime; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.net.URISyntaxException; import java.net.URL; import java.util.Enumeration; import java.util.Properties; -import junit.framework.TestCase; - import org.aspectj.bridge.AbortException; -import org.aspectj.testing.util.TestUtil; import org.aspectj.testing.util.TestUtil.TestError; import org.aspectj.util.FileUtil; import org.aspectj.weaver.tools.WeavingAdaptor; +import junit.framework.TestCase; + /** * @author websterm * diff --git a/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java b/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java index 92d35983f..b0b55d725 100644 --- a/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java +++ b/loadtime/src/test/java/org/aspectj/weaver/loadtime/test/DocumentParserTest.java @@ -11,13 +11,13 @@ *******************************************************************************/ package org.aspectj.weaver.loadtime.test; -import junit.framework.TestCase; - import java.net.URL; import org.aspectj.weaver.loadtime.definition.Definition; import org.aspectj.weaver.loadtime.definition.DocumentParser; +import junit.framework.TestCase; + /** * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> */ |