Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4862755
Votes 0
Synopsis IntegerSequence constructor ignore the range
Category jai:implementation
Reported Against 1.1.1
Release Fixed
State 3-Accepted, bug
Priority: 4-Low
Related Bugs
Submit Date 13-MAY-2003
Description




FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)


FULL OS VERSION :
 customer  Windows 2000 [Version 5.00.2195]


A DESCRIPTION OF THE PROBLEM :
The IntegerSequence(int min, int max) constructor create an empty sequence, thus ignoring the 'min' and 'max' arguments.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached test case.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
3
3
3
3

ACTUAL -
0
1
2
3


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.media.jai.*;

public class IntegerSequenceTest {
    public static void main(String[] args) {
        IntegerSequence test = new IntegerSequence(2, 4);
        System.out.println(test.getNumElements());
        for (int i=2; i<=4; i++) {
            test.insert(i);
            System.out.println(test.getNumElements());
        }
    }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Invokes IntegerSequence.insert(int) in a loop.
(Review ID: 185594) 
======================================================================
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang