### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: search/org/eclipse/jdt/internal/core/index/DiskIndex.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java,v retrieving revision 1.58 diff -u -r1.58 DiskIndex.java --- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 9 Mar 2007 17:16:42 -0000 1.58 +++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 5 Apr 2007 09:29:15 -0000 @@ -848,7 +848,7 @@ // how many characters can be decoded without refilling the buffer? int charsInBuffer = i + ((this.bufferEnd - this.bufferIndex) / 3); // all the characters must already be in the buffer if we're at the end of the stream - if (charsInBuffer > length || this.bufferEnd != this.streamBuffer.length) + if (charsInBuffer > length || this.bufferEnd != this.streamBuffer.length || stream == null) charsInBuffer = length; while (i < charsInBuffer) { byte b = this.streamBuffer[this.bufferIndex++];