[jboss-cvs] JBossAS SVN: r70265 - in projects/aop/trunk/aop/src/main/org/jboss/aop: util and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 29 07:50:55 EST 2008


Author: kabir.khan at jboss.com
Date: 2008-02-29 07:50:54 -0500 (Fri, 29 Feb 2008)
New Revision: 70265

Removed:
   projects/aop/trunk/aop/src/main/org/jboss/aop/util/MetaDataUtil.java
Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java
Log:
[JBAOP-526] Use metadata.isMetaDataPresent()


Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java	2008-02-29 12:18:12 UTC (rev 70264)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java	2008-02-29 12:50:54 UTC (rev 70265)
@@ -71,7 +71,6 @@
 import org.jboss.aop.metadata.MethodMetaData;
 import org.jboss.aop.metadata.SimpleMetaData;
 import org.jboss.aop.pointcut.PointcutMethodMatch;
-import org.jboss.aop.util.MetaDataUtil;
 import org.jboss.aop.util.UnmodifiableEmptyCollections;
 import org.jboss.metadata.spi.MetaData;
 import org.jboss.metadata.spi.signature.ConstructorSignature;
@@ -393,7 +392,7 @@
 
       if (metadata != null)
       {
-         if (MetaDataUtil.isAnnotationPresent(metadata, annotation)) return true;
+         if (metadata.isMetaDataPresent(annotation)) return true;
       }
 
       if (annotations.hasClassAnnotation(annotation)) return true;
@@ -596,7 +595,7 @@
             MetaData md = metadata.getComponentMetaData(sig);
             if (md != null)
             {
-               if (MetaDataUtil.isAnnotationPresent(metadata, annotation))
+               if (metadata.isMetaDataPresent(annotation))
                   return true;
             }
          }

Deleted: projects/aop/trunk/aop/src/main/org/jboss/aop/util/MetaDataUtil.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/util/MetaDataUtil.java	2008-02-29 12:18:12 UTC (rev 70264)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/util/MetaDataUtil.java	2008-02-29 12:50:54 UTC (rev 70265)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors. 
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/ 
-package org.jboss.aop.util;
-
-import java.lang.annotation.Annotation;
-
-import org.jboss.metadata.spi.MetaData;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class MetaDataUtil
-{
-   public static boolean isAnnotationPresent(MetaData metaData, String name)
-   {
-      if (metaData == null)
-         throw new IllegalArgumentException("Null metadata");
-
-      Object test = metaData.isMetaDataPresent(name);
-      return test != null && (test instanceof Annotation);
-   }
-}




More information about the jboss-cvs-commits mailing list