Index: compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java =================================================================== RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java,v retrieving revision 1.46 diff -u -r1.46 ClassFileReader.java --- compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java 27 May 2004 14:41:39 -0000 1.46 +++ compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java 17 Jun 2004 11:12:22 -0000 @@ -464,10 +464,10 @@ * @return boolean */ public boolean isLocal() { - return - this.innerInfo != null - && this.innerInfo.getEnclosingTypeName() == null - && this.innerInfo.getSourceName() != null; + if (this.innerInfo == null) return false; + if (this.innerInfo.getEnclosingTypeName() != null) return false; + char[] sourceName = this.innerInfo.getSourceName(); + return (sourceName != null && sourceName.length > 0); } /** * Answer true if the receiver is a member type, false otherwise @@ -475,7 +475,10 @@ * @return boolean */ public boolean isMember() { - return this.innerInfo != null && this.innerInfo.getEnclosingTypeName() != null; + if (this.innerInfo == null) return false; + if (this.innerInfo.getEnclosingTypeName() == null) return false; + char[] sourceName = this.innerInfo.getSourceName(); + return (sourceName != null && sourceName.length > 0); // protection against ill-formed attributes (67600) } /** * Answer true if the receiver is a nested type, false otherwise Index: model/org/eclipse/jdt/internal/core/SourceMapper.java =================================================================== RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java,v retrieving revision 1.89 diff -u -r1.89 SourceMapper.java --- model/org/eclipse/jdt/internal/core/SourceMapper.java 16 Jun 2004 11:52:12 -0000 1.89 +++ model/org/eclipse/jdt/internal/core/SourceMapper.java 17 Jun 2004 11:12:22 -0000 @@ -858,7 +858,12 @@ return enclosingType.getElementName() + SUFFIX_STRING_java; } else if (info.isLocal() || info.isAnonymous()){ String typeQualifiedName = type.getTypeQualifiedName(); - return typeQualifiedName.substring(0, typeQualifiedName.indexOf('$')) + SUFFIX_STRING_java; + int dollar = typeQualifiedName.indexOf('$'); + if (dollar == -1) { + // malformed inner type: name doesn't contain a dollar + return type.getElementName() + SUFFIX_STRING_java; + } + return typeQualifiedName.substring(0, dollar) + SUFFIX_STRING_java; } else { return type.getElementName() + SUFFIX_STRING_java; }