Remove assert from default method in java.util.zip.Checksum interface

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs

      The assert in the default java.util.zip.Checksum.update(ByteBuffer) method cases javac to generate a synthetic inner class to capture the "$assertionsDisabled" status.

      Usually a private static field is used in the class, but since this is an interface, private fields are not allowed so the nested class is generated.

      Since this is the only use of assert in a default method within java.base and the value of the assert seems not to be worth loading an extra class, I suggest we simply remove this assert.

            Assignee:
            Eirik Bjørsnøs
            Reporter:
            Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: