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

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

    XMLWordPrintable

Details

    • 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

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

              Dates

                Created:
                Updated:
                Resolved: