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

Dead store to local variable in javax.swing.plaf.basic.BasicFileChooserUI$GlobFilter.setPattern

XMLWordPrintable

    • b32
    • generic
    • generic

      In method javax.swing.plaf.basic.BasicFileChooserUI$GlobFilter.setPattern(String) there is an assignment to a local object called "buf", but it is never used in the method.

      public class BasicFileChooserUI extends FileChooserUI {
      [--snip--]
          class GlobFilter extends FileFilter {
      Pattern pattern;
      String globPattern;

      public void setPattern(String globPattern) {
      char[] gPat = globPattern.toCharArray();
      char[] rPat = new char[gPat.length * 2];
      boolean isWin32 = (File.separatorChar == '\\');
      boolean inBrackets = false;
      StringBuffer buf = new StringBuffer(); // <-----------here
      int j = 0;
      [--snip--]

      ###@###.### 2005-03-10 16:22:20 GMT

            shickeysunw Shannon Hickey (Inactive)
            jloefflm Johann Löfflmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: