-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MSHARED-1248] maven-dependency-analyzer should log instead of failing #89
Changes from 2 commits
70dc923
dd65dc0
6ef1964
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,9 @@ public void visitClass(String className, InputStream in) { | |
// some bug inside ASM causes an IOB exception. Log it and move on? | ||
// this happens when the class isn't valid. | ||
logger.warn("Unable to process: " + className); | ||
} catch (IllegalArgumentException e) { | ||
// [MSHARED-1248] should log instead of failing when analyzing a corrupted jar file | ||
logger.warn("Unable to process: " + className, e); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not sure if it will be the best solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @slawekjaranowski There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I see all project production and tests classes are analyzed. In specific project we know which classes are broken and which should be excluded. So we not need to ignore errors when we will can exclude what we want. @garydgregory - What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make this log message distinct. E.g. "Byte code of " + className + " is corrupt" and possibly include the name or path of the jar file in which the class appears. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @elharo |
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be helpful to include the exception in the warning here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elharo
I updated the call.