mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Restore assertion statements in tm.terminal
Change-Id: I37c18cb5274d589feae941386ce912eb5ba2b94c Signed-off-by: gwatson <g.watson@computer.org>
This commit is contained in:
parent
6375198da9
commit
eacc6dd5ba
9 changed files with 75 additions and 35 deletions
|
@ -1,6 +1,13 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.4
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
|
@ -8,20 +15,25 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
|||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=warning
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
|
||||
|
@ -32,43 +44,71 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.3
|
||||
org.eclipse.jdt.core.compiler.source=1.4
|
||||
|
|
|
@ -206,7 +206,7 @@ public class VT100EmulatorBackend implements IVT100EmulatorBackend {
|
|||
synchronized (fTerminal) {
|
||||
if(!isCusorInScrollingRegion())
|
||||
return;
|
||||
// assert n>0;
|
||||
assert n>0;
|
||||
int line=toAbsoluteLine(fCursorLine);
|
||||
int nLines=fTerminal.getHeight()-line;
|
||||
fTerminal.scroll(line, nLines, n);
|
||||
|
@ -236,7 +236,7 @@ public class VT100EmulatorBackend implements IVT100EmulatorBackend {
|
|||
synchronized (fTerminal) {
|
||||
if(!isCusorInScrollingRegion())
|
||||
return;
|
||||
// assert n>0;
|
||||
assert n>0;
|
||||
int line=toAbsoluteLine(fCursorLine);
|
||||
int nLines=fTerminal.getHeight()-line;
|
||||
fTerminal.scroll(line, nLines, -n);
|
||||
|
|
|
@ -254,7 +254,7 @@ public class SnapshotChanges implements ISnapshotChanges {
|
|||
* @param shift must be negative!
|
||||
*/
|
||||
private void scrollChangesLinesWithNegativeShift(int line, int n, int shift) {
|
||||
// assert shift <0 || throwRuntimeException();
|
||||
assert shift <0 || throwRuntimeException();
|
||||
// scroll the region
|
||||
// don't run out of bounds!
|
||||
int m=Math.min(line+n+shift,getChangedLineLength()+shift);
|
||||
|
|
|
@ -34,8 +34,8 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
fMaxHeight=maxHeight;
|
||||
fData=data;
|
||||
fData.setDimensions(maxHeight, fData.getWidth());
|
||||
// if(maxHeight>2)
|
||||
// assert shiftOffset(-2) || throwRuntimeException();
|
||||
if(maxHeight>2)
|
||||
assert shiftOffset(-2) || throwRuntimeException();
|
||||
}
|
||||
public TerminalTextDataFastScroll(int maxHeight) {
|
||||
this(new TerminalTextDataStore(),maxHeight);
|
||||
|
@ -64,7 +64,7 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
* @param delta
|
||||
*/
|
||||
void moveOffset(int delta) {
|
||||
// assert Math.abs(delta)<fMaxHeight || throwRuntimeException();
|
||||
assert Math.abs(delta)<fMaxHeight || throwRuntimeException();
|
||||
fOffset=(fMaxHeight+fOffset+delta)%fMaxHeight;
|
||||
|
||||
}
|
||||
|
@ -101,19 +101,19 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
}
|
||||
|
||||
public void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine, int length) {
|
||||
// assert (destStartLine>=0 && destStartLine+length<=fHeight) || throwRuntimeException();
|
||||
assert (destStartLine>=0 && destStartLine+length<=fHeight) || throwRuntimeException();
|
||||
for (int i = 0; i < length; i++) {
|
||||
fData.copyLine(source, i+sourceStartLine, getPositionOfLine(i+destStartLine));
|
||||
}
|
||||
}
|
||||
|
||||
public char getChar(int line, int column) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
return fData.getChar(getPositionOfLine(line), column);
|
||||
}
|
||||
|
||||
public char[] getChars(int line) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
return fData.getChars(getPositionOfLine(line));
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
}
|
||||
|
||||
public LineSegment[] getLineSegments(int line, int startCol, int numberOfCols) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
return fData.getLineSegments(getPositionOfLine(line), startCol, numberOfCols);
|
||||
}
|
||||
|
||||
|
@ -131,12 +131,12 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
}
|
||||
|
||||
public Style getStyle(int line, int column) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
return fData.getStyle(getPositionOfLine(line), column);
|
||||
}
|
||||
|
||||
public Style[] getStyles(int line) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
return fData.getStyles(getPositionOfLine(line));
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
}
|
||||
}
|
||||
public void scroll(int startLine, int size, int shift) {
|
||||
// assert (startLine>=0 && startLine+size<=fHeight) || throwRuntimeException();
|
||||
assert (startLine>=0 && startLine+size<=fHeight) || throwRuntimeException();
|
||||
if(shift>=fMaxHeight || -shift>=fMaxHeight) {
|
||||
cleanLines(startLine, fMaxHeight-startLine);
|
||||
return;
|
||||
|
@ -187,23 +187,23 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
}
|
||||
|
||||
public void setChar(int line, int column, char c, Style style) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
fData.setChar(getPositionOfLine(line), column, c, style);
|
||||
}
|
||||
|
||||
public void setChars(int line, int column, char[] chars, int start, int len, Style style) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
fData.setChars(getPositionOfLine(line), column, chars, start, len, style);
|
||||
}
|
||||
|
||||
public void setChars(int line, int column, char[] chars, Style style) {
|
||||
// assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
assert (line>=0 && line<fHeight) || throwRuntimeException();
|
||||
fData.setChars(getPositionOfLine(line), column, chars, style);
|
||||
}
|
||||
|
||||
public void setDimensions(int height, int width) {
|
||||
// assert height>=0 || throwRuntimeException();
|
||||
// assert width>=0 || throwRuntimeException();
|
||||
assert height>=0 || throwRuntimeException();
|
||||
assert width>=0 || throwRuntimeException();
|
||||
if(height > fMaxHeight)
|
||||
setMaxHeight(height);
|
||||
fHeight=height;
|
||||
|
@ -212,7 +212,7 @@ public class TerminalTextDataFastScroll implements ITerminalTextData {
|
|||
}
|
||||
|
||||
public void setMaxHeight(int maxHeight) {
|
||||
// assert maxHeight>=fHeight || throwRuntimeException();
|
||||
assert maxHeight>=fHeight || throwRuntimeException();
|
||||
// move everything to offset0
|
||||
int start=getPositionOfLine(0);
|
||||
if(start!=0) {
|
||||
|
|
|
@ -267,8 +267,8 @@ class TerminalTextDataSnapshot implements ITerminalTextDataSnapshot {
|
|||
}
|
||||
|
||||
public void setInterestWindow(int startLine, int size) {
|
||||
// assert startLine>=0 || throwRuntimeException();
|
||||
// assert size>=0 || throwRuntimeException();
|
||||
assert startLine>=0 || throwRuntimeException();
|
||||
assert size>=0 || throwRuntimeException();
|
||||
fInterestWindowStartLine=startLine;
|
||||
fInterestWindowSize=size;
|
||||
fSnapshot.setWindow(startLine, size);
|
||||
|
|
|
@ -62,8 +62,8 @@ public class TerminalTextDataStore implements ITerminalTextData {
|
|||
* @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#setDimensions(int, int)
|
||||
*/
|
||||
public void setDimensions(int height, int width) {
|
||||
// assert height>=0 || throwRuntimeException();
|
||||
// assert width>=0 || throwRuntimeException();
|
||||
assert height>=0 || throwRuntimeException();
|
||||
assert width>=0 || throwRuntimeException();
|
||||
// just extend the region
|
||||
if(height>fChars.length) {
|
||||
int h=4*height/3;
|
||||
|
@ -144,7 +144,7 @@ public class TerminalTextDataStore implements ITerminalTextData {
|
|||
* @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getChar(int, int)
|
||||
*/
|
||||
public char getChar(int line, int column) {
|
||||
// assert column<fWidth || throwRuntimeException();
|
||||
assert column<fWidth || throwRuntimeException();
|
||||
if(fChars[line]==null||column>=fChars[line].length)
|
||||
return 0;
|
||||
return fChars[line][column];
|
||||
|
@ -153,7 +153,7 @@ public class TerminalTextDataStore implements ITerminalTextData {
|
|||
* @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getStyle(int, int)
|
||||
*/
|
||||
public Style getStyle(int line, int column) {
|
||||
// assert column<fWidth || throwRuntimeException();
|
||||
assert column<fWidth || throwRuntimeException();
|
||||
if(fStyle[line]==null || column>=fStyle[line].length)
|
||||
return null;
|
||||
return fStyle[line][column];
|
||||
|
@ -202,7 +202,7 @@ public class TerminalTextDataStore implements ITerminalTextData {
|
|||
* @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#scroll(int, int, int)
|
||||
*/
|
||||
public void scroll(int startLine, int size, int shift) {
|
||||
// assert startLine+size <= getHeight() || throwRuntimeException();
|
||||
assert startLine+size <= getHeight() || throwRuntimeException();
|
||||
if(shift<0) {
|
||||
// move the region up
|
||||
// shift is negative!!
|
||||
|
|
|
@ -128,7 +128,7 @@ public class TerminalTextDataWindow implements ITerminalTextData {
|
|||
fData.copyLine(source, sourceLine, destLine-fWindowStartLine);
|
||||
}
|
||||
public void scroll(int startLine, int size, int shift) {
|
||||
// assert (startLine>=0 && startLine+size<=fHeight) || throwRuntimeException();
|
||||
assert (startLine>=0 && startLine+size<=fHeight) || throwRuntimeException();
|
||||
int n=size;
|
||||
int start=startLine-fWindowStartLine;
|
||||
// if start outside our range, cut the length to copy
|
||||
|
@ -157,7 +157,7 @@ public class TerminalTextDataWindow implements ITerminalTextData {
|
|||
fData.setChars(line-fWindowStartLine, column, chars, style);
|
||||
}
|
||||
public void setDimensions(int height, int width) {
|
||||
// assert height>=0 || throwRuntimeException();
|
||||
assert height>=0 || throwRuntimeException();
|
||||
fData.setDimensions(fWindowSize, width);
|
||||
fHeight=height;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ public class TerminalTextDataWindow implements ITerminalTextData {
|
|||
fMaxHeight=height;
|
||||
}
|
||||
public void setWindow(int startLine, int size) {
|
||||
// assert startLine+size<=getHeight()||throwRuntimeException();
|
||||
assert startLine+size<=getHeight()||throwRuntimeException();
|
||||
fWindowStartLine=startLine;
|
||||
fWindowSize=size;
|
||||
fData.setDimensions(fWindowSize, getWidth());
|
||||
|
|
|
@ -231,7 +231,7 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
|
|||
fCurrentSelection=extractSelectedText();
|
||||
}
|
||||
private void doSetSelection(int startLine, int endLine, int startColumn, int endColumn) {
|
||||
// assert(startLine<0 || startLine<=endLine);
|
||||
assert(startLine<0 || startLine<=endLine);
|
||||
if(startLine>=0) {
|
||||
if(fSelectionSnapshot==null) {
|
||||
fSelectionSnapshot=fSnapshot.getTerminalTextData().makeSnapshot();
|
||||
|
|
|
@ -97,7 +97,7 @@ public class PipedInputStream extends InputStream {
|
|||
return fBuffer.length - fUsedSlots;
|
||||
}
|
||||
public void write(byte[] b, int off, int len) throws InterruptedException {
|
||||
// assert len<=getFreeSlots();
|
||||
assert len<=getFreeSlots();
|
||||
while (fUsedSlots == fBuffer.length)
|
||||
// wait until not full
|
||||
wait();
|
||||
|
@ -133,7 +133,7 @@ public class PipedInputStream extends InputStream {
|
|||
return b;
|
||||
}
|
||||
public int read(byte[] cbuf, int off, int len) throws InterruptedException {
|
||||
// assert len<=available();
|
||||
assert len<=available();
|
||||
while (fUsedSlots == 0) {
|
||||
if(fClosed)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue