You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jon McLean (JIRA)" <ji...@codehaus.org> on 2014/05/22 18:42:10 UTC
[jira] (MSHADE-172) "java.lang.ArithmeticException: / by zero" in
MinijarFilter
Jon McLean created MSHADE-172:
---------------------------------
Summary: "java.lang.ArithmeticException: / by zero" in MinijarFilter
Key: MSHADE-172
URL: https://jira.codehaus.org/browse/MSHADE-172
Project: Maven Shade Plugin
Issue Type: Bug
Affects Versions: 2.3
Reporter: Jon McLean
Priority: Trivial
When classesTotal == 0 then the following generates an error:
{code:java}
log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" );
{code}
An IF conditional should be added so that this error is handled gracefully
{code:java}
if(classesTotal != 0) {
log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" );
} else {
log.info( "Minimized " + classesTotal + " -> " + classesKept);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)