Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8264485

build.tools.depend.Depend.toString(byte[]) creates malformed hex strings

    XMLWordPrintable

    Details

    • Resolved In Build:
      b26

      Description

      A DESCRIPTION OF THE PROBLEM :
      The code currently uses:
              for (byte b : digest) {
                  result.append(String.format("%X", b));
              }
      This will have incorrect results for byte values < 16 for which the pattern will only produce one hex char, so for example `1, 0` and `16` both would have the result `"10"`.
      This should probably instead use the newly added java.util.HexFormat.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asotona Adam Sotona
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: