JDK-4770290 : JCK1.4a-runtime api/java_awt/interactive/ComponentTests.html#ComponentTests fail
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_98
  • CPU: x86
  • Submitted: 2002-10-29
  • Updated: 2002-11-18
  • Resolved: 2002-11-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Description

Name: iaR10016			Date: 10/29/2002


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.4.2-b04
                 (the test passes with JDK1.4.2-b03)
JCK            : JCK1.4a-runtime
Platform[s]    : Windows 98, Windows NT, Windows 2000
                 (the test passes under RedHat Linux OS)
switch/Mode    : default
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Falling test[s]: api/java_awt/interactive/ComponentTests.html#ComponentTests [ComponentTest0015]

JCK1.4a-runtime api/java_awt/interactive/ComponentTests.html#ComponentTests test fails on JDK1.4.2-b04
because method graphics.fillPoligon( int[], int[], int ) does not work as expected under Windows OS.

The following test example demonstrates the bug:

--------- test.java ---------
import java.awt.*;

public class test extends Frame {

    public static void main(String[] args) {
       test ctest = new test();
       ctest.setSize(330, 240);
       ctest.setVisible(true);
    }

    test () {
        super();
        add(new Canv());
    }

    class Canv extends Canvas {
        public Canv(){
           super();
        }
        public void paint(Graphics g) {
           setBackground(Color.black);
           int [] xpoints = {250, 205, 295};
           int [] ypoints = {105, 195, 195};
           g.setColor(Color.pink);
           g.fillPolygon(xpoints, ypoints, 3);
       }
    }
}
-----------------------------

Tested frame should contain a pink triangle, but if the test is running
with JDK1.4.2-b04 under Windows OS, it does not.

Please, note that the test passes under Linux OS.
Also, please note that the test passes under Windows OS with JDK1.4.2-b03.

Test source location:
=====================
/net/jdk/export/disk8/local.java/jck1.4a/JCK-runtime-14a/tests/api/java_awt/interactive/ComponentTests.java

jtr file location:
==================
/net/jtgb4u4c.eng/export/sail15/results/mantis/b04/jck14a/win32/win98_client_UseParallelGC_linux-17/java_awt/interactive/ComponentTests_ComponentTests.jtr

How to reproduce:
=================
Run the following script (you may need to change its JDK and JCK variables)

--- script start ---
#!/bin/bash

JCK="c:/jck1.4a/JCK-runtime-14a"
JDK="h:/jdk1.4.2"
CLASSPATH="$JCK/classes;$JCK/javatest.jar"

$JDK/bin/java $switches -cp $CLASSPATH    javasoft.sqe.tests.api.java.awt.interactive.ComponentTests -TestCaseID ComponentTest0015
--- script end ---

Press "start test 15" button. Test description reads that tested frame should contain a pink triangle,
but it does not.

Specific machine info:
======================
Hostname: linux-17
OS: Windows 98

======================================================================

Name: iaR10016			Date: 10/31/2002


JCK1.4a interactive test api/java_awt/interactive/GraphicsTests.html#GraphicsTests [GraphicsTest0001]
also fails due to this bug. 



======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b07 VERIFIED IN: mantis
14-06-2004

EVALUATION The Description seems to be complaining about Graphics.fillPolygon, which is 2D. ###@###.### 2002-10-29 This problem was caused by the fix for 4678208. In the TransformPoly() method in Win32Renderer.cpp, we had: } else if (fixend && (!close || isempty)) { pPoints[npoints] = pPoints[npoints-1]; pPoints[npoints].x++; } else { outpoints--; *pNpoints = outpoints; } but the logic for the last two blocks should only be executed in the fixend case: } else if (fixend) { if (!close || isempty) { pPoints[npoints] = pPoints[npoints-1]; pPoints[npoints].x++; } else { outpoints--; *pNpoints = outpoints; } } This fix was already applied in the recent putback for 4665237, and this bug is no longer reproducible in the 2D nightly builds. Therefore I am marking this bug fixed in mantis. It will be marked integrated in the next 2D integration. ###@###.### 2002-10-29
29-10-2002