cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1502368 - in /cxf/trunk: api/src/main/java/org/apache/cxf/common/util/ api/src/main/java/org/apache/cxf/databinding/ api/src/main/java/org/apache/cxf/endpoint/ api/src/test/java/org/apache/cxf/common/util/ rt/frontend/jaxrs/src/main/java/o...
Date Thu, 11 Jul 2013 21:21:21 GMT
Author: dkulp
Date: Thu Jul 11 21:21:20 2013
New Revision: 1502368

URL: http://svn.apache.org/r1502368
Log:
Remove some more unused types/methods

Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/databinding/PropertiesAwareDataBinding.java
    cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ContextInspector.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyContextInspector.java
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyContextInspectorTest.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StringUtils.java
    cxf/trunk/api/src/test/java/org/apache/cxf/common/util/StringUtilsTest.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StringUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StringUtils.java?rev=1502368&r1=1502367&r2=1502368&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StringUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/StringUtils.java Thu Jul 11 21:21:20
2013
@@ -57,41 +57,10 @@ public final class StringUtils {
         return s.split(regex, limit);
     }
 
-    public static String extract(String string, String startToken, String endToken) {
-        int start = string.indexOf(startToken) + startToken.length();
-        int end = string.lastIndexOf(endToken);
-
-        if (start == -1 || end == -1) {
-            return null;
-        }
-
-        return string.substring(start, end);
-    }
-
-    public static String wrapper(String string, String startToken, String endToken) {
-        StringBuilder sb = new StringBuilder();
-        sb.append(startToken);
-        sb.append(string);
-        sb.append(endToken);
-        return sb.toString();
-    }
-
     public static boolean isFileExist(String file) {
         return new File(file).exists() && new File(file).isFile();
     }
 
-    public static boolean isFileAbsolute(String file) {
-        return isFileExist(file) && new File(file).isAbsolute();
-    }
-
-    public static URL getURL(String spec) throws MalformedURLException {
-        try {
-            return new URL(spec);
-        } catch (MalformedURLException e) {
-            return new File(spec).toURI().toURL();
-        }
-    }
-
     public static boolean isEmpty(String str) {
         if (str != null) {
             int len = str.length();
@@ -113,19 +82,7 @@ public final class StringUtils {
         }
         return false;
     }
-
-    public static boolean isEqualUri(String uri1, String uri2) {
-
-        if (uri1.substring(uri1.length() - 1).equals("/") && !uri2.substring(uri2.length()
- 1).equals("/")) {
-            return uri1.substring(0, uri1.length() - 1).equals(uri2);
-        } else if (uri2.substring(uri2.length() - 1).equals("/")
-                   && !uri1.substring(uri1.length() - 1).equals("/")) {
-            return uri2.substring(0, uri2.length() - 1).equals(uri1);
-        } else {
-            return uri1.equals(uri2);
-        }
-    }
-    
+   
     public static String diff(String str1, String str2) {
         int index = str1.lastIndexOf(str2);
         if (index > -1) {
@@ -193,14 +150,6 @@ public final class StringUtils {
         return founds.get(0);
     }
     
-    public static String formatVersionNumber(String target) {
-        List<String> found = StringUtils.getFound(target, "\\d+\\.\\d+\\.?\\d*");
-        if (isEmpty(found)) {
-            return target;
-        }
-        return getFirstNotEmpty(found);
-    }
-    
     public static String addDefaultPortIfMissing(String urlString) {
         return addDefaultPortIfMissing(urlString, "80");
     }

Modified: cxf/trunk/api/src/test/java/org/apache/cxf/common/util/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/common/util/StringUtilsTest.java?rev=1502368&r1=1502367&r2=1502368&view=diff
==============================================================================
--- cxf/trunk/api/src/test/java/org/apache/cxf/common/util/StringUtilsTest.java (original)
+++ cxf/trunk/api/src/test/java/org/apache/cxf/common/util/StringUtilsTest.java Thu Jul 11
21:21:20 2013
@@ -60,13 +60,7 @@ public class StringUtilsTest extends Ass
         assertFalse(StringUtils.isEmpty(StringUtils.getFound("velocity-1.4.jar", regex)));
         assertTrue(StringUtils.isEmpty(StringUtils.getFound(null, regex)));
     }
-    
-    @Test
-    public void testFormatVersionNumber() throws Exception {
-        assertEquals("2.0", StringUtils.formatVersionNumber("2.0-M1-SNAPSHOT"));
-        assertEquals("2.0.12", StringUtils.formatVersionNumber("2.0.12-M1-SNAPSHOT"));
-    }
-    
+
     @Test
     public void testAddPortIfMissing() throws Exception {
         assertEquals("http://localhost:80", StringUtils.addDefaultPortIfMissing("http://localhost"));

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java?rev=1502368&r1=1502367&r2=1502368&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
Thu Jul 11 21:21:20 2013
@@ -18,14 +18,11 @@
  */
 package org.apache.cxf.jaxrs;
 
-import java.lang.reflect.Type;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.logging.Logger;
 
@@ -40,7 +37,6 @@ import org.apache.cxf.common.i18n.Bundle
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.databinding.DataBinding;
-import org.apache.cxf.databinding.PropertiesAwareDataBinding;
 import org.apache.cxf.endpoint.AbstractEndpointFactory;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointException;
@@ -349,18 +345,10 @@ public class AbstractJAXRSFactoryBean ex
         if (db == null) {
             return;
         }
-        if (db instanceof PropertiesAwareDataBinding) {
-            Map<Class<?>, Type> allClasses = 
-                ResourceUtils.getAllRequestResponseTypes(cris, false).getAllTypes();
-            Map<String, Object> props = new HashMap<String, Object>();
-            props.put(PropertiesAwareDataBinding.TYPES_PROPERTY, allClasses);
-            ((PropertiesAwareDataBinding)db).initialize(props);
-        } else { 
-            if (s instanceof JAXRSServiceImpl) {
-                ((JAXRSServiceImpl)s).setCreateServiceModel(true);
-            }
-            db.initialize(s);
+        if (s instanceof JAXRSServiceImpl) {
+            ((JAXRSServiceImpl)s).setCreateServiceModel(true);
         }
+        db.initialize(s);
         factory.setUserProviders(Collections.singletonList(new DataBindingProvider<Object>(db)));
     }
     



Mime
View raw message