cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1502270 - in /cxf/trunk: api/src/main/java/org/apache/cxf/common/util/ api/src/main/java/org/apache/cxf/configuration/spring/ rt/core/src/main/java/org/apache/cxf/bus/managers/
Date Thu, 11 Jul 2013 16:20:27 GMT
Author: dkulp
Date: Thu Jul 11 16:20:27 2013
New Revision: 1502270

URL: http://svn.apache.org/r1502270
Log:
Remove some more unused code

Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/JarResource.java
    cxf/trunk/api/src/main/java/org/apache/cxf/configuration/spring/BeanConstants.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StreamPrinter.java
    cxf/trunk/api/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/PhaseManagerImpl.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java?rev=1502270&r1=1502269&r2=1502270&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionUtil.java Thu Jul 11
16:20:27 2013
@@ -21,15 +21,12 @@ package org.apache.cxf.common.util;
 
 import java.beans.BeanInfo;
 import java.beans.PropertyDescriptor;
-import java.io.File;
-import java.io.IOException;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
@@ -137,56 +134,6 @@ public final class ReflectionUtil {
             }
         });
     }
-    public static List<String> getPackagesFromJar(File jarFile) throws IOException
{
-        List<String> packageNames = new ArrayList<String>();
-        if (jarFile.isDirectory()) {
-            getPackageNamesFromDir(jarFile, jarFile, packageNames);
-        } else {
-            JarResource resource = new JarResource();
-            for (String item : resource.getJarContents(jarFile)) {
-                if (!item.endsWith(".class")) {
-                    continue;
-                }
-                String packageName = getPackageName(item);
-                if (!StringUtils.isEmpty(packageName)
-                    && !packageNames.contains(packageName)) {
-                    packageNames.add(packageName);
-                }
-            }
-        }
-        return packageNames;
-    }
-    
-    private static void getPackageNamesFromDir(File base, File dir, List<String> pkgs)
{
-        boolean foundClass = false;
-        for (File file : dir.listFiles()) {
-            if (file.isDirectory()) {
-                getPackageNamesFromDir(base, file, pkgs);
-            } else if (!foundClass && file.getName().endsWith(".class")) {
-                foundClass = true;
-                String pkg = "";
-                file = dir;
-                while (!file.equals(base)) {
-                    if (!"".equals(pkg)) {
-                        pkg = "." + pkg;
-                    }
-                    pkg = file.getName() + pkg;
-                    file = file.getParentFile();
-                }
-                if (!pkgs.contains(pkg)) {
-                    pkgs.add(pkg);
-                }
-            }
-        }
-    }
-
-    private static String getPackageName(String clzName) {
-        if (clzName.indexOf("/") == -1) {
-            return null;
-        }
-        String packageName = clzName.substring(0, clzName.lastIndexOf("/"));
-        return packageName.replace("/", ".");
-    }
     
     /**
      *  create own array of property descriptors to:
@@ -247,45 +194,6 @@ public final class ReflectionUtil {
     }
 
     /**
-     * Try to find a method we can use.   If the object implements a public  
-     * interface that has the public version of that method, we'll use the interface
-     * defined method in case the actual instance class is not public 
-     */
-    public static Method findMethod(Class<?> cls,
-                                    String name,
-                                    Class<?> ... params) {
-        if (cls == null) {
-            return null;
-        }
-        for (Class<?> cs : cls.getInterfaces()) {
-            if (Modifier.isPublic(cs.getModifiers())) {
-                Method m = findMethod(cs, name, params);
-                if (m != null && Modifier.isPublic(m.getModifiers())) {
-                    return m;
-                }
-            }
-        }
-        try {
-            Method m = cls.getDeclaredMethod(name, params);
-            if (m != null && Modifier.isPublic(m.getModifiers())) {
-                return m;
-            }
-        } catch (Exception e) {
-            //ignore
-        }
-        Method m = findMethod(cls.getSuperclass(), name, params);
-        if (m == null) {
-            try {
-                m = cls.getMethod(name, params);
-            } catch (Exception e) {
-                //ignore
-            }
-        }
-        return m;
-    }
-    
-
-    /**
      * Look for a specified annotation on a method. If there, return it. If not, search it's
containing class.
      * Assume that the annotation is marked @Inherited.
      * 

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StreamPrinter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StreamPrinter.java?rev=1502270&r1=1502269&r2=1502270&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StreamPrinter.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StreamPrinter.java Thu Jul 11 16:20:27
2013
@@ -26,14 +26,10 @@ import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.PrintWriter;
 
-public class StreamPrinter extends Thread {
-    InputStream is;
-    String msg;
-    OutputStream os;
-
-    StreamPrinter(InputStream stream, String type) {
-        this(stream, type, null);
-    }
+class StreamPrinter extends Thread {
+    private InputStream is;
+    private String msg;
+    private OutputStream os;
 
     StreamPrinter(InputStream stream, String type, OutputStream redirect) {
         is = stream;

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?rev=1502270&r1=1502269&r2=1502270&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
Thu Jul 11 16:20:27 2013
@@ -178,7 +178,7 @@ public abstract class AbstractBeanDefini
         // REVISIT: use getAttributeNS instead
         
         String id = getIdOrName(elem);
-        String createdFromAPI = elem.getAttribute(BeanConstants.CREATED_FROM_API_ATTR);
+        String createdFromAPI = elem.getAttribute("createdFromAPI");
         
         if (null == id || "".equals(id)) {
             return super.resolveId(elem, definition, ctx);
@@ -502,7 +502,7 @@ public abstract class AbstractBeanDefini
         String id = elem.getAttribute(BeanDefinitionParserDelegate.ID_ATTRIBUTE);
         
         if (null == id || "".equals(id)) {
-            String names = elem.getAttribute(BeanConstants.NAME_ATTR);
+            String names = elem.getAttribute("name");
             if (null != names) {
                 StringTokenizer st = 
                     new StringTokenizer(names, BeanDefinitionParserDelegate.MULTI_VALUE_ATTRIBUTE_DELIMITERS);

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/PhaseManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/PhaseManagerImpl.java?rev=1502270&r1=1502269&r2=1502270&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/PhaseManagerImpl.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/PhaseManagerImpl.java Thu
Jul 11 16:20:27 2013
@@ -67,6 +67,7 @@ public class PhaseManagerImpl implements
         inPhases.add(new Phase(Phase.PRE_PROTOCOL, ++i * 1000));
         inPhases.add(new Phase(Phase.PRE_PROTOCOL_FRONTEND, ++i * 1000));
         inPhases.add(new Phase(Phase.USER_PROTOCOL, ++i * 1000));
+        inPhases.add(new Phase(Phase.PROTOCOL, ++i * 1000));
         inPhases.add(new Phase(Phase.POST_PROTOCOL, ++i * 1000));
         inPhases.add(new Phase(Phase.UNMARSHAL, ++i * 1000));
         inPhases.add(new Phase(Phase.PRE_LOGICAL, ++i * 1000));
@@ -97,8 +98,8 @@ public class PhaseManagerImpl implements
         outPhases.add(new Phase(Phase.PRE_MARSHAL, ++i * 1000));
         outPhases.add(new Phase(Phase.MARSHAL, ++i * 1000));
         outPhases.add(new Phase(Phase.POST_MARSHAL, ++i * 1000));
-
         outPhases.add(new Phase(Phase.USER_PROTOCOL, ++i * 1000));
+        outPhases.add(new Phase(Phase.PROTOCOL, ++i * 1000));
         outPhases.add(new Phase(Phase.POST_PROTOCOL, ++i * 1000));
 
         outPhases.add(new Phase(Phase.USER_STREAM, ++i * 1000));



Mime
View raw message