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

Remove unused redundant parameter in CLDRConverter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b114
    • CPU:
      generic
    • OS:
      generic

      Description

      The suspect code:

      private String getTarget(String qName, String path, String calType, String context, String width) {
           // qName
           int lastSlash = path.lastIndexOf('/');
           qName = path.substring(lastSlash+1);
           int bracket = qName.indexOf('[');
           if (bracket != -1) {
               qName = qName.substring(0, bracket);
           }

      So there's a 'qName' parameter to this method, but it is never used -- instead, it is immediately overwritten by a substring of 'path'.

      Here's the only call site:

      Entry<?> entry = (Entry<?>) currentContainer;
      String containerqName = entry.getParent().getqName();
      ...
      String target = getTarget(containerqName, entry.getKey(), ...

      So there's no obvious relationship between 'containerqName' and the eventual value of 'qName' in 'getTarget'.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                naoto Naoto Sato
                Reporter:
                naoto Naoto Sato
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: