Uploaded image for project: 'Maven Shade Plugin'
  1. Maven Shade Plugin
  2. MSHADE-172

"java.lang.ArithmeticException: / by zero" in MinijarFilter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.3
    • 2.4, 2.4.2
    • None

    Description

      When classesTotal == 0 then the following generates an error:

      log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" );
      

      An IF conditional should be added so that this error is handled gracefully

      if(classesTotal != 0) {
           log.info( "Minimized " + classesTotal + " -> " + classesKept + " (" + 100 * classesKept / classesTotal + "%)" );
      } else {
          log.info( "Minimized " + classesTotal + " -> " + classesKept);
      }
      

      Attachments

        Issue Links

          Activity

            People

              khmarbaise Karl Heinz Marbaise
              mclean Jon McLean
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: