- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
  P3                     
     - 
    1.2.0
 
- 
        1.2.2
 - 
        sparc
 - 
        solaris_2.5.1
 - 
        Verified
 
Name: akC57697 Date: 11/18/97
The method createCustomCursor(..,Point hotSpot,..) does not check
negative x and y of the hotSpot when creates Cursor under Solaris
and Windows95.
The comment for method Toolkit.createCustomCursor() says
"
exception IndexOutOfBoundsException if the hotSpot values are
outside the bounds of the cursor."
-------------------Example-----------------------------------
import java.awt.*;
public class CCursor {
public static void main(String s[]) {
Image image = Toolkit.getDefaultToolkit().getImage("smiley.gif");
Point p =new Point(-1000,-1000);
try {
Cursor cur=Toolkit.getDefaultToolkit().createCustomCursor(image, p,"Test");
} catch (IndexOutOfBoundsException e) {
System.out.println("OKAY");
System.exit(0);
}
catch (Exception e) {
System.out.println("Unexpected "+e);
System.exit(0);
}
System.out.println("No IndexOutOfBoundsException with Point="+p);
System.exit(0);
}
}
-------------------Output------------------------------------
(javator 72): java -fullversion
java full version "JDK1.2U"
(javator 73): javac CCursor.java
(javator 74): java CCursor
Warning: runtime not compliant with JNI rules: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCritical or Get/ReleaseStringCritical
Run java_g for a Java stacktrace
Further JNI noncompliance warnings are suppressed
No IndexOutOfBoundsException with Point=java.awt.Point[x=-1000,y=-1000]
======================================================================