cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1404098 - in /cxf/trunk: api/src/main/java/org/apache/cxf/common/jaxb/ rt/core/src/main/java/org/apache/cxf/bus/managers/ rt/core/src/main/java/org/apache/cxf/bus/spring/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/j...
Date Wed, 31 Oct 2012 11:31:30 GMT
Author: coheigea
Date: Wed Oct 31 11:31:29 2012
New Revision: 1404098

URL: http://svn.apache.org/viewvc?rev=1404098&view=rev
Log:
More code updates

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.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/JPACriteriaQueryVisitor.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/jaxb/JAXBContextCache.java Wed Oct 31
11:31:29 2012
@@ -173,7 +173,7 @@ public final class JAXBContextCache {
         } catch (JAXBException ex) {
             // load jaxb needed class and try to create jaxb context 
             boolean added = addJaxbObjectFactory(ex, classes);
-            while (cachedContextAndSchemas == null && added) {
+            if (added) {
                 try {
                     context = AccessController.doPrivileged(new PrivilegedExceptionAction<JAXBContext>()
{
                         public JAXBContext run() throws Exception {
@@ -345,6 +345,8 @@ public final class JAXBContextCache {
                 }
                 line = reader.readLine();
             }
+
+            ins.close();
         } catch (Exception ex) {
             //ignore
         }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImpl.java
Wed Oct 31 11:31:29 2012
@@ -150,7 +150,7 @@ public class WorkQueueManagerImpl implem
             for (AutomaticWorkQueue q : namedQueues.values()) {
                 while (!q.isShutdown()) {
                     try {            
-                        Thread.sleep(100);
+                        wait(100);
                     } catch (InterruptedException ex) {
                         // ignore
                     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
Wed Oct 31 11:31:29 2012
@@ -72,7 +72,7 @@ public class Jsr250BeanPostProcessor 
             } else if (bean instanceof Bus) {
                 Bus b = (Bus)bean;
                 ResourceManager m = b.getExtension(ResourceManager.class);
-                if (resourceManager == null && m != null) {
+                if (m != null) {
                     resourceManager = m;
                     if (!(b instanceof SpringBus)) {
                         resourceManager

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Wed Oct 31 11:31:29 2012
@@ -459,7 +459,7 @@ public final class JAXBEncoderDecoder {
                 Field f = Utils.getField(cls, accessType, fieldName);
                 if (f != null) {
                     Type type = f.getGenericType();
-                    f.setAccessible(true);
+                    ReflectionUtil.setAccessible(f);
                     if (JAXBSchemaInitializer.isArray(type)) {
                         Class<?> compType = JAXBSchemaInitializer.getArrayComponentType(type);
                         List<Object> ret = unmarshallArray(u, reader, q, compType,
createList(type));

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WebServiceContextImpl.java
Wed Oct 31 11:31:29 2012
@@ -94,7 +94,9 @@ public class WebServiceContextImpl imple
             }
             ep.getEndpointInfo().setProperty("URI", wsdlDescription);
         }
-        builder.wsdlDocumentLocation(wsdlDescription.toString());
+        if (wsdlDescription != null) {
+            builder.wsdlDocumentLocation(wsdlDescription.toString());
+        }
         
         /*
         if (ep.getEndpointInfo().getService().getDescription() != null) {

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=1404098&r1=1404097&r2=1404098&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
Wed Oct 31 11:31:29 2012
@@ -70,7 +70,6 @@ public class XMLBeansJSONProvider extend
             result = parseXmlBean(type, r);
 
             xsr.close();
-            xsr = null;
 
         } catch (XMLStreamException e) {
             throw new WebApplicationException(HttpURLConnection.HTTP_INTERNAL_ERROR);

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
Wed Oct 31 11:31:29 2012
@@ -88,7 +88,7 @@ public class JPACriteriaQueryVisitor<T, 
     }
     
     private static Selection<?>[] toSelectionsArray(List<Selection<?>>
selections) {
-        return selections.toArray(new Selection[]{});
+        return selections.toArray(new Selection[selections.size()]);
     }
     
 }

Modified: cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?rev=1404098&r1=1404097&r2=1404098&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java (original)
+++ cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java Wed
Oct 31 11:31:29 2012
@@ -116,7 +116,7 @@ public class ServerLauncher {
                     } catch (IllegalThreadStateException ex) {
                         //ignore, process hasn't ended
                         try {
-                            Thread.sleep(1000);
+                            mutex.wait(1000);
                         } catch (InterruptedException ex1) {
                             //ignore
                         }
@@ -231,7 +231,7 @@ public class ServerLauncher {
     
             synchronized (mutex) {
                 TimeoutCounter tc = new TimeoutCounter(DEFAULT_TIMEOUT);
-                do {
+                while (!(serverIsReady || serverLaunchFailed)) {
                     try {
                         mutex.wait(1000);
                         if (tc.isTimeoutExpired()) {
@@ -240,7 +240,7 @@ public class ServerLauncher {
                     } catch (InterruptedException e) {
                         e.printStackTrace();
                     }
-                } while (!serverIsReady && !serverLaunchFailed);
+                }
             }
             if (serverLaunchFailed || !serverIsReady) {
                 System.err.println(out.getServerOutput());



Mime
View raw message