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

Remove unused redundant parameter in CLDRConverter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • b114
    • generic
    • generic

      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'.

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

              Created:
              Updated:
              Resolved: