Unused Math.abs call in java.lang.FdLibm.Expm1#compute

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 23
    • Affects Version/s: 23
    • Component/s: core-libs
    • 21
    • b21

      IntelliJ IDEA highlights that initial assignment of 'y' is unnecessary.

      y = Math.abs(x);

      https://github.com/openjdk/jdk/blob/c9f8d0eff706d9ac59179afbb821367da09c9aae/src/java.base/share/classes/java/lang/FdLibm.java#L3008

      After removing assignment code is still compiles. So it seems unnecessary.

            Assignee:
            Joe Darcy
            Reporter:
            Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: