cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [46/51] [partial] cxf git commit: Remove all trailing whitespaces
Date Tue, 14 Feb 2017 09:49:51 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java
index dcbe9fc..542e7ce 100644
--- a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java
+++ b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java
@@ -47,16 +47,16 @@ import org.apache.cxf.common.util.CachedClass;
 import org.apache.cxf.common.util.StringUtils;
 
 /**
- * 
+ *
  */
-public final class JAXBContextCache {  
-    
+public final class JAXBContextCache {
+
     /**
      * Return holder of the context, classes, etc...
      * Do NOT hold onto these strongly as that can lock the JAXBContext and Set<Class> objects
      * into memory.  It preferred to grab the context and classes (if needed) from this object
      * immediately after the call to getCachedContextAndSchemas and then discard it.  The
-     * main purpose of this class is to hold onto the context/set strongly until the caller 
+     * main purpose of this class is to hold onto the context/set strongly until the caller
      * has a chance to copy those into a place where they can hold onto it strongly as
      * needed.
      */
@@ -89,7 +89,7 @@ public final class JAXBContextCache {
                 i.setSchemas(schemas);
             }
         }
-        
+
     }
     private static final class CachedContextAndSchemasInternal {
         private final WeakReference<JAXBContext> context;
@@ -115,16 +115,16 @@ public final class JAXBContextCache {
         public void setSchemas(Collection<DOMSource> schemas) {
             this.schemas = schemas;
         }
-    }   
-    
+    }
+
     private static final Map<Set<Class<?>>, Map<String, CachedContextAndSchemasInternal>> JAXBCONTEXT_CACHE
         = new CacheMap<Set<Class<?>>, Map<String, CachedContextAndSchemasInternal>>();
 
     private static final Map<Package, CachedClass> OBJECT_FACTORY_CACHE
         = new CacheMap<Package, CachedClass>();
-    
+
     private static final boolean HAS_MOXY;
-    
+
     static {
         boolean b = false;
         try {
@@ -135,11 +135,11 @@ public final class JAXBContextCache {
         }
         HAS_MOXY = b;
     }
-    
+
     private JAXBContextCache() {
         //utility class
     }
-    
+
     /**
      * Clear any caches to make sure new contexts are created
      */
@@ -155,7 +155,7 @@ public final class JAXBContextCache {
     public static void scanPackages(Set<Class<?>> classes) {
         JAXBUtils.scanPackages(classes, OBJECT_FACTORY_CACHE);
     }
-    
+
     public static CachedContextAndSchemas getCachedContextAndSchemas(Class<?> ... cls) throws JAXBException {
         Set<Class<?>> classes = new HashSet<Class<?>>();
         for (Class<?> c : cls) {
@@ -164,16 +164,16 @@ public final class JAXBContextCache {
         scanPackages(classes);
         return JAXBContextCache.getCachedContextAndSchemas(classes, null, null, null, false);
     }
-    
+
     public static CachedContextAndSchemas getCachedContextAndSchemas(String pkg,
                                                                      Map<String, Object> props,
-                                                                     ClassLoader loader) 
+                                                                     ClassLoader loader)
         throws JAXBException {
         Set<Class<?>> classes = new HashSet<Class<?>>();
         addPackage(classes, pkg, loader);
         return getCachedContextAndSchemas(classes, null, props, null, true);
     }
-    
+
     public static CachedContextAndSchemas getCachedContextAndSchemas(final Set<Class<?>> classes,
                                                                      String defaultNs,
                                                                      Map<String, Object> props,
@@ -204,7 +204,7 @@ public final class JAXBContextCache {
         Map<String, CachedContextAndSchemasInternal> cachedContextAndSchemasInternalMap = null;
         if (typeRefs == null || typeRefs.isEmpty()) {
             synchronized (JAXBCONTEXT_CACHE) {
-                
+
                 if (exact) {
                     cachedContextAndSchemasInternalMap
                         = JAXBCONTEXT_CACHE.get(classes);
@@ -212,7 +212,7 @@ public final class JAXBContextCache {
                         cachedContextAndSchemasInternal = cachedContextAndSchemasInternalMap.get(defaultNs);
                     }
                 } else {
-                    for (Entry<Set<Class<?>>, Map<String, CachedContextAndSchemasInternal>> k 
+                    for (Entry<Set<Class<?>>, Map<String, CachedContextAndSchemasInternal>> k
                             : JAXBCONTEXT_CACHE.entrySet()) {
                         Set<Class<?>> key = k.getKey();
                         if (key != null && key.containsAll(classes)) {
@@ -242,7 +242,7 @@ public final class JAXBContextCache {
         try {
             context = createContext(classes, map, typeRefs);
         } catch (JAXBException ex) {
-            // load jaxb needed class and try to create jaxb context 
+            // load jaxb needed class and try to create jaxb context
             boolean added = addJaxbObjectFactory(ex, classes);
             if (added) {
                 try {
@@ -264,10 +264,10 @@ public final class JAXBContextCache {
         synchronized (JAXBCONTEXT_CACHE) {
             if (typeRefs == null || typeRefs.isEmpty()) {
                 if (cachedContextAndSchemasInternalMap == null) {
-                    cachedContextAndSchemasInternalMap 
+                    cachedContextAndSchemasInternalMap
                         = new CacheMap<String, CachedContextAndSchemasInternal>();
-                } 
-                cachedContextAndSchemasInternalMap.put((defaultNs != null) ? defaultNs : "", 
+                }
+                cachedContextAndSchemasInternalMap.put((defaultNs != null) ? defaultNs : "",
                     cachedContextAndSchemasInternal);
                 JAXBCONTEXT_CACHE.put(classes, cachedContextAndSchemasInternalMap);
             }
@@ -275,7 +275,7 @@ public final class JAXBContextCache {
 
         return new CachedContextAndSchemas(context, classes, cachedContextAndSchemasInternal);
     }
-    
+
     private static boolean checkObjectFactoryNamespaces(Class<?> clz) {
         for (Method meth : clz.getMethods()) {
             XmlElementDecl decl = meth.getAnnotation(XmlElementDecl.class);
@@ -288,8 +288,8 @@ public final class JAXBContextCache {
 
         return false;
     }
-    
-    
+
+
     private static JAXBContext createContext(final Set<Class<?>> classes,
                                       final Map<String, Object> map,
                                       Collection<Object> typeRefs)
@@ -404,7 +404,7 @@ public final class JAXBContextCache {
             if (!StringUtils.isEmpty(pkg)) {
                 pkg += ".";
             }
-    
+
             String line = reader.readLine();
             while (line != null) {
                 line = line.trim();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextProxy.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextProxy.java b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextProxy.java
index 5115aca..729baf0 100644
--- a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextProxy.java
+++ b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBContextProxy.java
@@ -20,7 +20,7 @@
 package org.apache.cxf.common.jaxb;
 
 /**
- * 
+ *
  */
 public interface JAXBContextProxy {
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
index fdbe147..3e42b20 100644
--- a/core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java
@@ -93,7 +93,7 @@ import org.apache.cxf.helpers.JavaUtils;
 
 public final class JAXBUtils {
     public static final Logger LOG = LogUtils.getL7dLogger(JAXBUtils.class);
-    
+
     public enum IdentifierType {
         CLASS,
         INTERFACE,
@@ -102,12 +102,12 @@ public final class JAXBUtils {
         VARIABLE,
         CONSTANT
     };
-    
+
     public static final String JAXB_URI = "http://java.sun.com/xml/ns/jaxb";
-    
-    
+
+
     private static final char[] XML_NAME_PUNCTUATION_CHARS = new char[] {
-        /* hyphen                       */ '\u002D', 
+        /* hyphen                       */ '\u002D',
         /* period                       */ '\u002E',
         /* colon                        */'\u003A',
         /* dot                          */ '\u00B7',
@@ -116,15 +116,15 @@ public final class JAXBUtils {
         /* arabic start of rub el hizb  */'\u06DE',
         /* underscore                   */ '\u005F',
     };
-    
+
     private static final String XML_NAME_PUNCTUATION_STRING = new String(XML_NAME_PUNCTUATION_CHARS);
-    
+
     private static final Map<String, String> BUILTIN_DATATYPES_MAP;
     private static final Map<String, Class<?>> HOLDER_TYPES_MAP;
     private static ClassLoader jaxbXjcLoader;
 
     static {
-        BUILTIN_DATATYPES_MAP = new HashMap<String, String>();        
+        BUILTIN_DATATYPES_MAP = new HashMap<String, String>();
         BUILTIN_DATATYPES_MAP.put("string", "java.lang.String");
         BUILTIN_DATATYPES_MAP.put("integer", "java.math.BigInteger");
         BUILTIN_DATATYPES_MAP.put("int", "int");
@@ -152,7 +152,7 @@ public final class JAXBUtils {
         BUILTIN_DATATYPES_MAP.put("duration", "javax.xml.datatype.Duration");
         BUILTIN_DATATYPES_MAP.put("NOTATION", "javax.xml.namespace.QName");
         BUILTIN_DATATYPES_MAP.put("string", "java.lang.String");
-        
+
         HOLDER_TYPES_MAP = new HashMap<String, Class<?>>();
         HOLDER_TYPES_MAP.put("int", java.lang.Integer.class);
         HOLDER_TYPES_MAP.put("long", java.lang.Long.class);
@@ -162,15 +162,15 @@ public final class JAXBUtils {
         HOLDER_TYPES_MAP.put("boolean", java.lang.Boolean.class);
         HOLDER_TYPES_MAP.put("byte", java.lang.Byte.class);
     }
-    
-    
+
+
     /**
      * prevents instantiation
      *
      */
     private JAXBUtils() {
     }
-    
+
     public static void closeUnmarshaller(Unmarshaller u) {
         if (u instanceof Closeable) {
             //need to do this to clear the ThreadLocal cache
@@ -231,18 +231,18 @@ public final class JAXBUtils {
             closeUnmarshaller(u);
         }
     }
-    
+
     public static String builtInTypeToJavaType(String type) {
         return BUILTIN_DATATYPES_MAP.get(type);
     }
-    
+
     public static Class<?> holderClass(String type) {
         return HOLDER_TYPES_MAP.get(type);
     }
-    
-    /** 
+
+    /**
      * Checks if the specified word is a Java keyword (as defined in JavaUtils).
-     * 
+     *
      * @param word the word to check.
      * @return true if the word is a keyword.
      * @see org.apache.cxf.helpers.JavaUtils
@@ -254,7 +254,7 @@ public final class JAXBUtils {
     /**
      * Generates a Java package name from a URI according to the
      * algorithm outlined in JAXB 2.0.
-     * 
+     *
      * @param namespaceURI the namespace URI.
      * @return the package name.
      */
@@ -265,23 +265,23 @@ public final class JAXBUtils {
             return null;
         }
     }
-    
+
     /**
      * Generates a Java package name from a URI according to the
      * algorithm outlined in Appendix D of JAXB (2.0+).
-     * 
+     *
      * @param uri the namespace URI.
      * @return the package name.
      */
     public static String nameSpaceURIToPackage(URI uri) {
-       
+
         StringBuilder packageName = new StringBuilder();
         String authority = uri.getAuthority();
         String scheme = uri.getScheme();
         if (authority == null && "urn".equals(scheme)) {
             authority = uri.getSchemeSpecificPart();
         }
-        
+
         if (null != authority && !"".equals(authority)) {
             if ("urn".equals(scheme)) {
                 packageName.append(authority);
@@ -289,11 +289,11 @@ public final class JAXBUtils {
                 for (int i = 0; i < packageName.length(); i++) {
                     if (packageName.charAt(i) == '-') {
                         packageName.setCharAt(i, '.');
-                    } 
+                    }
                 }
                 authority = packageName.toString();
                 packageName.setLength(0);
-                
+
                 StringTokenizer st = new StringTokenizer(authority, ":");
                 while (st.hasMoreTokens()) {
                     String token = st.nextToken();
@@ -306,9 +306,9 @@ public final class JAXBUtils {
                 }
                 authority = packageName.toString();
                 packageName.setLength(0);
-                
-            }  
-            
+
+            }
+
             StringTokenizer st = new StringTokenizer(authority, ".");
             if (st.hasMoreTokens()) {
                 String token = null;
@@ -324,12 +324,12 @@ public final class JAXBUtils {
                     packageName.insert(0, normalizePackageNamePart(token));
                 }
             }
-            
+
             if (!("http".equalsIgnoreCase(scheme) || "urn".equalsIgnoreCase(scheme))) {
                 packageName.insert(0, ".");
                 packageName.insert(0, normalizePackageNamePart(scheme));
             }
-            
+
         }
 
         String path = uri.getPath();
@@ -342,7 +342,7 @@ public final class JAXBUtils {
             index = path.length();
         } else {
             String ending = path.substring(index + 1);
-            if (ending.length() < 2 || (ending.length() > 3 
+            if (ending.length() < 2 || (ending.length() > 3
                 && !"html".equalsIgnoreCase(ending))) {
                 index = path.length();
             }
@@ -357,36 +357,36 @@ public final class JAXBUtils {
         }
         return packageName.toString();
     }
-    
+
     private static String normalizePackageNamePart(String name) {
         StringBuilder sname = new StringBuilder(name.toLowerCase());
 
         for (int i = 0; i < sname.length(); i++) {
             sname.setCharAt(i, Character.toLowerCase(sname.charAt(i)));
         }
-        
+
         for (int i = 0; i < sname.length(); i++) {
             if (!Character.isJavaIdentifierPart(sname.charAt(i))) {
                 sname.setCharAt(i, '_');
             }
         }
-        
+
         if (isJavaKeyword(sname.toString())) {
             sname.insert(0, '_');
         }
-        
+
         if (!Character.isJavaIdentifierStart(sname.charAt(0))) {
-            sname.insert(0, '_');  
+            sname.insert(0, '_');
         }
-                
+
         return sname.toString();
     }
-    
-    
+
+
     /**
      * Converts an XML name to a Java identifier according to the mapping
      * algorithm outlined in the JAXB specification
-     * 
+     *
      * @param name the XML name
      * @return the Java identifier
      */
@@ -406,31 +406,31 @@ public final class JAXBUtils {
         for (int i = 1; i < name.length() && legalIdentifier; i++) {
             legalIdentifier = legalIdentifier && Character.isJavaIdentifierPart(buf.charAt(i));
         }
-        
-        boolean conventionalIdentifier = isConventionalIdentifier(buf, type); 
+
+        boolean conventionalIdentifier = isConventionalIdentifier(buf, type);
         if (legalIdentifier && conventionalIdentifier) {
             if (JAXBUtils.isJavaKeyword(name) && type == IdentifierType.VARIABLE) {
                 name = normalizePackageNamePart(name);
             }
             return name;
         }
-        
-        // split into words 
+
+        // split into words
 
         List<String> words = new ArrayList<>();
 
         StringTokenizer st = new StringTokenizer(name, XML_NAME_PUNCTUATION_STRING);
         while (st.hasMoreTokens()) {
             words.add(st.nextToken());
-        }        
+        }
 
         for (int i = 0; i < words.size(); i++) {
             splitWord(words, i);
         }
-        
+
         return makeConventionalIdentifier(words, type);
     }
-    
+
     private static void splitWord(List<String> words, int listIndex) {
         String word = words.get(listIndex);
         if (word.length() <= 1) {
@@ -444,34 +444,34 @@ public final class JAXBUtils {
             sword.setCharAt(first, Character.toUpperCase(firstChar));
         }
         int i = 1;
-        
-        while (i < sword.length()) {  
+
+        while (i < sword.length()) {
             if (Character.isDigit(firstChar)) {
                 while (i < sword.length() && Character.isDigit(sword.charAt(i))) {
                     i++;
                 }
             } else if (isCasedLetter(firstChar)) {
-                boolean previousIsLower = Character.isLowerCase(firstChar); 
+                boolean previousIsLower = Character.isLowerCase(firstChar);
                 while (i < sword.length() && isCasedLetter(sword.charAt(i))) {
                     if (Character.isUpperCase(sword.charAt(i)) && previousIsLower) {
                         break;
-                    } 
+                    }
                     previousIsLower = Character.isLowerCase(sword.charAt(i));
                     i++;
-                }             
-            } else { 
+                }
+            } else {
                 // first must be a mark or an uncased letter
                 while (i < sword.length() && (isMark(sword.charAt(i)) || !isCasedLetter(sword.charAt(i)))) {
                     i++;
-                }       
+                }
             }
-            
+
             // characters from first to i are all either
             // * digits
             // * upper or lower case letters, with only the first one an upper
             // * uncased letters or marks
-            
-            
+
+
             String newWord = sword.substring(first, i);
             words.add(index, newWord);
             index++;
@@ -482,20 +482,20 @@ public final class JAXBUtils {
                 firstChar = sword.charAt(first);
             }
         }
-        
+
         if (index > (listIndex + 1)) {
             words.remove(listIndex);
         }
     }
-    
+
     private static boolean isMark(char c) {
         return Character.isJavaIdentifierPart(c) && !Character.isLetter(c) && !Character.isDigit(c);
     }
-    
+
     private static boolean isCasedLetter(char c) {
         return Character.isUpperCase(c) || Character.isLowerCase(c);
     }
-    
+
     private static boolean isConventionalIdentifier(StringBuilder buf, IdentifierType type) {
         if (null == buf || buf.length() == 0) {
             return false;
@@ -504,7 +504,7 @@ public final class JAXBUtils {
         if (IdentifierType.CONSTANT == type) {
             for (int i = 0; i < buf.length(); i++) {
                 if (Character.isLowerCase(buf.charAt(i))) {
-                    return false;                  
+                    return false;
                 }
             }
             result = true;
@@ -512,11 +512,11 @@ public final class JAXBUtils {
             result = Character.isLowerCase(buf.charAt(0));
         } else {
             int pos = 3;
-            if (IdentifierType.GETTER == type 
-                && !(buf.length() >= pos 
+            if (IdentifierType.GETTER == type
+                && !(buf.length() >= pos
                     && "get".equals(buf.subSequence(0, 3)))) {
                 return false;
-            } else if (IdentifierType.SETTER == type 
+            } else if (IdentifierType.SETTER == type
                 && !(buf.length() >= pos && "set".equals(buf.subSequence(0, 3)))) {
                 return false;
             } else {
@@ -526,7 +526,7 @@ public final class JAXBUtils {
         }
         return result;
     }
-    
+
     private static String makeConventionalIdentifier(List<String> words, IdentifierType type) {
         StringBuilder buf = new StringBuilder();
         boolean firstWord = true;
@@ -545,7 +545,7 @@ public final class JAXBUtils {
             if (IdentifierType.CONSTANT == type) {
                 for (int i = l; i < buf.length(); i++) {
                     if (Character.isLowerCase(buf.charAt(i))) {
-                        buf.setCharAt(i, Character.toUpperCase(buf.charAt(i)));                  
+                        buf.setCharAt(i, Character.toUpperCase(buf.charAt(i)));
                     }
                 }
             } else if (IdentifierType.VARIABLE == type) {
@@ -561,7 +561,7 @@ public final class JAXBUtils {
         }
         return buf.toString();
     }
-    
+
     public static Class<?> getValidClass(Class<?> cls) {
         if (cls.isEnum()) {
             return cls;
@@ -599,7 +599,7 @@ public final class JAXBUtils {
                 Class.forName("com.sun.tools.internal.xjc.api.XJC");
                 jaxbXjcLoader = ClassLoader.getSystemClassLoader();
             } catch (Exception t2) {
-                //couldn't find either, probably cause tools.jar isn't on 
+                //couldn't find either, probably cause tools.jar isn't on
                 //the classpath.   Let's see if we can find the tools jar
                 String s = SystemPropertyAction.getProperty("java.home");
                 if (!StringUtils.isEmpty(s)) {
@@ -617,11 +617,11 @@ public final class JAXBUtils {
                         }
                     }
                 }
-            } 
+            }
         }
         return jaxbXjcLoader;
     }
-    
+
     public static Object setNamespaceMapper(final Map<String, String> nspref,
                                            Marshaller marshaller) throws PropertyException {
         Object mapper = createNamespaceWrapper(marshaller.getClass(), nspref);
@@ -656,8 +656,8 @@ public final class JAXBUtils {
                 pkg = "com.sun.xml.internal.bind.";
                 refClass = Class.forName(pkg + "api.TypeReference", true, getXJCClassLoader());
             }
-            Object ref = refClass.getConstructor(QName.class, 
-                                                 Type.class, 
+            Object ref = refClass.getConstructor(QName.class,
+                                                 Type.class,
                                                  anns.getClass()).newInstance(qname, refcls, anns);
             List<Object> typeRefs = new ArrayList<>();
             typeRefs.add(ref);
@@ -666,21 +666,21 @@ public final class JAXBUtils {
             if (!refcls.isInterface()) {
                 clses.add(refcls);
             }
-            
+
             Object ctx = null;
             for (Method m : cls.getDeclaredMethods()) {
                 if (m.getName().equals("newInstance")
                     && m.getParameterTypes().length == 6) {
                     ctx = m.invoke(null, clses.toArray(new Class[clses.size()]),
                                          typeRefs, null, null, true, null);
-                    
+
                 }
             }
 
             if (ctx == null) {
                 throw new JAXBException("No ctx found");
             }
-                
+
             Object bridge = ctx.getClass().getMethod("createBridge", refClass).invoke(ctx, ref);
             return ReflectionInvokationHandler.createProxyWrapper(bridge,
                                                                   BridgeWrapper.class);
@@ -702,8 +702,8 @@ public final class JAXBUtils {
 
         void marshal(Object elValue, Node source, AttachmentMarshaller am) throws JAXBException;
     }
-    
-    
+
+
     public static SchemaCompiler createSchemaCompiler() throws JAXBException {
         try {
             Class<?> cls;
@@ -715,7 +715,7 @@ public final class JAXBUtils {
                 cls = Class.forName("com.sun.tools.internal.xjc.api.XJC", true, getXJCClassLoader());
                 sc = cls.getMethod("createSchemaCompiler").invoke(null);
             }
-            
+
             return ReflectionInvokationHandler.createProxyWrapper(sc,
                                                                   SchemaCompiler.class);
         } catch (Exception ex) {
@@ -724,7 +724,7 @@ public final class JAXBUtils {
     }
 
     public static SchemaCompiler createSchemaCompilerWithDefaultAllocator(Set<String> allocatorSet) {
-        
+
         try {
             SchemaCompiler compiler = JAXBUtils.createSchemaCompiler();
             Object allocator = ReflectionInvokationHandler
@@ -732,23 +732,23 @@ public final class JAXBUtils {
                                 JAXBUtils.getParamClass(compiler, "setClassNameAllocator"));
 
             compiler.setClassNameAllocator(allocator);
-            return compiler;    
+            return compiler;
         } catch (JAXBException e1) {
             throw new IllegalStateException("Unable to create schema compiler", e1);
         }
-        
+
     }
-    
+
     public static void logGeneratedClassNames(Logger logger, JCodeModel codeModel) {
         if (!logger.isLoggable(Level.INFO)) {
             return;
         }
-        
+
         StringBuilder sb = new StringBuilder();
         boolean first = true;
         for (Iterator<JPackage> itr = codeModel.packages(); itr.hasNext();) {
             JPackage package1 = itr.next();
-            
+
             for (Iterator<JDefinedClass> citr = package1.classes(); citr.hasNext();) {
                 if (!first) {
                     sb.append(", ");
@@ -758,15 +758,15 @@ public final class JAXBUtils {
                 sb.append(citr.next().fullName());
             }
         }
-        
+
         logger.log(Level.INFO, "Created classes: " + sb.toString());
     }
-    
+
     public static List<String> getGeneratedClassNames(JCodeModel codeModel) {
         List<String> classes = new ArrayList<>();
         for (Iterator<JPackage> itr = codeModel.packages(); itr.hasNext();) {
             JPackage package1 = itr.next();
-            
+
             for (Iterator<JDefinedClass> citr = package1.classes(); citr.hasNext();) {
                 classes.add(citr.next().fullName());
             }
@@ -799,7 +799,7 @@ public final class JAXBUtils {
             throw new JAXBException(ex);
         }
     }
-    
+
     public static Class<?> getParamClass(SchemaCompiler sc, String method) {
         Object o = ((ReflectionInvokationHandler)Proxy.getInvocationHandler(sc)).getTarget();
         for (Method m : o.getClass().getMethods()) {
@@ -809,8 +809,8 @@ public final class JAXBUtils {
         }
         return null;
     }
-    
-    
+
+
     public static List<DOMResult> generateJaxbSchemas(
         JAXBContext context, final Map<String, DOMResult> builtIns) throws IOException {
         final List<DOMResult> results = new ArrayList<>();
@@ -819,7 +819,7 @@ public final class JAXBUtils {
             @Override
             public Result createOutput(String ns, String file) throws IOException {
                 DOMResult result = new DOMResult();
-                
+
                 if (builtIns.containsKey(ns)) {
                     DOMResult dr = builtIns.get(ns);
                     result.setSystemId(dr.getSystemId());
@@ -833,11 +833,11 @@ public final class JAXBUtils {
         });
         return results;
     }
-    
+
     public static String getPackageNamespace(Class<?> cls) {
         Package p = cls.getPackage();
         if (p != null) {
-            javax.xml.bind.annotation.XmlSchema schemaAnn = 
+            javax.xml.bind.annotation.XmlSchema schemaAnn =
                 p.getAnnotation(javax.xml.bind.annotation.XmlSchema.class);
             if (schemaAnn != null) {
                 return schemaAnn.namespace();
@@ -845,7 +845,7 @@ public final class JAXBUtils {
         }
         return null;
     }
-    
+
     public static void scanPackages(Set<Class<?>> classes,
                                     Map<Package, CachedClass> objectFactoryCache) {
         scanPackages(classes, null, objectFactoryCache);
@@ -853,14 +853,14 @@ public final class JAXBUtils {
     public static void scanPackages(Set<Class<?>> classes,
                                     Class<?>[] extraClass,
                                     Map<Package, CachedClass> objectFactoryCache) {
-        
+
         // add user extra class into jaxb context
         if (extraClass != null && extraClass.length > 0) {
             for (Class<?> clz : extraClass) {
                 classes.add(clz);
             }
         }
-        
+
         // try and read any jaxb.index files that are with the other classes.
         // This should
         // allow loading of extra classes (such as subclasses for inheritance
@@ -873,7 +873,7 @@ public final class JAXBUtils {
             String pkgName = PackageUtils.getPackageName(jcls);
             if (!packages.containsKey(pkgName)) {
                 Package pkg = jcls.getPackage();
-                   
+
                 packages.put(pkgName, jcls.getResourceAsStream("jaxb.index"));
                 packageLoaders.put(pkgName, jcls.getClassLoader());
                 String objectFactoryClassName = pkgName + "." + "ObjectFactory";
@@ -897,7 +897,7 @@ public final class JAXBUtils {
                         addToObjectFactoryCache(pkg, null, objectFactoryCache);
                     }
                 } else {
-                    objectFactories.add(ofactory);                    
+                    objectFactories.add(ofactory);
                 }
             }
         }
@@ -945,26 +945,26 @@ public final class JAXBUtils {
         classes.addAll(objectFactories);
     }
 
-       
-    private static void addToObjectFactoryCache(Package objectFactoryPkg, 
+
+    private static void addToObjectFactoryCache(Package objectFactoryPkg,
                                          Class<?> ofactory,
                                          Map<Package, CachedClass> objectFactoryCache) {
         if (objectFactoryPkg == null || objectFactoryCache == null) {
             return;
         }
         synchronized (objectFactoryCache) {
-            objectFactoryCache.put(objectFactoryPkg, 
+            objectFactoryCache.put(objectFactoryPkg,
                                      new CachedClass(ofactory));
         }
     }
-    
+
     public static class DefaultClassNameAllocator {
         private final Set<String> typesClassNames;
 
         public DefaultClassNameAllocator() {
             this(new HashSet<>());
         }
-        
+
         public DefaultClassNameAllocator(Set<String> set) {
             typesClassNames = set;
         }
@@ -981,12 +981,12 @@ public final class JAXBUtils {
             typesClassNames.add(fullPckClass);
             return fullClassName;
         }
-       
+
     }
-    
+
     public interface SchemaCompiler {
         void setEntityResolver(EntityResolver entityResolver);
-        
+
         void setErrorListener(Object elForRun);
 
         void setClassNameAllocator(Object allocator);
@@ -1006,7 +1006,7 @@ public final class JAXBUtils {
 
         @WrapReturn(JCodeModel.class)
         JCodeModel generateCode(Object object, Object elForRun);
-        
+
         @WrapReturn(Mapping.class)
         Mapping get(QName qn);
 
@@ -1015,7 +1015,7 @@ public final class JAXBUtils {
     }
     public interface Mapping {
         @WrapReturn(TypeAndAnnotation.class)
-        TypeAndAnnotation getType();        
+        TypeAndAnnotation getType();
     }
     public interface TypeAndAnnotation {
         @WrapReturn(JType.class)
@@ -1045,7 +1045,7 @@ public final class JAXBUtils {
         void addBindFile(InputSource is);
 
         void parseArguments(String[] args);
-        
+
         String getBuildID();
     }
     public interface JCodeModel {
@@ -1067,7 +1067,7 @@ public final class JAXBUtils {
 
         String fullName();
     }
- 
+
     public static boolean isJAXB22() {
         Target t = XmlElement.class.getAnnotation(Target.class);
         //JAXB 2.2 allows XmlElement on params.
@@ -1078,9 +1078,9 @@ public final class JAXBUtils {
         }
         return false;
     }
-    
+
     private static synchronized Object createNamespaceWrapper(Class<?> mcls, Map<String, String> map) {
-        String postFix = ""; 
+        String postFix = "";
         if (mcls.getName().contains("eclipse")) {
             return createEclipseNamespaceMapper(mcls, map);
         } else if (mcls.getName().contains(".internal")) {
@@ -1096,7 +1096,7 @@ public final class JAXBUtils {
         if (cls == null) {
             try {
                 ClassWriter cw = helper.createClassWriter();
-                if (cw != null) { 
+                if (cw != null) {
                     cls = createNamespaceWrapperInternal(helper, cw, postFix, mcls);
                 }
             } catch (RuntimeException ex) {
@@ -1107,7 +1107,7 @@ public final class JAXBUtils {
         if (cls == null
             && (!mcls.getName().contains(".internal.") && mcls.getName().contains("com.sun"))) {
             try {
-                cls = ClassLoaderUtils.loadClass("org.apache.cxf.common.jaxb.NamespaceMapper", 
+                cls = ClassLoaderUtils.loadClass("org.apache.cxf.common.jaxb.NamespaceMapper",
                                                  JAXBUtils.class);
             } catch (Throwable ex2) {
                 // ignore
@@ -1127,11 +1127,11 @@ public final class JAXBUtils {
     }
     /*
     // This is the "prototype" for the ASM generated class below
-    public static class MapNamespacePrefixMapper2 
+    public static class MapNamespacePrefixMapper2
         extends org.eclipse.persistence.internal.oxm.record.namespaces.MapNamespacePrefixMapper {
-        
+
         String nsctxt[];
-        
+
         public MapNamespacePrefixMapper2(Map<String, String> foo) {
             super(foo);
         }
@@ -1161,7 +1161,7 @@ public final class JAXBUtils {
         String className = "org.apache.cxf.jaxb.EclipseNamespaceMapper";
         String slashedName = "org/apache/cxf/jaxb/EclipseNamespaceMapper";
         Class<?> cls = helper.findClass(className, JAXBUtils.class);
-        
+
         if (cls == null) {
             ClassWriter cw = helper.createClassWriter();
             if (cw == null) {
@@ -1176,12 +1176,12 @@ public final class JAXBUtils {
                      superName, null);
 
             cw.visitSource("EclipseNamespaceMapper.java", null);
-            
+
             fv = cw.visitField(Opcodes.ACC_PRIVATE, "nsctxt", "[Ljava/lang/String;", null, null);
             fv.visitEnd();
-            
-           
-            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "(Ljava/util/Map;)V", 
+
+
+            mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "(Ljava/util/Map;)V",
                                 "(Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;)V", null);
             mv.visitCode();
             Label l0 = helper.createLabel();
@@ -1196,9 +1196,9 @@ public final class JAXBUtils {
             Label l2 = helper.createLabel();
             mv.visitLabel(l2);
             mv.visitMaxs(2, 2);
-            mv.visitEnd();            
-            
-            
+            mv.visitEnd();
+
+
             mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "setContextualNamespaceDecls", "([Ljava/lang/String;)V",
                                 null, null);
             mv.visitCode();
@@ -1231,18 +1231,18 @@ public final class JAXBUtils {
 
             mv.visitLabel(l1);
             mv.visitLocalVariable("this", "L" + slashedName + ";", null, l0, l1, 0);
-            
+
             mv.visitMaxs(1, 1);
             mv.visitEnd();
-            
-            
+
+
             mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", null, null);
             mv.visitCode();
             l0 = helper.createLabel();
             mv.visitLabel(l0);
             mv.visitLineNumber(1036, l0);
             mv.visitVarInsn(Opcodes.ALOAD, 0);
-            mv.visitMethodInsn(Opcodes.INVOKESPECIAL, 
+            mv.visitMethodInsn(Opcodes.INVOKESPECIAL,
                                superName,
                                "getPreDeclaredNamespaceUris", "()[Ljava/lang/String;", false);
             mv.visitVarInsn(Opcodes.ASTORE, 1);
@@ -1264,7 +1264,7 @@ public final class JAXBUtils {
             mv.visitTypeInsn(Opcodes.NEW, "java/util/ArrayList");
             mv.visitInsn(Opcodes.DUP);
             mv.visitVarInsn(Opcodes.ALOAD, 1);
-            mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/Arrays", "asList", 
+            mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/Arrays", "asList",
                                "([Ljava/lang/Object;)Ljava/util/List;", false);
             mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/util/ArrayList", "<init>", "(Ljava/util/Collection;)V", false);
             mv.visitVarInsn(Opcodes.ASTORE, 2);
@@ -1297,7 +1297,7 @@ public final class JAXBUtils {
             mv.visitVarInsn(Opcodes.ILOAD, 3);
             mv.visitVarInsn(Opcodes.ALOAD, 0);
             mv.visitFieldInsn(Opcodes.GETFIELD,
-                              slashedName, 
+                              slashedName,
                               "nsctxt", "[Ljava/lang/String;");
             mv.visitInsn(Opcodes.ARRAYLENGTH);
             mv.visitJumpInsn(Opcodes.IF_ICMPLT, l7);
@@ -1308,7 +1308,7 @@ public final class JAXBUtils {
             mv.visitVarInsn(Opcodes.ALOAD, 2);
             mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", "size", "()I", true);
             mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/String");
-            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List", 
+            mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/List",
                                "toArray", "([Ljava/lang/Object;)[Ljava/lang/Object;", true);
             mv.visitTypeInsn(Opcodes.CHECKCAST, "[Ljava/lang/String;");
             mv.visitInsn(Opcodes.ARETURN);
@@ -1336,14 +1336,14 @@ public final class JAXBUtils {
         }
     }
 
-    private static Class<?> createNamespaceWrapperInternal(ASMHelper helper, ClassWriter cw, 
+    private static Class<?> createNamespaceWrapperInternal(ASMHelper helper, ClassWriter cw,
                                                            String postFix, Class<?> ref) {
         String className = "org.apache.cxf.jaxb.NamespaceMapper" + postFix;
-        String superName = "com/sun/xml/" 
-            + ("RI".equals(postFix) ? "" : "internal/") 
+        String superName = "com/sun/xml/"
+            + ("RI".equals(postFix) ? "" : "internal/")
             + "bind/marshaller/NamespacePrefixMapper";
         String postFixedName = "org/apache/cxf/jaxb/NamespaceMapper" + postFix;
-        
+
         FieldVisitor fv;
         MethodVisitor mv;
 
@@ -1354,7 +1354,7 @@ public final class JAXBUtils {
 
         cw.visitSource("NamespaceMapper.java", null);
 
-        fv = cw.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL, 
+        fv = cw.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL,
                            "nspref", "Ljava/util/Map;",
                            "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", null);
         fv.visitEnd();
@@ -1362,10 +1362,10 @@ public final class JAXBUtils {
         fv = cw.visitField(Opcodes.ACC_PRIVATE, "nsctxt", "[Ljava/lang/String;", null, null);
         fv.visitEnd();
 
-        fv = cw.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL + Opcodes.ACC_STATIC, 
+        fv = cw.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL + Opcodes.ACC_STATIC,
                            "EMPTY_STRING", "[Ljava/lang/String;", null, null);
         fv.visitEnd();
-        
+
         mv = cw.visitMethod(Opcodes.ACC_STATIC, "<clinit>", "()V", null, null);
         mv.visitCode();
         Label l0 = helper.createLabel();
@@ -1406,8 +1406,8 @@ public final class JAXBUtils {
         Label l4 = helper.createLabel();
         mv.visitLabel(l4);
         mv.visitLocalVariable("this", "L" + postFixedName + ";", null, l0, l4, 0);
-        mv.visitLocalVariable("nspref", 
-                              "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", 
+        mv.visitLocalVariable("nspref",
+                              "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;",
                               l0, l4, 1);
         mv.visitMaxs(2, 2);
         mv.visitEnd();
@@ -1422,7 +1422,7 @@ public final class JAXBUtils {
         mv.visitVarInsn(Opcodes.ALOAD, 0);
         mv.visitFieldInsn(Opcodes.GETFIELD, postFixedName, "nspref", "Ljava/util/Map;");
         mv.visitVarInsn(Opcodes.ALOAD, 1);
-        mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/Map", 
+        mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/Map",
                            "get", "(Ljava/lang/Object;)Ljava/lang/Object;", true);
         mv.visitTypeInsn(Opcodes.CHECKCAST, "java/lang/String");
         mv.visitVarInsn(Opcodes.ASTORE, 4);
@@ -1483,7 +1483,7 @@ public final class JAXBUtils {
 
         mv.visitLabel(l1);
         mv.visitLocalVariable("this", "L" + postFixedName + ";", null, l0, l1, 0);
-        
+
         mv.visitMaxs(1, 1);
         mv.visitEnd();
 
@@ -1494,7 +1494,7 @@ public final class JAXBUtils {
                                 ref, bts);
     }
     //CHECKSTYLE:ON
-    
+
     public static JAXBContextProxy createJAXBContextProxy(final JAXBContext ctx) {
         return createJAXBContextProxy(ctx, null, null);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/jaxb/NamespaceMapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/jaxb/NamespaceMapper.java b/core/src/main/java/org/apache/cxf/common/jaxb/NamespaceMapper.java
index 20b313d..610d1af 100644
--- a/core/src/main/java/org/apache/cxf/common/jaxb/NamespaceMapper.java
+++ b/core/src/main/java/org/apache/cxf/common/jaxb/NamespaceMapper.java
@@ -34,8 +34,8 @@ public final class NamespaceMapper extends NamespacePrefixMapper {
         this.nspref = nspref;
     }
 
-    public String getPreferredPrefix(String namespaceUri, 
-                                     String suggestion, 
+    public String getPreferredPrefix(String namespaceUri,
+                                     String suggestion,
                                      boolean requirePrefix) {
         String prefix = nspref.get(namespaceUri);
         if (prefix != null) {
@@ -51,6 +51,6 @@ public final class NamespaceMapper extends NamespacePrefixMapper {
     public String[] getContextualNamespaceDecls() {
         return nsctxt;
     }
-    
-    
+
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/jaxb/SchemaCollectionContextProxy.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/jaxb/SchemaCollectionContextProxy.java b/core/src/main/java/org/apache/cxf/common/jaxb/SchemaCollectionContextProxy.java
index 5091235..9d91286 100644
--- a/core/src/main/java/org/apache/cxf/common/jaxb/SchemaCollectionContextProxy.java
+++ b/core/src/main/java/org/apache/cxf/common/jaxb/SchemaCollectionContextProxy.java
@@ -50,16 +50,16 @@ import org.apache.ws.commons.schema.XmlSchemaType;
 import org.apache.ws.commons.schema.constants.Constants;
 
 /**
- * 
+ *
  */
 public class SchemaCollectionContextProxy implements JAXBContextProxy {
     private static final Map<Class<?>, QName> TYPE_MAP = new HashMap<Class<?>, QName>();
-    
+
     final JAXBContext context;
     final SchemaCollection schemas;
     final String defaultNamespace;
-    
-    
+
+
     static {
         defaultRegister(BigDecimal.class, Constants.XSD_DECIMAL);
         defaultRegister(BigInteger.class, Constants.XSD_INTEGER);
@@ -79,7 +79,7 @@ public class SchemaCollectionContextProxy implements JAXBContextProxy {
         defaultRegister(Timestamp.class, Constants.XSD_DATETIME);
         defaultRegister(URI.class, Constants.XSD_ANYURI);
         defaultRegister(XMLStreamReader.class, Constants.XSD_ANYTYPE);
-        
+
         defaultRegister(boolean.class, Constants.XSD_BOOLEAN);
         defaultRegister(Date.class, Constants.XSD_DATETIME);
         defaultRegister(Float.class, Constants.XSD_FLOAT);
@@ -95,7 +95,7 @@ public class SchemaCollectionContextProxy implements JAXBContextProxy {
         defaultRegister(Timestamp.class, Constants.XSD_DATETIME);
         defaultRegister(URI.class, Constants.XSD_ANYURI);
         defaultRegister(XMLStreamReader.class, Constants.XSD_ANYTYPE);
-        
+
         defaultRegister(boolean.class, Constants.XSD_BOOLEAN);
         defaultRegister(byte[].class, Constants.XSD_BASE64);
         defaultRegister(double.class, Constants.XSD_DOUBLE);
@@ -113,7 +113,7 @@ public class SchemaCollectionContextProxy implements JAXBContextProxy {
         defaultRegister(DataHandler.class, Constants.XSD_BASE64);
         defaultRegister(Document.class, Constants.XSD_ANYTYPE);
     }
-    
+
     public SchemaCollectionContextProxy(JAXBContext ctx, SchemaCollection c, String defaultNs) {
         schemas = c;
         context = ctx;
@@ -143,7 +143,7 @@ public class SchemaCollectionContextProxy implements JAXBContextProxy {
             if (sc != null) {
                 namespace = sc.namespace();
             }
-        }        
+        }
         if ("##default".equals(namespace) || StringUtils.isEmpty(namespace)) {
             namespace = JAXBUtils.getPackageNamespace(cls);
             if (namespace == null) {
@@ -174,7 +174,7 @@ public class SchemaCollectionContextProxy implements JAXBContextProxy {
             return null;
         }
         final QName typeName = type == null ? null : type.getQName();
-        
+
         JAXBBeanInfo bi = new JAXBBeanInfo() {
             public boolean isElement() {
                 return el == null ? false : true;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/logging/AbstractDelegatingLogger.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/logging/AbstractDelegatingLogger.java b/core/src/main/java/org/apache/cxf/common/logging/AbstractDelegatingLogger.java
index 5bd5347..8d7c0dd 100644
--- a/core/src/main/java/org/apache/cxf/common/logging/AbstractDelegatingLogger.java
+++ b/core/src/main/java/org/apache/cxf/common/logging/AbstractDelegatingLogger.java
@@ -128,7 +128,7 @@ public abstract class AbstractDelegatingLogger extends Logger {
         }
     }
 
-    public void logrb(Level level, String sourceClass, String sourceMethod, 
+    public void logrb(Level level, String sourceClass, String sourceMethod,
                       String bundleName, String msg, Object param1) {
         if (isLoggable(level)) {
             LogRecord lr = new LogRecord(level, msg);
@@ -140,7 +140,7 @@ public abstract class AbstractDelegatingLogger extends Logger {
         }
     }
 
-    public void logrb(Level level, String sourceClass, String sourceMethod, 
+    public void logrb(Level level, String sourceClass, String sourceMethod,
                       String bundleName, String msg, Object params[]) {
         if (isLoggable(level)) {
             LogRecord lr = new LogRecord(level, msg);
@@ -151,7 +151,7 @@ public abstract class AbstractDelegatingLogger extends Logger {
         }
     }
 
-    public void logrb(Level level, String sourceClass, String sourceMethod, 
+    public void logrb(Level level, String sourceClass, String sourceMethod,
                       String bundleName, String msg, Throwable thrown) {
         if (isLoggable(level)) {
             LogRecord lr = new LogRecord(level, msg);
@@ -278,7 +278,7 @@ public abstract class AbstractDelegatingLogger extends Logger {
     protected boolean supportsHandlers() {
         return false;
     }
-    
+
     public synchronized void addHandler(Handler handler) throws SecurityException {
         if (supportsHandlers()) {
             super.addHandler(handler);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java b/core/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
index 1ab35c2..3e579ab 100644
--- a/core/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
+++ b/core/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
@@ -40,19 +40,19 @@ import org.apache.cxf.common.util.StringUtils;
  * This is called from LogUtils as LogUtils is almost always one of the VERY
  * first classes loaded in CXF so we can try and register to hacks/workarounds
  * for various bugs in the JDK.
- * 
+ *
  * Much of this is taken from work the Tomcat folks have done to find
  * places where memory leaks and jars are locked and such.
  * See:
  * http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/
  * core/JreMemoryLeakPreventionListener.java
- * 
+ *
  */
 final class JDKBugHacks {
     private JDKBugHacks() {
         //not constructed
     }
-    
+
     private static boolean skipHack(final String key) {
         return skipHack(key, "false");
     }
@@ -87,11 +87,11 @@ final class JDKBugHacks {
         }
         return Boolean.parseBoolean(cname);
     }
-    
+
     public static void doHacks() {
         if (skipHack("org.apache.cxf.JDKBugHacks.all")) {
             return;
-        }                
+        }
         try {
             // Use the system classloader as the victim for all this
             // ClassLoader pinning we're about to do.
@@ -132,12 +132,12 @@ final class JDKBugHacks {
                                 new Class[] {Long.TYPE});
                             method.invoke(null, Long.valueOf(36000000));
                         }
-                    }                    
+                    }
                 } catch (Throwable e) {
                     //ignore
                 }
-                
-                // Calling getPolicy retains a static reference to the context 
+
+                // Calling getPolicy retains a static reference to the context
                 // class loader.
                 try {
                     // Policy.getPolicy();
@@ -151,10 +151,10 @@ final class JDKBugHacks {
                     // ignore
                 }
                 try {
-                    // Initializing javax.security.auth.login.Configuration retains a static reference 
+                    // Initializing javax.security.auth.login.Configuration retains a static reference
                     // to the context class loader.
                     if (!skipHack("org.apache.cxf.JDKBugHacks.authConfiguration")) {
-                        Class.forName("javax.security.auth.login.Configuration", true, 
+                        Class.forName("javax.security.auth.login.Configuration", true,
                                       ClassLoader.getSystemClassLoader());
                     }
                 } catch (Throwable e) {
@@ -167,7 +167,7 @@ final class JDKBugHacks {
                 if (!skipHack("org.apache.cxf.JDKBugHacks.securityProviders")) {
                     java.security.Security.getProviders();
                 }
-                
+
                 try {
                     // Several components end up opening JarURLConnections without first
                     // disabling caching. This effectively locks the file.
@@ -186,7 +186,7 @@ final class JDKBugHacks {
                     }
                 } catch (Throwable e) {
                     //ignore
-                }                
+                }
             } finally {
                 if (orig != null) {
                     orig.reset();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/logging/Log4jLogger.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/logging/Log4jLogger.java b/core/src/main/java/org/apache/cxf/common/logging/Log4jLogger.java
index ae3aa0f..a727ae6 100644
--- a/core/src/main/java/org/apache/cxf/common/logging/Log4jLogger.java
+++ b/core/src/main/java/org/apache/cxf/common/logging/Log4jLogger.java
@@ -42,14 +42,14 @@ import org.apache.log4j.spi.LoggingEvent;
  *   setUseParentHandlers / getUseParentHandlers
  */
 public class Log4jLogger extends AbstractDelegatingLogger {
-    private static final Map<Level, org.apache.log4j.Level> TO_LOG4J = 
+    private static final Map<Level, org.apache.log4j.Level> TO_LOG4J =
                                                 new HashMap<Level, org.apache.log4j.Level>();
     private static final org.apache.log4j.Level TRACE;
 
 
     private final org.apache.log4j.Logger log;
 
-    static {        
+    static {
         //older versions of log4j don't have TRACE, use debug
         org.apache.log4j.Level t = org.apache.log4j.Level.DEBUG;
         try {
@@ -59,7 +59,7 @@ public class Log4jLogger extends AbstractDelegatingLogger {
             //ignore, assume old version of log4j
         }
         TRACE = t;
-        
+
         TO_LOG4J.put(Level.ALL,     org.apache.log4j.Level.ALL);
         TO_LOG4J.put(Level.SEVERE,  org.apache.log4j.Level.ERROR);
         TO_LOG4J.put(Level.WARNING, org.apache.log4j.Level.WARN);
@@ -83,11 +83,11 @@ public class Log4jLogger extends AbstractDelegatingLogger {
         }
         return null;
     }
-    
+
     public void setLevel(Level newLevel) throws SecurityException {
         log.setLevel(TO_LOG4J.get(newLevel));
     }
-    
+
     public synchronized void addHandler(Handler handler) throws SecurityException {
         log.addAppender(new HandlerWrapper(handler));
     }
@@ -105,7 +105,7 @@ public class Log4jLogger extends AbstractDelegatingLogger {
         }
         return ret.toArray(new Handler[ret.size()]);
     }
-    
+
     protected void internalLogFormatted(String msg, LogRecord record) {
         log.log(AbstractDelegatingLogger.class.getName(),
                 TO_LOG4J.get(record.getLevel()),
@@ -142,19 +142,19 @@ public class Log4jLogger extends AbstractDelegatingLogger {
             if (l.toInt() == TRACE.toInt()) {
                 l2 = Level.FINEST;
             }
-        } 
+        }
         return l2;
-    } 
-    
-    
+    }
+
+
     private class HandlerWrapper extends AppenderSkeleton {
         Handler handler;
-        
+
         HandlerWrapper(Handler h) {
             handler = h;
-            name = "HandlerWrapper-" + h.hashCode(); 
+            name = "HandlerWrapper-" + h.hashCode();
         }
-        
+
         public Handler getHandler() {
             return handler;
         }
@@ -183,8 +183,8 @@ public class Log4jLogger extends AbstractDelegatingLogger {
 
         public boolean requiresLayout() {
             return false;
-        }    
-        
+        }
+
         @Override
         public Priority getThreshold() {
             return TO_LOG4J.get(handler.getLevel());
@@ -193,7 +193,7 @@ public class Log4jLogger extends AbstractDelegatingLogger {
         public boolean isAsSevereAsThreshold(Priority priority) {
             Priority p = getThreshold();
             return (p == null) || priority.isGreaterOrEqual(p);
-        }        
+        }
     }
     private static void getFullInfoForLogUtils(LogRecord lr, String cname) {
         StackTraceElement el[] = Thread.currentThread().getStackTrace();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/logging/LogUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/logging/LogUtils.java b/core/src/main/java/org/apache/cxf/common/logging/LogUtils.java
index 83faf0f..4195913 100644
--- a/core/src/main/java/org/apache/cxf/common/logging/LogUtils.java
+++ b/core/src/main/java/org/apache/cxf/common/logging/LogUtils.java
@@ -43,7 +43,7 @@ import org.apache.cxf.common.util.StringUtils;
  * application must provide an object that extends {@link AbstractDelegatingLogger}, and advertise that class
  * via one of the following mechanisms:
  * <ul>
- * <li>Create a file, in the classpath, named META-INF/cxf/org.apache.cxf.Logger. 
+ * <li>Create a file, in the classpath, named META-INF/cxf/org.apache.cxf.Logger.
  * This file should contain the fully-qualified name
  * of the class, with no comments, on a single line.</li>
  * <li>Call {@link #setLoggerClass(Class)} with a Class<?> reference to the logger class.</li>
@@ -52,12 +52,12 @@ import org.apache.cxf.common.util.StringUtils;
  */
 public final class LogUtils {
     public static final String KEY = "org.apache.cxf.Logger";
-    
+
     private static final Object[] NO_PARAMETERS = new Object[0];
 
-    
+
     private static Class<?> loggerClass;
-    
+
     /**
      * Prevents instantiation.
      */
@@ -66,9 +66,9 @@ public final class LogUtils {
 
     static {
         JDKBugHacks.doHacks();
-        
+
         try {
-            
+
             String cname = null;
             try {
                 cname = AccessController.doPrivileged(new PrivilegedAction<String>() {
@@ -98,12 +98,12 @@ public final class LogUtils {
                     // as we'll just use j.u.l and pax-logging will pick it up fine
                     // If we don't call this and there isn't a slf4j impl avail,
                     // you get warnings printed to stderr about NOPLoggers and such
-                    Class.forName("org.slf4j.impl.StaticLoggerBinder");  
+                    Class.forName("org.slf4j.impl.StaticLoggerBinder");
                     Class<?> cls = Class.forName("org.slf4j.LoggerFactory");
                     Class<?> fcls = cls.getMethod("getILoggerFactory").invoke(null).getClass();
                     String clsName = fcls.getName();
                     if (clsName.contains("NOPLogger")) {
-                        //no real slf4j implementation, use j.u.l 
+                        //no real slf4j implementation, use j.u.l
                         cname = null;
                     } else if (clsName.contains("Log4j")) {
                         cname = "org.apache.cxf.common.logging.Log4jLogger";
@@ -115,7 +115,7 @@ public final class LogUtils {
                         }
                     } else if (clsName.contains("JDK14")
                         || clsName.contains("pax.logging")) {
-                        //both of these we can use the appropriate j.u.l API's 
+                        //both of these we can use the appropriate j.u.l API's
                         //directly and have it work properly
                         cname = null;
                     } else {
@@ -142,8 +142,8 @@ public final class LogUtils {
             loggerClass = null;
         }
     }
-    
-    
+
+
     /**
      * Specify a logger class that inherits from {@link AbstractDelegatingLogger}.
      * Enable users to use their own logger implementation.
@@ -152,23 +152,23 @@ public final class LogUtils {
         loggerClass = cls;
     }
 
-    
+
     /**
      * Get a Logger with the associated default resource bundle for the class.
      *
      * @param cls the Class to contain the Logger
-     * @return an appropriate Logger 
+     * @return an appropriate Logger
      */
     public static Logger getLogger(Class<?> cls) {
         return createLogger(cls, null, cls.getName());
     }
-    
+
     /**
      * Get a Logger with an associated resource bundle.
      *
      * @param cls the Class to contain the Logger
      * @param resourcename the resource name
-     * @return an appropriate Logger 
+     * @return an appropriate Logger
      */
     public static Logger getLogger(Class<?> cls, String resourcename) {
         return createLogger(cls, resourcename, cls.getName());
@@ -180,7 +180,7 @@ public final class LogUtils {
      * @param cls the Class to contain the Logger (to find resources)
      * @param resourcename the resource name
      * @param loggerName the full name for the logger
-     * @return an appropriate Logger 
+     * @return an appropriate Logger
      */
     public static Logger getLogger(Class<?> cls,
                                      String resourcename,
@@ -192,18 +192,18 @@ public final class LogUtils {
      * Get a Logger with the associated default resource bundle for the class.
      *
      * @param cls the Class to contain the Logger
-     * @return an appropriate Logger 
+     * @return an appropriate Logger
      */
     public static Logger getL7dLogger(Class<?> cls) {
         return createLogger(cls, null, cls.getName());
     }
-    
+
     /**
      * Get a Logger with an associated resource bundle.
      *
      * @param cls the Class to contain the Logger
      * @param resourcename the resource name
-     * @return an appropriate Logger 
+     * @return an appropriate Logger
      */
     public static Logger getL7dLogger(Class<?> cls, String resourcename) {
         return createLogger(cls, resourcename, cls.getName());
@@ -215,19 +215,19 @@ public final class LogUtils {
      * @param cls the Class to contain the Logger (to find resources)
      * @param resourcename the resource name
      * @param loggerName the full name for the logger
-     * @return an appropriate Logger 
+     * @return an appropriate Logger
      */
     public static Logger getL7dLogger(Class<?> cls,
                                       String resourcename,
                                       String loggerName) {
         return createLogger(cls, resourcename, loggerName);
     }
-    
+
     /**
      * Create a logger
      */
-    protected static Logger createLogger(Class<?> cls, 
-                                         String name, 
+    protected static Logger createLogger(Class<?> cls,
+                                         String name,
                                          String loggerName) {
         ClassLoader orig = Thread.currentThread().getContextClassLoader();
         ClassLoader n = cls.getClassLoader();
@@ -239,7 +239,7 @@ public final class LogUtils {
             Logger logger = null;
             ResourceBundle b = null;
             if (bundleName == null) {
-                //grab the bundle prior to the call to Logger.getLogger(...) so the 
+                //grab the bundle prior to the call to Logger.getLogger(...) so the
                 //ResourceBundle can be loaded outside the big sync block that getLogger really is
                 bundleName = BundleUtils.getBundleName(cls);
                 try {
@@ -258,7 +258,7 @@ public final class LogUtils {
             if (b != null) {
                 b.getLocale();
             }
-            
+
             if (loggerClass != null) {
                 try {
                     Constructor<?> cns = loggerClass.getConstructor(String.class, String.class);
@@ -271,7 +271,7 @@ public final class LogUtils {
                             } else {
                                 throw ite;
                             }
-                        } 
+                        }
                     } else {
                         try {
                             return (Logger) cns.newInstance(loggerName, bundleName);
@@ -281,13 +281,13 @@ public final class LogUtils {
                             } else {
                                 throw ite;
                             }
-                        } 
+                        }
                     }
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                 }
             }
-                
+
             try {
                 logger = Logger.getLogger(loggerName, bundleName); //NOPMD
             } catch (IllegalArgumentException iae) {
@@ -305,7 +305,7 @@ public final class LogUtils {
             }
         }
     }
-    
+
     private static void setContextClassLoader(final ClassLoader classLoader) {
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
@@ -324,13 +324,13 @@ public final class LogUtils {
      * @param throwable the Throwable to log
      * @param parameter the parameter to substitute into message
      */
-    public static void log(Logger logger, 
-                           Level level, 
-                           String message, 
+    public static void log(Logger logger,
+                           Level level,
+                           String message,
                            Throwable throwable,
                            Object parameter) {
         if (logger.isLoggable(level)) {
-            final String formattedMessage = 
+            final String formattedMessage =
                 MessageFormat.format(localize(logger, message), parameter);
             doLog(logger, level, formattedMessage, throwable);
         }
@@ -345,31 +345,31 @@ public final class LogUtils {
      * @param throwable the Throwable to log
      * @param parameters the parameters to substitute into message
      */
-    public static void log(Logger logger, 
-                           Level level, 
-                           String message, 
+    public static void log(Logger logger,
+                           Level level,
+                           String message,
                            Throwable throwable,
                            Object... parameters) {
         if (logger.isLoggable(level)) {
-            final String formattedMessage = 
+            final String formattedMessage =
                 MessageFormat.format(localize(logger, message), parameters);
             doLog(logger, level, formattedMessage, throwable);
         }
     }
- 
+
     /**
      * Checks log level and logs
      *
      * @param logger the Logger the log to
      * @param level the severity level
      * @param message the log message
-     */    
-    public static void log(Logger logger, 
-                           Level level, 
+     */
+    public static void log(Logger logger,
+                           Level level,
                            String message) {
-        log(logger, level, message, NO_PARAMETERS);        
-    }  
-    
+        log(logger, level, message, NO_PARAMETERS);
+    }
+
     /**
      * Checks log level and logs
      *
@@ -377,14 +377,14 @@ public final class LogUtils {
      * @param level the severity level
      * @param message the log message
      * @param throwable the Throwable to log
-     */      
-    public static void log(Logger logger, 
-                           Level level, 
-                           String message, 
+     */
+    public static void log(Logger logger,
+                           Level level,
+                           String message,
                            Throwable throwable) {
         log(logger, level, message, throwable, NO_PARAMETERS);
     }
-  
+
     /**
      * Checks log level and logs
      *
@@ -392,14 +392,14 @@ public final class LogUtils {
      * @param level the severity level
      * @param message the log message
      * @param parameter the parameter to substitute into message
-     */      
-    public static void log(Logger logger, 
-                           Level level, 
-                           String message, 
+     */
+    public static void log(Logger logger,
+                           Level level,
+                           String message,
                            Object parameter) {
         log(logger, level, message, new Object[] {parameter});
     }
-    
+
     /**
      * Checks log level and logs
      *
@@ -407,10 +407,10 @@ public final class LogUtils {
      * @param level the severity level
      * @param message the log message
      * @param parameters the parameters to substitute into message
-     */      
-    public static void log(Logger logger, 
-                           Level level, 
-                           String message, 
+     */
+    public static void log(Logger logger,
+                           Level level,
+                           String message,
                            Object[] parameters) {
         if (logger.isLoggable(level)) {
             String msg = localize(logger, message);
@@ -420,20 +420,20 @@ public final class LogUtils {
                 //ignore, log as is
             }
             doLog(logger, level, msg, null);
-        }        
+        }
     }
 
     private static void doLog(Logger log, Level level, String msg, Throwable t) {
         LogRecord record = new LogRecord(level, msg);
-    
+
         record.setLoggerName(log.getName());
         record.setResourceBundleName(log.getResourceBundleName());
         record.setResourceBundle(log.getResourceBundle());
-            
+
         if (t != null) {
             record.setThrown(t);
         }
-        
+
         //try to get the right class name/method name - just trace
         //back the stack till we get out of this class
         StackTraceElement stack[] = (new Throwable()).getStackTrace();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java b/core/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java
index 904dcaa..96b8443 100644
--- a/core/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java
+++ b/core/src/main/java/org/apache/cxf/common/logging/Slf4jLogger.java
@@ -36,7 +36,7 @@ import org.slf4j.spi.LocationAwareLogger;
  * <p>
  * Level mapping inspired by {@link org.slf4j.bridge.SLF4JBridgeHandler}:
  * </p>
- * 
+ *
  * <pre>
  * FINEST  -&gt; TRACE
  * FINER   -&gt; DEBUG
@@ -53,7 +53,7 @@ public class Slf4jLogger extends AbstractDelegatingLogger {
 
     private final org.slf4j.Logger logger;
     private LocationAwareLogger locationAwareLogger;
-    
+
 
     public Slf4jLogger(String name, String resourceBundleName) {
         super(name, resourceBundleName);
@@ -111,7 +111,7 @@ public class Slf4jLogger extends AbstractDelegatingLogger {
 
         Level level = record.getLevel();
         Throwable t = record.getThrown();
-        
+
         Handler targets[] = getHandlers();
         if (targets != null) {
             for (Handler h : targets) {
@@ -121,7 +121,7 @@ public class Slf4jLogger extends AbstractDelegatingLogger {
         if (!getUseParentHandlers()) {
             return;
         }
-        
+
         /*
          * As we can not use a "switch ... case" block but only a "if ... else if ..." block, the order of the
          * comparisons is important. We first try log level FINE then INFO, WARN, FINER, etc

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/security/SimpleGroup.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/security/SimpleGroup.java b/core/src/main/java/org/apache/cxf/common/security/SimpleGroup.java
index f1ecd34..c6814e9 100644
--- a/core/src/main/java/org/apache/cxf/common/security/SimpleGroup.java
+++ b/core/src/main/java/org/apache/cxf/common/security/SimpleGroup.java
@@ -30,19 +30,19 @@ import java.util.Set;
  *
  */
 public class SimpleGroup extends SimplePrincipal implements Group {
-    
+
     private static final long serialVersionUID = 1L;
     private Set<Principal> members = new HashSet<>();
-    
+
     public SimpleGroup(String groupName) {
         super(groupName);
     }
-    
+
     public SimpleGroup(String groupName, String memberName) {
         super(groupName);
         members.add(new SimplePrincipal(memberName));
     }
-    
+
     public SimpleGroup(String groupName, Principal member) {
         super(groupName);
         members.add(member);
@@ -55,11 +55,11 @@ public class SimpleGroup extends SimplePrincipal implements Group {
     public boolean addMember(Principal p) {
         return members.add(p);
     }
-    
+
     public Enumeration<? extends Principal> members() {
-        
+
         final Iterator<Principal> it = members.iterator();
-        
+
         return new Enumeration<Principal>() {
 
             public boolean hasMoreElements() {
@@ -69,14 +69,14 @@ public class SimpleGroup extends SimplePrincipal implements Group {
             public Principal nextElement() {
                 return it.next();
             }
-            
+
         };
     }
 
     public boolean removeMember(Principal p) {
         return members.remove(p);
     }
-    
+
     public boolean equals(Object obj) {
         if (!(obj instanceof SimpleGroup)) {
             return false;
@@ -84,7 +84,7 @@ public class SimpleGroup extends SimplePrincipal implements Group {
         SimpleGroup other = (SimpleGroup)obj;
         return members.equals(other.members) && super.equals(obj);
     }
-    
+
     public int hashCode() {
         return getName().hashCode() + 37 * members.hashCode();
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/security/SimplePrincipal.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/security/SimplePrincipal.java b/core/src/main/java/org/apache/cxf/common/security/SimplePrincipal.java
index c150006..9413c59 100644
--- a/core/src/main/java/org/apache/cxf/common/security/SimplePrincipal.java
+++ b/core/src/main/java/org/apache/cxf/common/security/SimplePrincipal.java
@@ -27,32 +27,32 @@ import java.security.Principal;
  */
 public class SimplePrincipal implements Principal, Serializable {
     private static final long serialVersionUID = -5171549568204891853L;
-    
+
     private String name;
-    
+
     public SimplePrincipal(String name) {
         if (name == null) {
             throw new IllegalArgumentException("Principal name can not be null");
         }
         this.name = name;
     }
-    
+
     public String getName() {
         return name;
     }
-    
+
     public boolean equals(Object obj) {
         if (!(obj instanceof SimplePrincipal)) {
             return false;
         }
-        
+
         return name.equals(((SimplePrincipal)obj).name);
     }
-    
+
     public int hashCode() {
         return name.hashCode();
     }
-    
+
     public String toString() {
         return name;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/security/SimpleSecurityContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/security/SimpleSecurityContext.java b/core/src/main/java/org/apache/cxf/common/security/SimpleSecurityContext.java
index ab5d87d..11b2a8e 100644
--- a/core/src/main/java/org/apache/cxf/common/security/SimpleSecurityContext.java
+++ b/core/src/main/java/org/apache/cxf/common/security/SimpleSecurityContext.java
@@ -30,7 +30,7 @@ public class SimpleSecurityContext implements SecurityContext {
     public SimpleSecurityContext(Principal principal) {
         this.principal = principal;
     }
-    
+
     public Principal getUserPrincipal() {
         return principal;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/security/UsernameToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/security/UsernameToken.java b/core/src/main/java/org/apache/cxf/common/security/UsernameToken.java
index 9f3f0b7..ec5bec2 100644
--- a/core/src/main/java/org/apache/cxf/common/security/UsernameToken.java
+++ b/core/src/main/java/org/apache/cxf/common/security/UsernameToken.java
@@ -26,7 +26,7 @@ public class UsernameToken implements SecurityToken {
     private boolean isHashed;
     private String nonce;
     private String createdTime;
-    
+
     public UsernameToken(String name,
                          String password,
                          String passwordType,
@@ -64,7 +64,7 @@ public class UsernameToken implements SecurityToken {
     public String getCreatedTime() {
         return createdTime;
     }
-    
+
     public TokenType getTokenType() {
         return TokenType.UsernameToken;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java b/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
index 2287625..b83742d 100644
--- a/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
+++ b/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
@@ -40,15 +40,15 @@ public class ASMHelper {
     protected static final Map<Class<?>, String> PRIMITIVE_MAP = new HashMap<Class<?>, String>();
     protected static final Map<Class<?>, String> NONPRIMITIVE_MAP = new HashMap<Class<?>, String>();
     protected static final Map<Class<?>, Integer> PRIMITIVE_ZERO_MAP = new HashMap<Class<?>, Integer>();
-    
-    protected static final Map<ClassLoader, WeakReference<TypeHelperClassLoader>> LOADER_MAP 
+
+    protected static final Map<ClassLoader, WeakReference<TypeHelperClassLoader>> LOADER_MAP
         = new WeakIdentityHashMap<ClassLoader, WeakReference<TypeHelperClassLoader>>();
-    protected static final Map<Class<?>, WeakReference<TypeHelperClassLoader>> CLASS_MAP 
+    protected static final Map<Class<?>, WeakReference<TypeHelperClassLoader>> CLASS_MAP
         = new WeakIdentityHashMap<Class<?>, WeakReference<TypeHelperClassLoader>>();
-    
+
     protected static boolean badASM;
     private static Class<?> cwClass;
-    
+
     static {
         PRIMITIVE_MAP.put(Byte.TYPE, "B");
         PRIMITIVE_MAP.put(Boolean.TYPE, "Z");
@@ -68,12 +68,12 @@ public class ASMHelper {
         NONPRIMITIVE_MAP.put(Float.TYPE, Float.class.getName().replaceAll("\\.", "/"));
         NONPRIMITIVE_MAP.put(Double.TYPE, Double.class.getName().replaceAll("\\.", "/"));
     }
-    
+
     private static void tryClass(String s) {
         if (cwClass == null) {
             try {
                 Class<?> c2 = ClassLoaderUtils.loadClass(s, ASMHelper.class);
-                
+
                 //old versions don't have this, but we need it
                 Class<?> cls = ClassLoaderUtils.loadClass(c2.getPackage().getName() + ".MethodVisitor", c2);
                 cls.getMethod("visitFrame", Integer.TYPE, Integer.TYPE,
@@ -88,14 +88,14 @@ public class ASMHelper {
         //force this to make sure the proper OSGi import is generated
         return org.objectweb.asm.ClassWriter.class;
     }
-    
+
     private static synchronized Class<?> getASMClass() throws ClassNotFoundException {
         if (cwClass == null) {
             //try the "real" asm first, then the others
-            tryClass("org.objectweb.asm.ClassWriter"); 
-            tryClass("org.apache.xbean.asm5.ClassWriter"); 
-            tryClass("org.apache.xbean.asm4.ClassWriter"); 
-            tryClass("org.apache.xbean.asm.ClassWriter"); 
+            tryClass("org.objectweb.asm.ClassWriter");
+            tryClass("org.apache.xbean.asm5.ClassWriter");
+            tryClass("org.apache.xbean.asm4.ClassWriter");
+            tryClass("org.apache.xbean.asm.ClassWriter");
             tryClass("org.springframework.asm.ClassWriter");
             if (cwClass == null) {
                 cwClass = getASMClassWriterClass();
@@ -103,11 +103,11 @@ public class ASMHelper {
         }
         return cwClass;
     }
-    
+
     public static class Opcodes {
         //CHECKSTYLE:OFF
         //Will use reflection to set these based on the package name and such
-        //so we don't want them "final" or the compiler will optimize them out 
+        //so we don't want them "final" or the compiler will optimize them out
         //to just "0" which we really don't want
         public static int ARETURN = 0;
         public static int ALOAD = 0;
@@ -158,7 +158,7 @@ public class ASMHelper {
         public static int DCONST_0;
         public static int IF_ICMPLT = 0;
         public static java.lang.Integer INTEGER;
-        
+
         //CHECKSTYLE:ON
         static {
             try {
@@ -171,7 +171,7 @@ public class ASMHelper {
             } catch (Throwable e) {
                 //ignore
             }
-            
+
             PRIMITIVE_ZERO_MAP.put(Byte.TYPE, Opcodes.ICONST_0);
             PRIMITIVE_ZERO_MAP.put(Boolean.TYPE, Opcodes.ICONST_0);
             PRIMITIVE_ZERO_MAP.put(Long.TYPE, Opcodes.LCONST_0);
@@ -182,7 +182,7 @@ public class ASMHelper {
             PRIMITIVE_ZERO_MAP.put(Double.TYPE, Opcodes.DCONST_0);
         }
     }
-    
+
     protected static String getMethodSignature(Method m) {
         StringBuilder buf = new StringBuilder("(");
         for (Class<?> cl : m.getParameterTypes()) {
@@ -190,10 +190,10 @@ public class ASMHelper {
         }
         buf.append(")");
         buf.append(getClassCode(m.getReturnType()));
-        
+
         return buf.toString();
     }
-    
+
     public static String periodToSlashes(String s) {
         char ch[] = s.toCharArray();
         for (int x = 0; x < ch.length; x++) {
@@ -203,8 +203,8 @@ public class ASMHelper {
         }
         return new String(ch);
     }
-    
-    
+
+
     public static String getClassCode(Class<?> cl) {
         if (cl == Void.TYPE) {
             return "V";
@@ -262,7 +262,7 @@ public class ASMHelper {
         return null;
     }
 
-    
+
     public ClassWriter createClassWriter() {
         Object newCw = null;
         if (!badASM) {
@@ -276,13 +276,13 @@ public class ASMHelper {
             }
             try {
                 // ASM 1.5.x/2.x
-                Constructor<?> cons 
+                Constructor<?> cons
                     = cwClass.getConstructor(new Class<?>[] {Boolean.TYPE});
-                
+
                 try {
                     // got constructor, now check if it's 1.x which is very
                     // different from 2.x and 3.x
-                    cwClass.getMethod("newConstInt", new Class<?>[] {Integer.TYPE});               
+                    cwClass.getMethod("newConstInt", new Class<?>[] {Integer.TYPE});
                     // newConstInt was removed in 2.x, if we get this far, we're
                     // using 1.5.x,
                     // set to null so we don't attempt to use it.
@@ -290,11 +290,11 @@ public class ASMHelper {
                 } catch (Throwable t) {
                     newCw = cons.newInstance(new Object[] {Boolean.TRUE});
                 }
-                
+
             } catch (Throwable e) {
                 // ASM 3.x/4.x
                 try {
-                    Constructor<?> cons 
+                    Constructor<?> cons
                         = cwClass.getConstructor(new Class<?>[] {Integer.TYPE});
                     int i = cwClass.getField("COMPUTE_MAXS").getInt(null);
                     i |= cwClass.getField("COMPUTE_FRAMES").getInt(null);
@@ -309,8 +309,8 @@ public class ASMHelper {
         }
         return null;
     }
-    
-    
+
+
     public Class<?> loadClass(String className, Class<?> clz, byte[] bytes) {
         TypeHelperClassLoader loader = getTypeHelperClassLoader(clz);
         synchronized (loader) {
@@ -331,15 +331,15 @@ public class ASMHelper {
             return cls;
         }
     }
-    public Class<?> findClass(String className, Class<?> clz) { 
+    public Class<?> findClass(String className, Class<?> clz) {
         TypeHelperClassLoader loader = getTypeHelperClassLoader(clz);
         return loader.lookupDefinedClass(className);
     }
-    public Class<?> findClass(String className, ClassLoader l) { 
+    public Class<?> findClass(String className, ClassLoader l) {
         TypeHelperClassLoader loader = getTypeHelperClassLoader(l);
         return loader.lookupDefinedClass(className);
     }
-    
+
     private static synchronized TypeHelperClassLoader getTypeHelperClassLoader(ClassLoader l) {
         WeakReference<TypeHelperClassLoader> ref = LOADER_MAP.get(l);
         TypeHelperClassLoader ret;
@@ -362,10 +362,10 @@ public class ASMHelper {
         }
         return ret;
     }
-    
+
     public static class TypeHelperClassLoader extends ClassLoader {
         ConcurrentHashMap<String, Class<?>> defined = new ConcurrentHashMap<String, Class<?>>();
-        
+
         TypeHelperClassLoader(ClassLoader parent) {
             super(parent);
         }
@@ -380,7 +380,7 @@ public class ASMHelper {
             }
             return super.findClass(name);
         }
-        
+
         public Class<?> defineClass(String name, byte bytes[]) {
             Class<?> ret = defined.get(name.replace('/', '.'));
             if (ret != null) {
@@ -392,14 +392,14 @@ public class ASMHelper {
                     definePackage(name.substring(0, name.length() - 13).replace('/', '.'),
                                     null,
                                     null,
-                                    null, 
+                                    null,
                                     null,
                                     null,
                                     null,
                                     null);
                 }
             }
-            
+
             ret = super.defineClass(name.replace('/', '.'), bytes, 0, bytes.length);
             Class<?> tmpRet = defined.putIfAbsent(name.replace('/', '.'), ret);
             if (tmpRet != null) {
@@ -457,29 +457,29 @@ public class ASMHelper {
             throw new RuntimeException(e);
         }
     }
-        
+
     public interface ClassWriter {
         @WrapReturn(AnnotationVisitor.class)
         AnnotationVisitor visitAnnotation(String cls, boolean t);
-        
+
         @WrapReturn(FieldVisitor.class)
         FieldVisitor visitField(int accPrivate, String fieldName, String classCode,
                                 String fieldDescriptor, Object object);
-        
+
         void visitEnd();
         byte[] toByteArray();
-        
-        @WrapReturn(MethodVisitor.class)        
-        MethodVisitor visitMethod(int accPublic, String string, String string2, 
+
+        @WrapReturn(MethodVisitor.class)
+        MethodVisitor visitMethod(int accPublic, String string, String string2,
                                   String s3,
                                   String[] s4);
         void visit(int v15, int i, String newClassName, String object, String string, String[] object2);
         void visitSource(String arg0, String arg1);
     }
-    
+
     public interface Label {
     }
-    
+
     public interface FieldVisitor {
         @WrapReturn(AnnotationVisitor.class)
         AnnotationVisitor visitAnnotation(String cls, boolean b);
@@ -494,9 +494,9 @@ public class ASMHelper {
         void visitVarInsn(int aload, int i);
         void visitCode();
         void visitLdcInsn(String sig);
-        void visitLocalVariable(String string, 
+        void visitLocalVariable(String string,
                                 String string2,
-                                String string3, 
+                                String string3,
                                 @UnwrapParam(typeMethodName = "realType") Label lBegin,
                                 @UnwrapParam(typeMethodName = "realType") Label lEnd,
                                 int i);
@@ -509,7 +509,7 @@ public class ASMHelper {
                             String string, String string2);
         void visitJumpInsn(int ifnonnull, @UnwrapParam(typeMethodName = "realType") Label nonNullLabel);
         void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack);
-        
+
         @WrapReturn(AnnotationVisitor.class)
         AnnotationVisitor visitAnnotation(String cls, boolean b);
     }
@@ -523,6 +523,6 @@ public class ASMHelper {
         void visitEnd();
         void visitEnum(String arg0, String arg1, String arg2);
     }
-                                                            
-    
+
+
 }


Mime
View raw message