cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1394008 - in /cxf/trunk: api/src/main/java/org/apache/cxf/common/util/ integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/ rt/bindings/corba/src...
Date Thu, 04 Oct 2012 12:15:24 GMT
Author: coheigea
Date: Thu Oct  4 12:15:23 2012
New Revision: 1394008

URL: http://svn.apache.org/viewvc?rev=1394008&view=rev
Log:
Some more cleanups

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/CglibProxyHelper.java
    cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/PlugInClassLoader.java
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java
    cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaMessage.java
    cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/EprMetaData.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/schemas/SchemaHandler.java
    cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java
    cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/xmlbeans/XMLBeansJSONProvider.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
    cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncOutInterceptor.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
    cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
    cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/NamespaceContextImpl.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/CglibProxyHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/CglibProxyHelper.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/CglibProxyHelper.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/CglibProxyHelper.java Thu Oct 
4 12:15:23 2012
@@ -59,7 +59,7 @@ class CglibProxyHelper extends ProxyHelp
             Enhancer enhancer = new Enhancer();
             enhancer.setClassLoader(loader);
             enhancer.setSuperclass(superClass);
-            enhancer.setInterfaces(theInterfaces.toArray(new Class[]{}));
+            enhancer.setInterfaces(theInterfaces.toArray(new Class[theInterfaces.size()]));
             enhancer.setCallback(new MethodInterceptor() {
 
                 public Object intercept(Object obj, Method method, Object[] args, MethodProxy
proxy) 

Modified: cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/PlugInClassLoader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/PlugInClassLoader.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/PlugInClassLoader.java
(original)
+++ cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/core/classloader/PlugInClassLoader.java
Thu Oct  4 12:15:23 2012
@@ -73,7 +73,7 @@ public class PlugInClassLoader extends S
         while (i.hasNext()) {            
             LOG.config("get Filter " + propFile + "::" + (String)i.next());            
         }    
-        return filtersProps.keySet().toArray(new String[] {});
+        return filtersProps.keySet().toArray(new String[filtersProps.keySet().size()]);
     }
 
     private static Properties getProperties(ClassLoader parent, String propsFileName) throws
IOException {
@@ -119,7 +119,7 @@ public class PlugInClassLoader extends S
             }
         }
 
-        return urlList.toArray(new String[] {});
+        return urlList.toArray(new String[urlList.size()]);
     }
 
     protected Class<?> findClass(String name) throws ClassNotFoundException {

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WsdlOption.java
Thu Oct  4 12:15:23 2012
@@ -87,7 +87,7 @@ public class WsdlOption extends Option i
                 options.add(String.format("%s=%s", upp.getPrefix(), upp.getUri()));
             }
         }
-        if (catalog != null && !"".equals(catalog)) {
+        if (catalog != null) {
             options.add("-catalog");
             options.add(catalog.getAbsolutePath());
         }

Modified: cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaMessage.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaMessage.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaMessage.java
(original)
+++ cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaMessage.java
Thu Oct  4 12:15:23 2012
@@ -91,7 +91,7 @@ public class CorbaMessage extends Abstra
     }
     
     public CorbaStreamable[] getStreamableArguments() {
-        return this.arguments.toArray(new CorbaStreamable[0]);
+        return this.arguments.toArray(new CorbaStreamable[this.arguments.size()]);
     }
 
 

Modified: cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/EprMetaData.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/EprMetaData.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/EprMetaData.java
(original)
+++ cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/EprMetaData.java
Thu Oct  4 12:15:23 2012
@@ -78,7 +78,7 @@ public class EprMetaData {
             b.append("@");
             b.append(candidateWsdlDef.getDocumentBaseURI());
             b.append('}');
-            ret =  b.toString();
+            ret = b.toString();
         }
         return ret;
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/AbstractSecurityContextInInterceptor.java
Thu Oct  4 12:15:23 2012
@@ -69,7 +69,7 @@ public abstract class AbstractSecurityCo
     }
     
     protected Principal getPrincipal(Principal originalPrincipal, Subject subject) {
-        Principal[] ps = subject.getPrincipals().toArray(new Principal[]{});
+        Principal[] ps = subject.getPrincipals().toArray(new Principal[subject.getPrincipals().size()]);
         if (ps != null && ps.length > 0 && !(ps[0] instanceof Group))
{
             return ps[0];
         } else {

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java (original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java Thu
Oct  4 12:15:23 2012
@@ -111,7 +111,7 @@ public abstract class JAXBDataBase {
             }
             
         }
-        return annoList.toArray(new Annotation[]{});       
+        return annoList.toArray(new Annotation[annoList.size()]);       
     }
 
     public Integer getMtomThreshold() {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
Thu Oct  4 12:15:23 2012
@@ -123,7 +123,7 @@ public class CacheControlHeaderProvider 
                     values.add(val);
                 }
             }
