Skip to content

Commit 46cd558

Browse files
committed
Fixed code to log a warning if loading the class for byte code filtering fails (ocpsoft#228, ocpsoft#230)
1 parent 86e8fc6 commit 46cd558

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/WebClassesFinder.java‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,15 @@ private void handleClassEntry(URL entryUrl, String entryName, ClassVisitor visit
170170
{
171171

172172
/*
173-
* Try to open the .class file. If an IOException is thrown, we will scan it anyway.
173+
* Try to open the .class file. if this isn't possible, we will scan it anyway.
174174
*/
175-
try
176-
{
177-
classFileStream = servletContext.getResourceAsStream(entryName);
178-
}
179-
catch (Exception e)
175+
classFileStream = servletContext.getResourceAsStream(entryName);
176+
177+
if (classFileStream == null)
180178
{
181179
if (log.isDebugEnabled())
182180
{
183-
log.debug("Cound not obtain InputStream for class file: " + entryName, e);
181+
log.debug("Could not obtain InputStream for class file: " + entryName);
184182
}
185183
}
186184

0 commit comments

Comments
 (0)