View | Details | Raw Unified | Return to bug 124646
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java (-10 / +15 lines)
Lines 51-56 Link Here
51
	private char[] enclosingTypeName;
51
	private char[] enclosingTypeName;
52
	private char[][][] missingTypeNames;
52
	private char[][][] missingTypeNames;
53
	private int enclosingNameAndTypeIndex;
53
	private int enclosingNameAndTypeIndex;
54
	private char[] enclosingMethod;
54
55
55
private static String printTypeModifiers(int modifiers) {
56
private static String printTypeModifiers(int modifiers) {
56
	java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
57
	java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
Lines 451-467 Link Here
451
	if (this.enclosingNameAndTypeIndex <= 0) {
452
	if (this.enclosingNameAndTypeIndex <= 0) {
452
		return null;
453
		return null;
453
	}
454
	}
454
	// read the name
455
	if (this.enclosingMethod == null) {
455
	StringBuffer buffer = new StringBuffer();
456
		// read the name
457
		StringBuffer buffer = new StringBuffer();
458
		
459
		int nameAndTypeOffset = this.constantPoolOffsets[this.enclosingNameAndTypeIndex];
460
		int utf8Offset = this.constantPoolOffsets[u2At(nameAndTypeOffset + 1)];
461
		buffer.append(utf8At(utf8Offset + 3, u2At(utf8Offset + 1)));
456
	
462
	
457
	int nameAndTypeOffset = this.constantPoolOffsets[this.enclosingNameAndTypeIndex];
463
		utf8Offset = this.constantPoolOffsets[u2At(nameAndTypeOffset + 3)];
458
	int utf8Offset = this.constantPoolOffsets[u2At(nameAndTypeOffset + 1)];
464
		buffer.append(utf8At(utf8Offset + 3, u2At(utf8Offset + 1)));
459
	buffer.append(utf8At(utf8Offset + 3, u2At(utf8Offset + 1)));
465
	
460
466
		this.enclosingMethod = String.valueOf(buffer).toCharArray();
461
	utf8Offset = this.constantPoolOffsets[u2At(nameAndTypeOffset + 3)];
467
	}
462
	buffer.append(utf8At(utf8Offset + 3, u2At(utf8Offset + 1)));
468
	return this.enclosingMethod;
463
464
	return String.valueOf(buffer).toCharArray();
465
}
469
}
466
470
467
/*
471
/*
Lines 1072-1077 Link Here
1072
				this.annotations[i].initialize();
1076
				this.annotations[i].initialize();
1073
			}
1077
			}
1074
		}
1078
		}
1079
		this.getEnclosingMethod();
1075
		reset();
1080
		reset();
1076
	} catch(RuntimeException e) {
1081
	} catch(RuntimeException e) {
1077
		ClassFormatException exception = new ClassFormatException(e, this.classFileName);
1082
		ClassFormatException exception = new ClassFormatException(e, this.classFileName);

Return to bug 124646