-            return values.toArray(new String[]{});
+            return values.toArray(new String[values.size()]);
         } else {
             String separator = getSeparator();
             return c.split(separator);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java
Thu Oct  4 12:15:23 2012
@@ -279,8 +279,8 @@ public abstract class AbstractJAXBProvid
                 collectionContextClasses.add(CollectionWrapper.class);
                 collectionContextClasses.add(type);
             }
-            return JAXBContext.newInstance(collectionContextClasses.toArray(new Class[]{}),

-                                                        cProperties);
+            return JAXBContext.newInstance(
+                collectionContextClasses.toArray(new Class[collectionContextClasses.size()]),
cProperties);
         }
     }
     

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
Thu Oct  4 12:15:23 2012
@@ -350,7 +350,7 @@ public class RequestDispatcherProvider e
         }
         
         public void setParameters(String name, List<String> values) {
-            doSetParameters(name, values.toArray(new String[]{}));
+            doSetParameters(name, values.toArray(new String[values.size()]));
         }
         
         private void doSetParameters(String name, String[] values) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Thu
Oct  4 12:15:23 2012
@@ -193,7 +193,7 @@ public final class JAXRSUtils {
                 Method m = provider.getClass().getMethod(methodName, new Class[]{});
                 List<String> types = (List<String>)m.invoke(provider, new Object[]{});
                 if (types != null) {
-                    values =  types.size() > 0 ? types.toArray(new String[]{})
+                    values = types.size() > 0 ? types.toArray(new String[types.size()])
                                                : new String[]{"*/*"};
                 }
             } catch (Exception ex) {
@@ -600,7 +600,7 @@ public final class JAXRSUtils {
         
         Method method = ori.getMethodToInvoke();
         Class<?>[] parameterTypes = method.getParameterTypes();
-        Parameter[] paramsInfo = ori.getParameters().toArray(new Parameter[]{});  
+        Parameter[] paramsInfo = ori.getParameters().toArray(new Parameter[ori.getParameters().size()]);
 
         Method annotatedMethod = ori.getAnnotatedMethod();
         Type[] genericParameterTypes = annotatedMethod == null ? method.getGenericParameterTypes()

                                       : annotatedMethod.getGenericParameterTypes();

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Thu Oct  4 12:15:23 2012
@@ -553,7 +553,7 @@ public final class ResourceUtils {
             types.getAllTypes().put(type, type);
             
             Class<?> genCls = InjectionUtils.getActualType(genericType);
-            if (genCls != type && genCls instanceof Class && genCls != Object.class

+            if (genCls != type && genCls != null && genCls != Object.class

                 && !InjectionUtils.isSupportedCollectionOrArray(genCls)) {
                 types.getAllTypes().put(genCls, genCls);
             }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/schemas/SchemaHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/schemas/SchemaHandler.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/schemas/SchemaHandler.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/schemas/SchemaHandler.java
Thu Oct  4 12:15:23 2012
@@ -138,7 +138,7 @@ public class SchemaHandler {
                     }
                 }
             }
-            s = factory.newSchema(sources.toArray(new Source[]{}));
+            s = factory.newSchema(sources.toArray(new Source[sources.size()]));
         } catch (Exception ex) {
             LOG.warning("Validation will be disabled, failed to create schema : " + ex.getMessage());
         }

Modified: cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java
(original)
+++ cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanInfoSupporter.java
Thu Oct  4 12:15:23 2012
@@ -126,16 +126,16 @@ public class ModelMBeanInfoSupporter {
     public ModelMBeanInfo buildModelMBeanInfo(Descriptor desc)  {        
         
         ModelMBeanOperationInfo[] ops = 
-            operations.values().toArray(new ModelMBeanOperationInfo[0]);        
+            operations.values().toArray(new ModelMBeanOperationInfo[operations.values().size()]);
       
         
         ModelMBeanAttributeInfo[] atts = 
-            attributes.values().toArray(new ModelMBeanAttributeInfo[0]);
+            attributes.values().toArray(new ModelMBeanAttributeInfo[attributes.values().size()]);
         
         ModelMBeanConstructorInfo[] cons = 
-            constructors.values().toArray(new ModelMBeanConstructorInfo[0]);
+            constructors.values().toArray(new ModelMBeanConstructorInfo[constructors.values().size()]);
         
         ModelMBeanNotificationInfo[] notifs = 
-            notifications.values().toArray(new ModelMBeanNotificationInfo[0]);
+            notifications.values().toArray(new ModelMBeanNotificationInfo[notifications.values().size()]);
                 
         return new ModelMBeanInfoSupport("javax.management.modelmbean.ModelMBeanInfo",
                                          "description",

Modified: cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/xmlbeans/XMLBeansJSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/xmlbeans/XMLBeansJSONProvider.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/xmlbeans/XMLBeansJSONProvider.java
(original)
+++ cxf/trunk/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/xmlbeans/XMLBeansJSONProvider.java
Thu Oct  4 12:15:23 2012
@@ -91,7 +91,7 @@ public class XMLBeansJSONProvider extend
             XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
             XMLStreamWriter xsw = factory.createXMLStreamWriter(os);
             xsw.writeStartDocument();
-            if (obj instanceof XmlObject) {
+            if (obj != null) {
 
                 XmlObject xObj = obj;
                 XMLBeanStreamSerializer ser = new XMLBeanStreamSerializer();

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitor.java
Thu Oct  4 12:15:23 2012
@@ -76,7 +76,8 @@ public class JPATypedQueryVisitor<T> ext
             for (SearchCondition<T> condition : sc.getSearchConditions()) {
                 condition.accept(this);
             }
-            Predicate[] preds = predStack.pop().toArray(new Predicate[0]);
+            List<Predicate> predsList = predStack.pop();
+            Predicate[] preds = predsList.toArray(new Predicate[predsList.size()]);
             Predicate newPred;
             if (sc instanceof OrSearchCondition) {
                 newPred = builder.or(preds);
@@ -93,7 +94,8 @@ public class JPATypedQueryVisitor<T> ext
     
     public CriteriaQuery<T> getCriteriaQuery() {
         if (!criteriaFinalized) {
-            cq.where(predStack.pop().toArray(new Predicate[0]));
+            List<Predicate> predsList = predStack.pop();
+            cq.where(predsList.toArray(new Predicate[predsList.size()]));
             criteriaFinalized = true;
         }
         return cq;

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncOutInterceptor.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncOutInterceptor.java
(original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncOutInterceptor.java
Thu Oct  4 12:15:23 2012
@@ -173,8 +173,8 @@ public class XmlEncOutInterceptor extend
                 KeyGenerator keyGen = getKeyGenerator(symEncAlgo);
                 symmetricKey = keyGen.generateKey();
             } 
+            return symmetricKey.getEncoded();
         }
-        return symmetricKey.getEncoded();
     }
     
     private X509Certificate getReceiverCertificateFromCrypto(Crypto crypto, String user)
throws Exception {

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
Thu Oct  4 12:15:23 2012
@@ -351,8 +351,8 @@ public class JettyHTTPServerEngineFactor
     public void postShutdown() {
         // shut down the jetty server in the portMap
         // To avoid the CurrentModificationException, 
-        // do not use portMap.vaules directly       
-        JettyHTTPServerEngine[] engines = portMap.values().toArray(new JettyHTTPServerEngine[0]);
+        // do not use portMap.values directly       
+        JettyHTTPServerEngine[] engines = portMap.values().toArray(new JettyHTTPServerEngine[portMap.values().size()]);
         for (JettyHTTPServerEngine engine : engines) {
             engine.shutdown();
         }

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
Thu Oct  4 12:15:23 2012
@@ -119,7 +119,7 @@ public class DestinationRegistryImpl imp
             }
         });
 
-        return dest2.toArray(new AbstractDestination[]{});
+        return dest2.toArray(new AbstractDestination[dest2.size()]);
     }
 
     public Set<String> getDestinationsPaths() {

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/ServiceListGeneratorServlet.java
Thu Oct  4 12:15:23 2012
@@ -133,7 +133,7 @@ public class ServiceListGeneratorServlet
                 soapEndpoints.add(sd);
             }
         }
-        return soapEndpoints.toArray(new AbstractDestination[]{});
+        return soapEndpoints.toArray(new AbstractDestination[soapEndpoints.size()]);
     }
     
     private AbstractDestination[] getRestEndpoints(AbstractDestination[] destinations,
@@ -146,7 +146,7 @@ public class ServiceListGeneratorServlet
                 restfulDests.add(sd);
             }
         }
-        return restfulDests.toArray(new AbstractDestination[]{});
+        return restfulDests.toArray(new AbstractDestination[restfulDests.size()]);
     }
     
 

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JCATransactionalMessageListenerContainer.java
Thu Oct  4 12:15:23 2012
@@ -74,7 +74,9 @@ public class JCATransactionalMessageList
         } catch (Exception ex) {
             throw new JMSException(ex.getMessage());
         } finally {
-            ep.release();
+            if (ep != null) {
+                ep.release();
+            }
             JmsUtils.closeMessageConsumer(mc);
             JmsUtils.closeSession(xa);
             JmsUtils.closeSession(s);

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
(original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
Thu Oct  4 12:15:23 2012
@@ -968,7 +968,7 @@ public class MAPAggregatorImpl extends M
             ei.setAddress(address);
             destination = factory.getDestination(ei);
             Conduit conduit = ContextUtils.getConduit(null, message);
-            if (conduit instanceof Observable) {
+            if (conduit != null) {
                 MessageObserver ob = ((Observable)conduit).getMessageObserver();
                 ob = new InterposedMessageObserver(bus, ob);
                 destination.setMessageObserver(ob);

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
Thu Oct  4 12:15:23 2012
@@ -178,7 +178,7 @@ public class LdapClaimsHandler implement
         }
 
         String[] searchAttributes = null;
-        searchAttributes = searchAttributeList.toArray(new String[] {});
+        searchAttributes = searchAttributeList.toArray(new String[searchAttributeList.size()]);
 
         AttributesMapper mapper = 
             new AttributesMapper() {

Modified: cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
(original)
+++ cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/AbstractGreeterImpl.java
Thu Oct  4 12:15:23 2012
@@ -53,11 +53,15 @@ public class AbstractGreeterImpl impleme
     }
 
     public void resetLastOnewayArg() {
-        lastOnewayArg = null;
+        synchronized (this) {
+            lastOnewayArg = null;
+        }
     }
 
     public void useLastOnewayArg(Boolean use) {
-        useLastOnewayArg = use;
+        synchronized (this) {
+            useLastOnewayArg = use;
+        }
     }
 
     public void setThrowAlways(boolean t) {

Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
(original)
+++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
Thu Oct  4 12:15:23 2012
@@ -524,7 +524,7 @@ public class WSDLToIDLAction {
         } else if (corbaTypeImpl instanceof Const) {
             result = createConst(corbaTypeImpl, scope, local);        
         } else {
-            result = checkAnon(corbaTypeImpl, scope, local);                            
       
+            result = checkAnon(corbaTypeImpl, scope, local);
         } 
         
         if (result == null

Modified: cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
(original)
+++ cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
Thu Oct  4 12:15:23 2012
@@ -84,15 +84,17 @@ public class Stax2DOM {
             throw new ToolException(e);
         } finally {
             try {
-                try {
-                    //on woodstox, calling closeCompletely will allow any 
-                    //cached things like dtds and such to be completely
-                    //closed and cleaned up.
-                    reader.getClass().getMethod("closeCompletely").invoke(reader);
-                } catch (Throwable t) {
-                    //ignore
+                if (reader != null) {
+                    try {
+                        //on woodstox, calling closeCompletely will allow any 
+                        //cached things like dtds and such to be completely
+                        //closed and cleaned up.
+                        reader.getClass().getMethod("closeCompletely").invoke(reader);
+                    } catch (Throwable t) {
+                        //ignore
+                    }
+                    reader.close();
                 }
-                reader.close();
             } catch (XMLStreamException e) {
                 // throw or change do nothing.
                 throw new ToolException(e);

Modified: cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
(original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Thu Oct  4 12:15:23 2012
@@ -1358,7 +1358,7 @@ public class SourceGenerator {
                                        .getEntityResolver());
         if (compilerArgs.size() > 0) {
             compiler.getOptions().addGrammar(new InputSource("null"));
-            compiler.getOptions().parseArguments(compilerArgs.toArray(new String[] {}));
+            compiler.getOptions().parseArguments(compilerArgs.toArray(new String[compilerArgs.size()]));
         }
         addSchemas(schemaElements, compiler);
         for (InputSource is : bindingFiles) {

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Thu Oct  4 12:15:23 2012
@@ -358,7 +358,7 @@ public class JAXBDataBinding implements 
                 // keep parseArguments happy, supply dummy required command-line
                 // opts
                 opts.addGrammar(new InputSource("null"));
-                opts.parseArguments(args.toArray(new String[] {}));
+                opts.parseArguments(args.toArray(new String[args.size()]));
             } catch (BadCommandLineException e) {
                 String msg = "XJC reported 'BadCommandLineException' for -xjc argument:";
                 for (String arg : args) {

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/NamespaceContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/NamespaceContextImpl.java?rev=1394008&r1=1394007&r2=1394008&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/NamespaceContextImpl.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/NamespaceContextImpl.java
Thu Oct  4 12:15:23 2012
@@ -39,6 +39,7 @@ public class NamespaceContextImpl implem
         docFact.setNamespaceAware(true);
         try {
             document = docFact.newDocumentBuilder().parse(file);
+            element = document.getDocumentElement();
         } catch (SAXException e) {
             e.printStackTrace();
         } catch (IOException e) {
@@ -46,7 +47,6 @@ public class NamespaceContextImpl implem
         } catch (ParserConfigurationException e) {
             e.printStackTrace();
         }
-        element = document.getDocumentElement();
     }
 
     public String getNamespaceURI(String prefix) {



Mime
View raw message