1818
1919import java .io .IOException ;
2020
21+ import org .apache .commons .logging .Log ;
22+ import org .apache .commons .logging .LogFactory ;
23+
2124import org .springframework .core .type .ClassMetadata ;
2225import org .springframework .core .type .classreading .MetadataReader ;
2326import org .springframework .core .type .classreading .MetadataReaderFactory ;
3639 */
3740public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilter {
3841
42+ protected final Log logger = LogFactory .getLog (getClass ());
43+
3944 private final boolean considerInherited ;
4045
4146 private final boolean considerInterfaces ;
@@ -72,10 +77,16 @@ public boolean match(MetadataReader metadataReader, MetadataReaderFactory metada
7277 }
7378 else {
7479 // Need to read super class to determine a match...
75- if (match (metadata .getSuperClassName (), metadataReaderFactory )) {
76- return true ;
80+ try {
81+ if (match (metadata .getSuperClassName (), metadataReaderFactory )) {
82+ return true ;
83+ }
7784 }
78- }
85+ catch (IOException ex ) {
86+ logger .debug ("Could not read super class [" + metadata .getSuperClassName () +
87+ "] of type-filtered class [" + metadata .getClassName () + "]" );
88+ }
89+ }
7990 }
8091 }
8192
@@ -90,8 +101,14 @@ public boolean match(MetadataReader metadataReader, MetadataReaderFactory metada
90101 }
91102 else {
92103 // Need to read interface to determine a match...
93- if (match (ifc , metadataReaderFactory )) {
94- return true ;
104+ try {
105+ if (match (ifc , metadataReaderFactory )) {
106+ return true ;
107+ }
108+ }
109+ catch (IOException ex ) {
110+ logger .debug ("Could not read interface [" + ifc + "] for type-filtered class [" +
111+ metadata .getClassName () + "]" );
95112 }
96113 }
97114 }
0 commit comments