cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1489377 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/
Date Tue, 04 Jun 2013 10:41:03 GMT
Author: sergeyb
Date: Tue Jun  4 10:41:02 2013
New Revision: 1489377

URL: http://svn.apache.org/r1489377
Log:
Merged revisions 1489368,1489370,1489372 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1489368 | sergeyb | 2013-06-04 11:15:05 +0100 (Tue, 04 Jun 2013) | 1 line
  
  Updating WADL schema to Java type map with float and double
........
  r1489370 | sergeyb | 2013-06-04 11:18:08 +0100 (Tue, 04 Jun 2013) | 1 line
  
  Getting all of the code needed to set a field value run as privileged
........
  r1489372 | sergeyb | 2013-06-04 11:24:42 +0100 (Tue, 04 Jun 2013) | 1 line
  
  [CXF-5053] Updating JAX-RS MessageContext to return Message, to be consistent with CXF JAX-WS
MessageContext, patch from Minto van der Sluis applied
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1489368-1489372

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

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java?rev=1489377&r1=1489376&r2=1489377&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
Tue Jun  4 10:41:02 2013
@@ -83,10 +83,15 @@ public class MessageContextImpl implemen
             return m.getExchange().getOutMessage().get(Message.ATTACHMENTS);
         }
         Object value = m.get(key);
-        if (value == null && m.getExchange() != null) {
-            Message inMessage = m.getExchange().getInMessage();
-            if (inMessage != null && inMessage != m) {
-                value = inMessage.get(key);
+        if (value == null) {
+            if (Message.class.getName().equals(key)) {
+                return m;
+            }
+            if (m.getExchange() != null) {
+                Message inMessage = m.getExchange().getInMessage();
+                if (inMessage != null && inMessage != m) {
+                    value = inMessage.get(key);
+                }
             }
         } 
         return value;

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=1489377&r1=1489376&r2=1489377&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
Tue Jun  4 10:41:02 2013
@@ -74,7 +74,6 @@ import org.apache.cxf.common.i18n.Bundle
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ClassHelper;
 import org.apache.cxf.common.util.PrimitiveUtils;
-import org.apache.cxf.common.util.ReflectionUtil;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
@@ -169,21 +168,26 @@ public final class InjectionUtils {
     public static void injectFieldValue(final Field f, 
                                         final Object o, 
                                         final Object v) {
-        ReflectionUtil.setAccessible(f);
-        try {
-            f.set(o, v);
-        } catch (IllegalAccessException ex) {
-            reportServerError("FIELD_ACCESS_FAILURE", 
-                              f.getType().getName());
-        }
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            public Object run() {
+                try {
+                    f.setAccessible(true);
+                    f.set(o, v);
+                } catch (IllegalAccessException ex) {
+                    reportServerError("FIELD_ACCESS_FAILURE", 
+                                      f.getType().getName());
+                }
+                return null;
+            }
+        });
     }
 
     public static Object extractFieldValue(final Field f, 
                                         final Object o) {
         return AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
-                f.setAccessible(true);
                 try {
+                    f.setAccessible(true);
                     return f.get(o);
                 } catch (IllegalAccessException ex) {
                     reportServerError("FIELD_ACCESS_FAILURE", 

Modified: cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1489377&r1=1489376&r2=1489377&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
(original)
+++ cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Tue Jun  4 10:41:02 2013
@@ -158,6 +158,8 @@ public class SourceGenerator {
         XSD_SPECIFIC_TYPE_MAP = new HashMap<String, String>();
         XSD_SPECIFIC_TYPE_MAP.put("string", "String");
         XSD_SPECIFIC_TYPE_MAP.put("integer", "long");
+        XSD_SPECIFIC_TYPE_MAP.put("float", "float");
+        XSD_SPECIFIC_TYPE_MAP.put("doable", "doable");
         XSD_SPECIFIC_TYPE_MAP.put("int", "int");
         XSD_SPECIFIC_TYPE_MAP.put("long", "long");
         XSD_SPECIFIC_TYPE_MAP.put("byte", "byte");



Mime
View raw message