View | Details | Raw Unified | Return to bug 110771 | Differences between
and this patch

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/CompilationUnit.java (-3 / +7 lines)
Lines 88-96 Link Here
88
	if (buffer == null) {
88
	if (buffer == null) {
89
		buffer = openBuffer(pm, unitInfo); // open buffer independently from the info, since we are building the info
89
		buffer = openBuffer(pm, unitInfo); // open buffer independently from the info, since we are building the info
90
	}
90
	}
91
	final char[] contents = buffer == null ? 
91
	final char[] contents;
92
			CharOperation.NO_CHAR : 
92
	if (buffer == null) {
93
			buffer.getCharacters();
93
		contents = CharOperation.NO_CHAR ;
94
	} else {
95
		char[] characters = buffer.getCharacters();
96
		contents = characters == null ? CharOperation.NO_CHAR : characters;
97
	}
94
98
95
	// generate structure and compute syntax problems if needed
99
	// generate structure and compute syntax problems if needed
96
	CompilationUnitStructureRequestor requestor = new CompilationUnitStructureRequestor(this, unitInfo, newElements);
100
	CompilationUnitStructureRequestor requestor = new CompilationUnitStructureRequestor(this, unitInfo, newElements);
(-)model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java (-1 / +5 lines)
Lines 51-57 Link Here
51
51
52
public char[] getContents() {
52
public char[] getContents() {
53
	try {
53
	try {
54
		return getBuffer().getCharacters();
54
		IBuffer buffer = getBuffer();
55
		if (buffer == null) return CharOperation.NO_CHAR;
56
		char[] characters = buffer.getCharacters();
57
		if (characters == null) return CharOperation.NO_CHAR;
58
		return characters;
55
	} catch (JavaModelException e) {
59
	} catch (JavaModelException e) {
56
		return CharOperation.NO_CHAR;
60
		return CharOperation.NO_CHAR;
57
	}
61
	}

Return to bug 110771