-
Bug
-
Resolution: Fixed
-
P4
-
1.0beta, 1.4.0
-
hopper
-
x86, sparc
-
linux_redhat_7.2, solaris_2.6
Name: dsR10051 Date: 08/07/2001
Javadoc spec for method of class java.awt.Scrollbar:
public void setMinimum(int newMinimum)
is incomplete. If newMinimum value is equal to Integer.MIN_VALUE,
the minimum property of Scrollbar is set to Integer.MIN_VALUE - 1.
It should be documented.
Here is example:
import java.awt.*;
public class ScrollbarTest01{
public static void main(String[] args){
Scrollbar sb = new Scrollbar();
sb.setMinimum(Integer.MAX_VALUE);
System.out.println("Integer.MAX_VALUE: " + Integer.MAX_VALUE);
System.out.println("MINIMUM : " + sb.getMinimum());
System.out.println("MINIMUM == Integer.MAX_VALUE - 1: " +
(sb.getMinimum() == Integer.MAX_VALUE - 1));
}
}
--- Output ---
%/set/jdk-builds/JDK1.4.0beta-b74/solaris/bin/java ScrollbarTest01
Integer.MAX_VALUE: 2147483647
MINIMUM : 2147483646
MINIMUM == Integer.MAX_VALUE - 1: true
======================================================================