You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by da...@apache.org on 2017/02/09 04:38:02 UTC
svn commit: r1782291 -
/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/Util.java
Author: davidb
Date: Thu Feb 9 04:38:02 2017
New Revision: 1782291
URL: http://svn.apache.org/viewvc?rev=1782291&view=rev
Log:
FELIX-5530 Don't process methods declared on the Annotation class
Patch applied on behalf of Raymond Aug� with many thanks.
This closes https://github.com/apache/felix/pull/91
Modified:
felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/Util.java
Modified: felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/Util.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/Util.java?rev=1782291&r1=1782290&r2=1782291&view=diff
==============================================================================
--- felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/Util.java (original)
+++ felix/trunk/converter/converter/src/main/java/org/apache/felix/converter/impl/Util.java Thu Feb 9 04:38:02 2017
@@ -16,6 +16,7 @@
*/
package org.apache.felix.converter.impl;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -160,8 +161,9 @@ class Util {
if (md.getParameterTypes().length > 1)
return null; // not an accessor
- if (Object.class.equals(md.getDeclaringClass()))
- return null; // do not use any methods on the Object class as a accessor
+ if (Object.class.equals(md.getDeclaringClass()) ||
+ Annotation.class.equals(md.getDeclaringClass()))
+ return null; // do not use any methods on the Object or Annotation class as a accessor
return md.getName().replace('_', '.'); // TODO support all the escaping mechanisms.
}