Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56CE610E28 for ; Tue, 10 Feb 2015 14:18:20 +0000 (UTC) Received: (qmail 62178 invoked by uid 500); 10 Feb 2015 14:18:20 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 62116 invoked by uid 500); 10 Feb 2015 14:18:20 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 62107 invoked by uid 99); 10 Feb 2015 14:18:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2015 14:18:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0BF4ADFDDE; Tue, 10 Feb 2015 14:18:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Message-Id: <980cefa3fc1d4b279912df6c2893f4e6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: 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:18:20 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master 8891549dc -> 824234e62 [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/824234e6 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/824234e6 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/824234e6 Branch: refs/heads/master Commit: 824234e627f6205129b7f97e2fde7f1cf1f17093 Parents: 8891549 Author: Daniel Kulp Authored: Tue Feb 10 09:14:28 2015 -0500 Committer: Daniel Kulp Committed: Tue Feb 10 09:18:09 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/824234e6/rt/databinding/aegis/pom.xml ---------------------------------------------------------------------- diff --git a/rt/databinding/aegis/pom.xml b/rt/databinding/aegis/pom.xml index 83a6df3..59729e2 100644 --- a/rt/databinding/aegis/pom.xml +++ b/rt/databinding/aegis/pom.xml @@ -30,6 +30,14 @@ 3.1.0-SNAPSHOT ../../../parent/pom.xml + + + + 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}" + + org.apache.cxf http://git-wip-us.apache.org/repos/asf/cxf/blob/824234e6/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 56f6a7e..d4fcb5a 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 WEB_PARAM = load("javax.jws.WebParam"); - private static final Class WEB_RESULT = load("javax.jws.WebResult"); + private static final Class WEB_PARAM = javax.jws.WebParam.class; + private static final Class WEB_RESULT = javax.jws.WebResult.class; private static final Class XML_ATTRIBUTE = - load("javax.xml.bind.annotation.XmlAttribute"); + javax.xml.bind.annotation.XmlAttribute.class; private static final Class XML_ELEMENT = - load("javax.xml.bind.annotation.XmlElement"); + javax.xml.bind.annotation.XmlElement.class; private static final Class XML_SCHEMA = - load("javax.xml.bind.annotation.XmlSchema"); + javax.xml.bind.annotation.XmlSchema.class; private static final Class XML_TYPE = - load("javax.xml.bind.annotation.XmlType"); + javax.xml.bind.annotation.XmlType.class; private static final Class XML_TRANSIENT = - load("javax.xml.bind.annotation.XmlTransient"); + javax.xml.bind.annotation.XmlTransient.class; public boolean isIgnored(AnnotatedElement element) { return isAnnotationPresent(element, @@ -362,15 +358,6 @@ public class AnnotationReader { return null; } - private static Class 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) {