cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1519904 - in /cxf/branches/2.6.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/
Date Wed, 04 Sep 2013 02:23:41 GMT
Author: ffang
Date: Wed Sep  4 02:23:40 2013
New Revision: 1519904

URL: http://svn.apache.org/r1519904
Log:
Merged revisions 1519896 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1519896 | ffang | 2013-09-04 09:35:26 +0800 (三, 04  9 2013) | 9 lines
  
  Merged revisions 1519601 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1519601 | ffang | 2013-09-03 16:37:43 +0800 (二, 03  9 2013) | 1 line
    
    [CXF-5189]Java transient modifier is ignored by JAXB databinding
  ........
................

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
    cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
    cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/OrderException.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1519896
  Merged /cxf/trunk:r1519601

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

Modified: cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java?rev=1519904&r1=1519903&r2=1519904&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
Wed Sep  4 02:23:40 2013
@@ -378,8 +378,9 @@ class JAXBContextInitializer extends Ser
      * Checks if the field is accepted as a JAXB property.
      */
     static boolean isFieldAccepted(Field field, XmlAccessType accessType) {
-        // We only accept non static fields which are not marked @XmlTransient
-        if (Modifier.isStatic(field.getModifiers()) || field.isAnnotationPresent(XmlTransient.class))
{
+        // We only accept non static fields which are not marked @XmlTransient or has transient
modifier
+        if (Modifier.isStatic(field.getModifiers()) || field.isAnnotationPresent(XmlTransient.class)
+            || Modifier.isTransient(field.getModifiers())) {
             return false;
         }
         if (accessType == XmlAccessType.PUBLIC_MEMBER 

Modified: cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java?rev=1519904&r1=1519903&r2=1519904&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
Wed Sep  4 02:23:40 2013
@@ -472,6 +472,7 @@ public class JAXBEncoderDecoderTest exte
         assertTrue(b < c);
         assertTrue(c < d);
         assertTrue(d < e);
+        assertTrue(bout.toString().indexOf("transientValue") < 0);
     }
     
     @Test

Modified: cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/OrderException.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/OrderException.java?rev=1519904&r1=1519903&r2=1519904&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/OrderException.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/OrderException.java
Wed Sep  4 02:23:40 2013
@@ -23,8 +23,11 @@ import javax.xml.bind.annotation.XmlAcce
 
 @XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
 public class OrderException extends Exception {
+      
     private static final long serialVersionUID = 1L;
 
+    private transient int transientValue;
+    
     private String info1;
 
     private String info2;
@@ -34,6 +37,7 @@ public class OrderException extends Exce
     private int intVal;
 
     private String detail;
+       
 
     public OrderException(String message) {
         super(message);
@@ -81,4 +85,15 @@ public class OrderException extends Exce
         this.detail = detail;
     }
 
+
+    int getTransientValue() {
+        return transientValue;
+    }
+
+
+    void setTransientValue(int transientValue) {
+        this.transientValue = transientValue;
+    }
+
+
 }



Mime
View raw message