cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] cxf git commit: [CXF-6246] Classes are in every version of the JDK we support, just use them directly.
Date Tue, 10 Feb 2015 14:23:44 GMT
[CXF-6246] Classes are in every version of the JDK we support, just use them directly.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bf9c5e3d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bf9c5e3d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bf9c5e3d

Branch: refs/heads/3.0.x-fixes
Commit: bf9c5e3dc83c5c7c63a578d8a336318f61f4db31
Parents: bcec16a
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Feb 10 09:14:28 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Feb 10 09:23:34 2015 -0500

----------------------------------------------------------------------
 rt/databinding/aegis/pom.xml                    |  8 ++++++
 .../cxf/aegis/type/java5/AnnotationReader.java  | 27 +++++---------------
 2 files changed, 15 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/bf9c5e3d/rt/databinding/aegis/pom.xml
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/pom.xml b/rt/databinding/aegis/pom.xml
index 1b41535..8c3be18 100644
--- a/rt/databinding/aegis/pom.xml
+++ b/rt/databinding/aegis/pom.xml
@@ -30,6 +30,14 @@
         <version>3.0.4-SNAPSHOT</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
+    
+    <properties>
+        <cxf.osgi.import>
+            javax.xml.bind*;version="${cxf.osgi.javax.bind.version}",
+            javax.activation;version="${cxf.osgi.javax.activation.version}",
+            javax.xml.stream*;version="${cxf.osgi.javax.stream.version}"
+        </cxf.osgi.import>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.cxf</groupId>

http://git-wip-us.apache.org/repos/asf/cxf/blob/bf9c5e3d/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
----------------------------------------------------------------------
diff --git a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
index bf06ed1..66299a0 100644
--- a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
+++ b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/AnnotationReader.java
@@ -21,26 +21,22 @@ package org.apache.cxf.aegis.type.java5;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import org.apache.cxf.aegis.type.AegisType;
-import org.apache.cxf.common.logging.LogUtils;
 
 public class AnnotationReader {
-    private static final Logger LOG = LogUtils.getL7dLogger(AnnotationReader.class);
-    private static final Class<? extends Annotation> WEB_PARAM = load("javax.jws.WebParam");
-    private static final Class<? extends Annotation> WEB_RESULT = load("javax.jws.WebResult");
+    private static final Class<? extends Annotation> WEB_PARAM = javax.jws.WebParam.class;
+    private static final Class<? extends Annotation> WEB_RESULT = javax.jws.WebResult.class;
     private static final Class<? extends Annotation> XML_ATTRIBUTE =
-            load("javax.xml.bind.annotation.XmlAttribute");
+            javax.xml.bind.annotation.XmlAttribute.class;
     private static final Class<? extends Annotation> XML_ELEMENT =
-            load("javax.xml.bind.annotation.XmlElement");
+            javax.xml.bind.annotation.XmlElement.class;
     private static final Class<? extends Annotation> XML_SCHEMA =
-            load("javax.xml.bind.annotation.XmlSchema");
+            javax.xml.bind.annotation.XmlSchema.class;
     private static final Class<? extends Annotation> XML_TYPE =
-            load("javax.xml.bind.annotation.XmlType");
+            javax.xml.bind.annotation.XmlType.class;
     private static final Class<? extends Annotation> XML_TRANSIENT =
-            load("javax.xml.bind.annotation.XmlTransient");
+            javax.xml.bind.annotation.XmlTransient.class;
 
     @SuppressWarnings("unchecked")
     public boolean isIgnored(AnnotatedElement element) {
@@ -378,15 +374,6 @@ public class AnnotationReader {
         return null;
     }
 
-    private static Class<? extends Annotation> load(String name) {
-        try {
-            return AnnotationReader.class.getClassLoader().loadClass(name).asSubclass(Annotation.class);
-        } catch (Throwable e) {
-            LOG.log(Level.FINE, "Error loading annotation class " + name + ".", e);
-            return null;
-        }
-    }
-
     public boolean isFlat(Annotation[] annotations) {
         if (annotations != null) {
             for (Annotation a : annotations) {


Mime
View raw message