-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2beta3
-
sparc
-
solaris_2.6
-
Verified
Name: akC57697 Date: 02/04/98
The java.awt.image.LookupTable c-tor does not work
because of "this" omitted in LookupTable source code.
-----
protected LookupTable(int offset, int numComponents) {
numComponents = numComponents; <-- "this." absent
offset = offset; <-- "this." absent
}
-----
------------------ Example -------------
import java.awt.image.LookupTable;
public class testBLT extends LookupTable {
// Create public c-tor
public testBLT (int offset, int numComponents) {
super(offset, numComponents);
}
public int[] lookupPixel(int a[], int b[]) { return null;}
public static void main(String s[]) {
byte b[]={1};
int magic=13;
testBLT table = new testBLT(magic, magic); // Try to set
if (table.getOffset()!=magic || table.getNumComponents()!=magic) {
System.out.println("Offset:"+table.getOffset()+" ws "+magic);
System.out.println("Components:"+table.getNumComponents()+" ws "+magic);
System.exit(0);
}
System.out.println("The test passed");
System.exit(0);
}
}
-----------------------------------------
Output:
java testBLT
Offset:0 ws 13
Components:0 ws 13
======================================================================
- duplicates
-
JDK-4109611 The java.awt.image.ByteLookupTable c-tor does not work with offset
- Closed