src/share/classes/com/sun/tools/javac/jvm/ClassReader.java

changeset 424
86b773b7cb40
parent 418
4776a869fdfa
child 428
2485f5641ed0
     1.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Tue Oct 13 15:26:30 2009 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Wed Oct 14 15:41:28 2009 -0700
     1.3 @@ -2632,10 +2632,20 @@
     1.4              return true; // fail-safe mode
     1.5          }
     1.6  
     1.7 +        /**
     1.8 +         * Check if two file objects are equal.
     1.9 +         * SourceFileObjects are just placeholder objects for the value of a
    1.10 +         * SourceFile attribute, and do not directly represent specific files.
    1.11 +         * Two SourceFileObjects are equal if their names are equal.
    1.12 +         */
    1.13          @Override
    1.14          public boolean equals(Object other) {
    1.15 +            if (this == other)
    1.16 +                return true;
    1.17 +
    1.18              if (!(other instanceof SourceFileObject))
    1.19                  return false;
    1.20 +
    1.21              SourceFileObject o = (SourceFileObject) other;
    1.22              return name.equals(o.name);
    1.23          }

mercurial