-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2.2
-
sparc
-
solaris_2.5
Name: vsC58871 Date: 08/21/98
com.sun.java.swing.text.GapContent constuctor GapContent(int i)
throws NullPointerException when i = 1.
Here is the example demonstrating the bug:
----------------Test.java---------------------
import com.sun.java.swing.text.*;
public class Test {
public static void main(String[] args){
try {
GapContent gc = new GapContent(1);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
-- The output ----------------
#>java -version
java version "1.2fcs"
Classic VM (build JDK-1.2fcs-G, green threads, sunwjit)
[vvs@knight:483] -- << ~/work/BugExamples/GapContent >>
#>java Test
java.lang.NullPointerException
at com.sun.java.swing.text.GapContent.findMarkAdjustIndex(Compiled
Code)
at com.sun.java.swing.text.GapContent.shiftEnd(Compiled Code)
at com.sun.java.swing.text.GapVector.open(Compiled Code)
at com.sun.java.swing.text.GapVector.replace(Compiled Code)
at com.sun.java.swing.text.GapContent.<init>(Compiled Code)
at Test.main(Compiled Code)
------------------------------
======================================================================