[jboss-cvs] JBossAS SVN: r94419 - in projects/aop/trunk/aop/src/main/java/org/jboss/aop: advice and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 6 11:31:48 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-10-06 11:31:47 -0400 (Tue, 06 Oct 2009)
New Revision: 94419
Modified:
projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/AdvisorFactory.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectXmlLoader.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/InstanceAdvisorDelegate.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectDefinition.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/compiler/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/util/FindAnnotations.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/eclipsesupport/EclipseTestTransformer.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/hook/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/FieldAccessTransformer.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/InstrumentorFactory.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinpointClassification.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/WrapperTransformer.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/CFlow.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/proxy/SecurityActions.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/standalone/Compiler.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/GetDeclaringClassUtil.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/JavassistUtils.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/ReflectUtils.java
projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/XmlHelper.java
Log:
[JBAOP-757] More bug fixes and findbugs excludes
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/Advisor.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -218,7 +218,7 @@
* Indicates that a call to factory create has already been made, but the factory
* returned {@code null}.
*/
- protected static Object NULL_ASPECT = new Object();
+ protected static final Object NULL_ASPECT = new Object();
protected final AOPLogger logger = AOPLogger.getLogger(this.getClass());
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/AdvisorFactory.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/AdvisorFactory.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/AdvisorFactory.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -45,9 +45,9 @@
protected static final int CLASS = 1;
protected static final int OTHER_ADVISOR = 1000; //The jrockit aop advisor is in another jar which we should not depend on
- protected static int advisor = 0;
+ static int advisor = 0;
- protected static Constructor<?> otherAdvisorConstructor;
+ static Constructor<?> otherAdvisorConstructor;
private static final Class<?>[] NO_ARGS = new Class<?>[0];
private static final Class<?>[] CONSTRUCTOR_SIG = new Class<?>[] {String.class, AspectManager.class};
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectManager.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -173,12 +173,12 @@
* For weaving operations, use lock.lockRead(). For operations that change the
* collections used during weaving, use lock.lockWrite().
*/
- protected static AOPLock lock = new AOPLock();
+ protected static final AOPLock lock = new AOPLock();
protected volatile LinkedHashMap<String, ClassMetaDataBinding> classMetaData = UnmodifiableEmptyCollections.EMPTY_LINKED_HASHMAP;
protected volatile Map<String, DomainDefinition> containers = UnmodifiableEmptyCollections.EMPTY_CONCURRENT_HASHMAP;
protected volatile LinkedHashMap<String, PrecedenceDef> precedenceDefs = UnmodifiableEmptyCollections.EMPTY_LINKED_HASHMAP;
- protected PrecedenceDefEntry[] sortedPrecedenceDefEntries;
+ protected volatile PrecedenceDefEntry[] sortedPrecedenceDefEntries;
protected WeavingStrategy weavingStrategy;
protected DynamicAOPStrategy dynamicStrategy = new LoadInterceptedClassesStrategy();
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectXmlLoader.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectXmlLoader.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/AspectXmlLoader.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -27,6 +27,7 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.Locale;
import java.util.StringTokenizer;
import javax.xml.parsers.DocumentBuilder;
@@ -421,7 +422,7 @@
{
try
{
- type = Enum.valueOf(AdviceType.class, tag2.toUpperCase());
+ type = Enum.valueOf(AdviceType.class, tag2.toUpperCase(Locale.ENGLISH));
}
catch (IllegalArgumentException e)
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/InstanceAdvisorDelegate.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/InstanceAdvisorDelegate.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/InstanceAdvisorDelegate.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -48,7 +48,7 @@
InstanceAdvisor instanceAdvisor;
protected transient volatile WeakHashMap<AspectDefinition, Object> aspects;
protected transient volatile WeakHashMap<AspectDefinition, ConcurrentHashMap<Joinpoint, Object>> joinpointAspects;
- protected SimpleMetaData metadata;
+ protected volatile SimpleMetaData metadata;
public InstanceAdvisorDelegate(Advisor classAdvisor, InstanceAdvisor instanceAdvisor)
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -133,7 +133,7 @@
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectDefinition.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectDefinition.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/AspectDefinition.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -172,7 +172,7 @@
*
* @param scope the new scope of this aspect definition.
*/
- public void setScope(Scope scope)
+ public synchronized void setScope(Scope scope)
{
this.scope = scope;
}
@@ -247,7 +247,7 @@
*
* @return scope the scope of this aspect definition.
*/
- public Scope getScope()
+ public synchronized Scope getScope()
{
return scope;
}
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/advice/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -115,7 +115,7 @@
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/compiler/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/compiler/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/compiler/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -34,7 +34,7 @@
{
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/util/FindAnnotations.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/util/FindAnnotations.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/annotation/util/FindAnnotations.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -35,7 +35,7 @@
public class FindAnnotations
{
- public static ClassPool pool;
+ static ClassPool pool;
public static void main(String[] args) throws Exception
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/eclipsesupport/EclipseTestTransformer.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/eclipsesupport/EclipseTestTransformer.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/eclipsesupport/EclipseTestTransformer.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -29,6 +29,7 @@
import java.lang.instrument.IllegalClassFormatException;
import java.net.URL;
import java.security.ProtectionDomain;
+import java.util.Locale;
import java.util.Vector;
import javassist.ClassPool;
@@ -116,7 +117,7 @@
String[] fTestClassNames = null;
for(int i = 0; i < args.length; i++)
{
- if(args[i].toLowerCase().equals("-classnames") || args[i].toLowerCase().equals("-classname"))
+ if(args[i].toLowerCase(Locale.ENGLISH).equals("-classnames") || args[i].toLowerCase(Locale.ENGLISH).equals("-classname"))
{
Vector<String> list = new Vector<String>();
for(int j = i + 1; j < args.length; j++)
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/hook/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/hook/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/hook/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -34,7 +34,7 @@
{
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/FieldAccessTransformer.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/FieldAccessTransformer.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/FieldAccessTransformer.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -60,7 +60,7 @@
// Static --------------------------------------------------------
// there are two transformations types available to a field: get and set
- protected static final String[] transformations = new String[] {"get", "set"};
+ static final String[] transformations = new String[] {"get", "set"};
protected static final int GET_INDEX = 0;
protected static final int SET_INDEX = 1;
protected static final WrapperTransformer wrapper = new WrapperTransformer(transformations);
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/Instrumentor.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -110,7 +110,7 @@
protected CodeConverter converter;
protected AspectManager manager;
protected JoinpointClassifier joinpointClassifier;
- protected static Collection<CtClass> processedClasses = new ArrayList<CtClass>();
+ protected static final Collection<CtClass> processedClasses = new ArrayList<CtClass>();
// Transformers, more than meets the eye!
MethodExecutionTransformer methodExecutionTransformer;
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/InstrumentorFactory.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/InstrumentorFactory.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/InstrumentorFactory.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -37,9 +37,9 @@
{
private static final AOPLogger logger = AOPLogger.getLogger(InstrumentorFactory.class);
- protected static InstrumentorEnum instrumentor;
+ static InstrumentorEnum instrumentor;
- protected static Constructor<?> otherInstrumentorConstructor;
+ static Constructor<?> otherInstrumentorConstructor;
private static final Class<?>[] CONSTRUCTOR_SIG = new Class[] {AOPClassPool.class, AspectManager.class, JoinpointClassifier.class, DynamicTransformationObserver.class};
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinPointGenerator.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -99,7 +99,7 @@
protected static final String ARGUMENTS= "arguments";
private static final String GET_ARGUMENTS= OptimizedBehaviourInvocations.GET_ARGUMENTS + "()";
protected static final CtClass[] EMPTY_CTCLASS_ARRAY = new CtClass[0];
- protected static final CtClass[] THROWS_THROWABLE;
+ static final CtClass[] THROWS_THROWABLE;
static
{
try
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinpointClassification.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinpointClassification.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/JoinpointClassification.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -34,17 +34,17 @@
/**
* Indicates that the joinpoint mustn't be instrumented.
*/
- public static JoinpointClassification NOT_INSTRUMENTED = new JoinpointClassification("not instrumented");
+ public static final JoinpointClassification NOT_INSTRUMENTED = new JoinpointClassification("not instrumented");
/**
* Indicates that the joinpoint must be prepared for runtime wrapping.
*/
- public static JoinpointClassification PREPARED = new JoinpointClassification("prepared");
+ public static final JoinpointClassification PREPARED = new JoinpointClassification("prepared");
/**
* Indicates that the joinpoint must be wrapped inside a code block for interception.
*/
- public static JoinpointClassification WRAPPED = new JoinpointClassification("wrapped");
+ public static final JoinpointClassification WRAPPED = new JoinpointClassification("wrapped");
/**
* Indicates that the joinpoint must be wrapped inside a code block for interception due
@@ -57,7 +57,7 @@
* status is a flag telling: "you may have to replace the joinpoint executions by the
* joinpoint wrappers in already loaded classes (only in hot swap enabled case).
*/
- public static JoinpointClassification DYNAMICALY_WRAPPED = new JoinpointClassification(WRAPPED, "dynamicaly wrapped");
+ public static final JoinpointClassification DYNAMICALY_WRAPPED = new JoinpointClassification(WRAPPED, "dynamicaly wrapped");
/** The classification description */
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -82,7 +82,7 @@
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/WrapperTransformer.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/WrapperTransformer.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/instrument/WrapperTransformer.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -58,7 +58,7 @@
* member will be affected by only one type of transformation. In this case, a joinpoint
* can be identified only by a class member.
*/
- protected static final String[] SINGLE_TRANSFORMATION = new String[] {WRAPPER_STATUS_ATTRIBUTE};
+ static final String[] SINGLE_TRANSFORMATION = new String[] {WRAPPER_STATUS_ATTRIBUTE};
/**
* Index that identifies the single transformation contained in <code>SINGLE_TRANSFORMATION</code>.
* If <code>SINGLE_TRANSFORMATION</code> was passed as the <code>transformations</code>
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/CFlow.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/CFlow.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/CFlow.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -41,7 +41,7 @@
**/
public class CFlow
{
- public static int NOT_FOUND = -2;
+ public static final int NOT_FOUND = -2;
private String original;
private SimpleNode point;
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/pointcut/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -91,7 +91,7 @@
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/proxy/SecurityActions.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/proxy/SecurityActions.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/proxy/SecurityActions.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -83,7 +83,7 @@
public static class GetContextClassLoaderAction implements PrivilegedAction<ClassLoader>
{
- public static GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
+ public static final GetContextClassLoaderAction INSTANCE = new GetContextClassLoaderAction();
public ClassLoader run()
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/standalone/Compiler.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/standalone/Compiler.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/standalone/Compiler.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -35,6 +35,7 @@
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Locale;
import java.util.StringTokenizer;
import javassist.bytecode.ClassFile;
@@ -74,8 +75,8 @@
public boolean isJarFile(File src)
{
return (src.isFile()
- && (src.getName().toLowerCase().endsWith(".jar")
- || src.getName().toLowerCase().endsWith(".zip"))
+ && (src.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")
+ || src.getName().toLowerCase(Locale.ENGLISH).endsWith(".zip"))
);
}
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/GetDeclaringClassUtil.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/GetDeclaringClassUtil.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/GetDeclaringClassUtil.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -23,6 +23,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
+import java.util.Locale;
/**
* Utility class to work around IBM JDKs broken Class.getDeclaringClass() implementation
@@ -37,7 +38,7 @@
static
{
String vendor = getSystemProperty("java.vm.vendor");
- isIBMJVM = vendor.toUpperCase().contains("IBM");
+ isIBMJVM = vendor.toUpperCase(Locale.ENGLISH).contains("IBM");
}
public static Class<?> getDeclaringClass(Class<?> clazz)
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/JavassistUtils.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/JavassistUtils.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/JavassistUtils.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -34,7 +34,7 @@
*/
public class JavassistUtils
{
- public static CtClass[] EMPTY_CTCLASS_ARRAY = new CtClass[0];
+ public static final CtClass[] EMPTY_CTCLASS_ARRAY = new CtClass[0];
public static CtMethod[] getMethodsWithName(CtClass clazz, String name)
{
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/ReflectUtils.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/ReflectUtils.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/ReflectUtils.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -34,7 +34,7 @@
*/
public class ReflectUtils
{
- public static Class<?>[] EMPTY_CLASS_ARRAY = new Class[0];
+ public static final Class<?>[] EMPTY_CLASS_ARRAY = new Class[0];
private static Pattern accessMethodPattern = Pattern.compile("access[$](\\d)+");
public static Method[] getMethodsWithName(Class<?> clazz, String name)
Modified: projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/XmlHelper.java
===================================================================
--- projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/XmlHelper.java 2009-10-06 15:28:32 UTC (rev 94418)
+++ projects/aop/trunk/aop/src/main/java/org/jboss/aop/util/XmlHelper.java 2009-10-06 15:31:47 UTC (rev 94419)
@@ -27,6 +27,7 @@
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.Locale;
/**
* A utility class to cover up the rough bits of xml parsing
@@ -212,7 +213,7 @@
Element child = getOptionalChild(element, name);
if(child != null)
{
- String value = getElementContent(child).toLowerCase();
+ String value = getElementContent(child).toLowerCase(Locale.ENGLISH);
return value.equals("true") || value.equals("yes");
}
More information about the jboss-cvs-commits
mailing list