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

(pref) Dead store to local variable in method java.util.prefs.XmlSupport.loadPrefsDoc(InputStream)

    Details

    • Subcomponent:
    • Resolved In Build:
      b25
    • CPU:
      generic
    • OS:
      generic

      Description

      In method java.util.prefs.XmlSupport.loadPrefsDoc(InputStream) there is an assignment to a local object called r, but it is never used in the method.

         private static Document loadPrefsDoc(InputStream in)
              throws SAXException, IOException
          {
              Resolver r = new Resolver(); // <------- here
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              dbf.setIgnoringElementContentWhitespace(true);
              dbf.setValidating(true);
              dbf.setCoalescing(true);
              dbf.setIgnoringComments(true);
              try {
                  DocumentBuilder db = dbf.newDocumentBuilder();
                  db.setEntityResolver(new Resolver()); // <----- we create it here anyway
                  db.setErrorHandler(new EH());
                  return db.parse(new InputSource(in));
              } catch (ParserConfigurationException e) {
                  throw new AssertionError(e);
              }
          }


      ###@###.### 2005-2-11 11:33:19 GMT

        Attachments

          Activity

            People

            • Assignee:
              sherman Xueming Shen
              Reporter:
              jloefflm Johann Löfflmann (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: