cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing checkstyle issues in 3.0.x
Date Thu, 13 Aug 2015 16:24:59 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 6ccf746cd -> b86ec03bb


Fixing checkstyle issues in 3.0.x


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b86ec03b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b86ec03b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b86ec03b

Branch: refs/heads/3.0.x-fixes
Commit: b86ec03bb0bcd3a253305b2bb2b93fca2bf64767
Parents: 6ccf746
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Aug 13 17:24:00 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Aug 13 17:24:00 2015 +0100

----------------------------------------------------------------------
 .../cxf/jaxrs/provider/ProviderFactory.java     |  8 +--
 .../cxf/jaxrs/provider/ProviderFactoryTest.java | 52 ++++++++++----------
 2 files changed, 30 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b86ec03b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
index b9075b0..1fcac3c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
@@ -580,8 +580,8 @@ public abstract class ProviderFactory {
     
     private boolean customComparatorAvailable(Class<?> providerClass) {
         if (providerComparator != null) {
-            Type type = ((ParameterizedType)providerComparator.getClass()
-                .getGenericInterfaces()[0]).getActualTypeArguments()[0];
+            ParameterizedType ptFirst = (ParameterizedType)providerComparator.getClass().getGenericInterfaces()[0];
+            Type type = ptFirst.getActualTypeArguments()[0];
             if (type instanceof ParameterizedType) {
                 ParameterizedType pt = (ParameterizedType)type;
                 if (pt.getRawType() == ProviderInfo.class) {
@@ -603,8 +603,8 @@ public abstract class ProviderFactory {
     @SuppressWarnings("unchecked")
     private <T> void doCustomSort(List<?> listOfProviders) {
         Comparator<?> theProviderComparator = providerComparator;
-        Type type = ((ParameterizedType)providerComparator.getClass()
-            .getGenericInterfaces()[0]).getActualTypeArguments()[0];
+        ParameterizedType pt = (ParameterizedType)providerComparator.getClass().getGenericInterfaces()[0];
+        Type type = pt.getActualTypeArguments()[0];
         if (type == Object.class) {
             theProviderComparator = 
                 (Comparator<?>)(new ProviderInfoClassComparator((Comparator<Object>)theProviderComparator));

http://git-wip-us.apache.org/repos/asf/cxf/blob/b86ec03b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
index 7f6b209..35d5891 100644
--- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
+++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
@@ -170,20 +170,20 @@ public class ProviderFactoryTest extends Assert {
         Comparator<ProviderInfo<MessageBodyReader>> comp = 
             new Comparator<ProviderInfo<MessageBodyReader>>() {
 
-            @Override
-            public int compare(ProviderInfo<MessageBodyReader> o1, ProviderInfo<MessageBodyReader>
o2) {
-                MessageBodyReader<?> provider1 = o1.getProvider();
-                MessageBodyReader<?> provider2 = o2.getProvider();
-                if (provider1 instanceof StringTextProvider) {
-                    return 1;
-                } else if (provider2 instanceof StringTextProvider) {
-                    return -1;
-                } else {
-                    return 0;
-                }
-            }    
+                @Override
+                public int compare(ProviderInfo<MessageBodyReader> o1, ProviderInfo<MessageBodyReader>
o2) {
+                    MessageBodyReader<?> provider1 = o1.getProvider();
+                    MessageBodyReader<?> provider2 = o2.getProvider();
+                    if (provider1 instanceof StringTextProvider) {
+                        return 1;
+                    } else if (provider2 instanceof StringTextProvider) {
+                        return -1;
+                    } else {
+                        return 0;
+                    }
+                }    
         
-        };
+            };
         pf.setProviderComparator(comp);
         
         // writers
@@ -203,20 +203,20 @@ public class ProviderFactoryTest extends Assert {
         Comparator<ProviderInfo<MessageBodyWriter<?>>> comp = 
             new Comparator<ProviderInfo<MessageBodyWriter<?>>>() {
 
-            @Override
-            public int compare(ProviderInfo<MessageBodyWriter<?>> o1, ProviderInfo<MessageBodyWriter<?>>
o2) {
-                MessageBodyWriter<?> provider1 = o1.getProvider();
-                MessageBodyWriter<?> provider2 = o2.getProvider();
-                if (provider1 instanceof StringTextProvider) {
-                    return 1;
-                } else if (provider2 instanceof StringTextProvider) {
-                    return -1;
-                } else {
-                    return 0;
-                }
-            }    
+                @Override
+                public int compare(ProviderInfo<MessageBodyWriter<?>> o1, ProviderInfo<MessageBodyWriter<?>>
o2) {
+                    MessageBodyWriter<?> provider1 = o1.getProvider();
+                    MessageBodyWriter<?> provider2 = o2.getProvider();
+                    if (provider1 instanceof StringTextProvider) {
+                        return 1;
+                    } else if (provider2 instanceof StringTextProvider) {
+                        return -1;
+                    } else {
+                        return 0;
+                    }
+                }    
         
-        };
+            };
         pf.setProviderComparator(comp);
         
         // writers


Mime
View raw message