JDK-4482276 : Webbug: awt_4147957.java Failed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_2.6
  • CPU: generic
  • Submitted: 2001-07-20
  • Updated: 2001-07-23
  • Resolved: 2001-07-23
Related Reports
Relates :  
Description
The Webbug test failed on Merlin B71.

 OS's= WinNT, Sol6, sol9
testsuite=/sqesvr.eng/st3/webbug/testbase/src/webbug-test/classes-awt/awt_4147957/
source=awt_4147957.java

TEST CODE


import java.awt.*;
import java.awt.image.*;
import java.awt.geom.*;


public class awt_4147957 extends Frame{
  public static void main (String [] args){
    new awt_4147957();
  }
  public awt_4147957(){
    setSize(200,200);
    show();
    validate();
  }

    public void paint(Graphics g){
      Rectangle r1 = new Rectangle(0,0,100,100);
      Rectangle r2 = new Rectangle(200,200,20,20);
      Rectangle r3 = r1.intersection(r2);
      System.out.println("intersect    :(" + (int)r3.getX() + "," + (int)r3.getY() + "," + (int)r3.getWidth() + "," + (int)r3.getHeight()
 + ")" );
      g.setClip(r3);
        String s1 = new String("(0,0,0,0)");
      Rectangle r4 = g.getClipBounds();
      String s2 = new String("(" + (int)r4.getX() + "," + (int)r4.getY() + "," + (int)r4.getWidth() + "," + (int)r4.getHeight() + ")");
      if (s2.equals(s1)) {
         System.out.println("Problem fixed.");
         System.exit(0);
      }
        System.out.println("Problem is not fixed.");
      System.exit(1);
    }

}
---------------------------------------------------------------
TEST RESULTS WITH B71

intersect    :(200,200,-100,-100)

Problem is not fixed.
--------------------------------------------------------------
TEST RESULTS WITH B62

intersect    :(0,0,0,0)

Problem Fixed.

IMP: Webbug  are not tested from  B64 to B70(Milestone once) , However later I tested on B69 and B70 It is failing.


Comments
EVALUATION It looks like they are testing the rectangle intersection code, so I am reassigning to 2D. eric.hawkes@eng 2001-07-23 Intersections with width or height <= 0 means that there is no intersection. jeannette.hung@Eng 2001-07-23
23-07-2001