-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.0
-
sparc
-
solaris_2.5.1
Test program below does not throw exceptions when srcBegin == srcEnd == strlen(text)
import java.awt.font.StyledString;
import java.awt.Font;
public class GetCharsTest {
public static void main (String args[]) {
try {
char cArray6[] = new char[6];
String string2 = "123456";
Font font2 = new Font("Helvetica",Font.BOLD,12);
StyledString s = new StyledString(string2,font2);
System.out.println("character " + s.charAt(0) );
System.out.println("character " + s.charAt(5) );
// System.out.println("character " + s.charAt(6) );
// System.out.println("character " + s.charAt(7) );
System.out.println("character " + s.charAt(0) );
System.out.println("character " + s.getFontAt(0) );
System.out.println("character " + s.getFontAt(6) );
System.out.println("character " + s.getFontAt(5) );
// System.out.println("character " + s.getFontAt(7) );
// System.out.println("character " + s.getFontAt(-1) );
System.out.println("string " + s.toString() );
System.out.println("length " + s.length() );
// StyledString aStyledString = s.substring(1,2);
s.getChars(6, 6, cArray6, 0); //bug
// s.getChars(0, 7, cArray6, 0);
// s.getChars(7, 7, cArray6, 0);
s = new StyledString();
System.out.println("length " + s.length() );
} catch (Throwable exception) {
System.out.println("Exception" + exception);
}
System.out.println("Done ssf");
System.exit(0);
}
}
import java.awt.font.StyledString;
import java.awt.Font;
public class GetCharsTest {
public static void main (String args[]) {
try {
char cArray6[] = new char[6];
String string2 = "123456";
Font font2 = new Font("Helvetica",Font.BOLD,12);
StyledString s = new StyledString(string2,font2);
System.out.println("character " + s.charAt(0) );
System.out.println("character " + s.charAt(5) );
// System.out.println("character " + s.charAt(6) );
// System.out.println("character " + s.charAt(7) );
System.out.println("character " + s.charAt(0) );
System.out.println("character " + s.getFontAt(0) );
System.out.println("character " + s.getFontAt(6) );
System.out.println("character " + s.getFontAt(5) );
// System.out.println("character " + s.getFontAt(7) );
// System.out.println("character " + s.getFontAt(-1) );
System.out.println("string " + s.toString() );
System.out.println("length " + s.length() );
// StyledString aStyledString = s.substring(1,2);
s.getChars(6, 6, cArray6, 0); //bug
// s.getChars(0, 7, cArray6, 0);
// s.getChars(7, 7, cArray6, 0);
s = new StyledString();
System.out.println("length " + s.length() );
} catch (Throwable exception) {
System.out.println("Exception" + exception);
}
System.out.println("Done ssf");
System.exit(0);
}
}