United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7122246 [macosx] JCK swing test CaretTests fails in b205
7122246 : [macosx] JCK swing test CaretTests fails in b205

Details
Type:
Bug
Submit Date:
2011-12-16
Status:
Closed
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2012-03-23
Component:
client-libs
OS:
os_x,generic
Sub-Component:
javax.swing
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u4

Related Reports
Duplicate:

Sub Tasks

Description
The test case Caret002 in
javasoft.sqe.tests.api.javax.swing.text.Caret.CaretTests fails due to Caret selection is not invisible

The test log as below:
Caret001: Passed. OKAY
Caret002: Failed. Caret selection should be invisible

This is reproducible with JDK 7 MacPort only
The essence of the testcase is the following:

        javax.swing.text.Caret testedCaret = new JTextArea().getCaret();
        testedCaret.setSelectionVisible(false);
        System.err.println(testedCaret.isSelectionVisible());

With AuqaL&F method isSelectionVisible() returns true which is wrong.

The problem is with implementation consistency for getter/setter methods:
http://jre.us.oracle.com/java/re/jdk/7/promoted/latest/doc/api/javax/swing/text/Caret.html#setSelectionVisible%28boolean%29
http://jre.us.oracle.com/java/re/jdk/7/promoted/latest/doc/api/javax/swing/text/Caret.html#isSelectionVisible%28%29

                                    

Comments
EVALUATION

com.apple.laf.AquaCaret.setSelectionVisible() ignores disabling of the selection visibility for JTextArea and JEditorPane

it is agains the spec, however this code is forward ported from official JDK 6 from Apple, which is supposed to be JCK compliant

I checked that Caret.setSelectionVisible() works the same way there,
we request the JCK team to comment on this situation.
                                     
2011-12-21
EVALUATION

Well, porting some code from something which is supposed to be a JCK compliant 
does not makes the result compliant automatically.

I suggest to ask JLE regarding Apple certification of their SE6 implementation particualry in this little aspect.
Adding ###@###.### to the interest list
                                     
2011-12-21



Hardware and Software, Engineered to Work Together