cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r814716 - in /cxf/branches/2.2.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/
Date Mon, 14 Sep 2009 16:03:37 GMT
Author: dkulp
Date: Mon Sep 14 16:03:36 2009
New Revision: 814716

URL: http://svn.apache.org/viewvc?rev=814716&view=rev
Log:
Merged revisions 814661 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r814661 | peterjones | 2009-09-14 10:29:10 -0400 (Mon, 14 Sep 2009) | 7 lines
  
  Some ibm jdk 5 fixes.
  DataBindingProviderTest - string comparison of xml in test fails for ibm jdk.
  JMSConduitTest - work-around for ibm jdk finalizing the conduit while it is
      still in scope in the test.
  AegisDatabinding - Need to add a null check so that the simple frontend 
      dependency can be excluded with the ibm jdk.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java

Propchange: cxf/branches/2.2.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=814716&r1=814715&r2=814716&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Mon Sep 14 16:03:36 2009
@@ -626,6 +626,14 @@
 
     private Method getMethod(Service s, OperationInfo op) {
         MethodDispatcher md = (MethodDispatcher)s.get(MethodDispatcher.class.getName());
+        // The ibm jdk requires the simple frontend dependency to be
+        // present for the SimpleMethodDispatcher cast below even if
+        // md is null (sun jdk does not).  So, for the jaxrs frontend,
+        // we can exclude the simple frontend from the aegis databinding
+        // dependency as long as this null check is here.
+        if (md == null) {
+            return null;
+        }
         SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md;
         return smd != null ? smd.getPrimaryMethod(op) : null;
     }

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java?rev=814716&r1=814715&r2=814716&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
Mon Sep 14 16:03:36 2009
@@ -65,18 +65,19 @@
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         p.writeTo(b, Book.class, Book.class,
             new Annotation[0], MediaType.TEXT_XML_TYPE, new MetadataMap<String, Object>(),
bos);
-        String data = "<ns1:Book xmlns:ns1=\"http://resources.jaxrs.cxf.apache.org\" "
-            + "xmlns:ns2=\"http://www.w3.org/2001/XMLSchema-instance\" ns2:type=\"ns1:Book\">"
-            + "<ns1:id>127</ns1:id><ns1:name>CXF</ns1:name><ns1:state></ns1:state></ns1:Book>";
-        assertEquals(bos.toString(), data);
+        doTestAegisRead(bos.toString());
     }
     
-    @SuppressWarnings("unchecked")
     @Test
     public void testAegisRead() throws Exception {
         String data = "<ns1:Book xmlns:ns1=\"http://resources.jaxrs.cxf.apache.org\" "
             + "xmlns:ns2=\"http://www.w3.org/2001/XMLSchema-instance\" ns2:type=\"ns1:Book\">"
             + "<ns1:id>127</ns1:id><ns1:name>CXF</ns1:name><ns1:state></ns1:state></ns1:Book>";
+        doTestAegisRead(data);
+    }
+    
+    @SuppressWarnings("unchecked")
+    public void doTestAegisRead(String data) throws Exception { 
         Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
         s.put("readXsiType", true);
         AegisDatabinding binding = new AegisDatabinding();

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=814716&r1=814715&r2=814716&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Mon Sep 14 16:03:36 2009
@@ -178,6 +178,12 @@
                 return JMSUtils.createAndSetPayload(testBytes, session, JMSConstants.BYTE_MESSAGE_TYPE);
             }
         });
+        
+        // The ibm jdk finalizes conduit (during most runs of this test) and
+        // causes it to fail unless we reference the conduit here after the
+        // jmsTemplate.execute() call.
+        assertNotNull("Conduit is null", conduit);
+
         assertTrue("Message should have been of type BytesMessage ", message instanceof BytesMessage);
     }
 



Mime
View raw message