You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Svetlana Samoilenko (JIRA)" <ji...@apache.org> on 2006/05/26 14:14:29 UTC

[jira] Created: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

[classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
----------------------------------------------------------------------------------------------------

         Key: HARMONY-516
         URL: http://issues.apache.org/jira/browse/HARMONY-516
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Svetlana Samoilenko
    Priority: Minor


ClassCastException occurs on wrong converting  (String)value.

import junit.framework.TestCase;
import java.beans.*;

public class test extends TestCase {
  public static void main(String[] args) {
          PropertyEditorSupport support = new PropertyEditorSupport();

          String[] value = null;
          assertEquals("null",support.getAsText());
          value = new String[] {"java.awt.Color.orange"};
          support.setValue(value);
          assertEquals(value.toString(),support.getAsText()); 
}

Output on Harmonyjava.lang.ClassCastException
        at java.beans.PropertyEditorSupport.getAsText()
        at test.main(test.java:11)




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-516?page=all ]

Svetlana Samoilenko updated HARMONY-516:
----------------------------------------

    Attachment: PropertyEditorSupportTest.txt

unit test

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs, PropertyEditorSupportTest.txt
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-516?page=comments#action_12413757 ] 

Svetlana Samoilenko commented on HARMONY-516:
---------------------------------------------

Mikhail,
bug is stiil reproducible.
Fix should be as follow :
    return newValue == null ? "null" : newValue.toString();



> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs, PropertyEditorSupportTest.txt
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-516?page=all ]
     
Mikhail Loenko resolved HARMONY-516:
------------------------------------

    Resolution: Fixed

fixed in revision 410019
Svetlana, please verify it fully resolves the issue

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-516?page=all ]

Svetlana Samoilenko updated HARMONY-516:
----------------------------------------

    Attachment: PropertyEditorSupport.diffs

Patch.
 Unit test is coming

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-516?page=all ]
     
Mikhail Loenko closed HARMONY-516:
----------------------------------


verified by Svetlana

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs, PropertyEditorSupportTest.txt
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-516?page=comments#action_12442126 ] 
            
Svetlana Samoilenko commented on HARMONY-516:
---------------------------------------------


   [[ Old comment, sent by email on Tue, 30 May 2006 07:32:50 +0400 ]]

mI[A,
k SOVALENI@ exception oSTALSQ PRI TAKOJ PRAWKE
 public String getAsText() {
      return newValue == null ? "null" : (String)newValue;
  }
pRAWILXNEE BUDET

       return newValue == null ? "null" : newValue.toString();

Regards,
Svetlana


> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-516
>                 URL: http://issues.apache.org/jira/browse/HARMONY-516
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>         Assigned To: Mikhail Loenko
>            Priority: Minor
>         Attachments: PropertyEditorSupport.diffs, PropertyEditorSupportTest.txt
>
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-516?page=comments#action_12414725 ] 

Svetlana Samoilenko commented on HARMONY-516:
---------------------------------------------

The fix works fine for me. Thanks.

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs, PropertyEditorSupportTest.txt
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-516?page=all ]

Mikhail Loenko reassigned HARMONY-516:
--------------------------------------

    Assign To: Mikhail Loenko

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-516) [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-516?page=comments#action_12413758 ] 

Mikhail Loenko commented on HARMONY-516:
----------------------------------------

fixed. please check again. revision 410190

> [classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-516
>          URL: http://issues.apache.org/jira/browse/HARMONY-516
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: PropertyEditorSupport.diffs, PropertyEditorSupportTest.txt
>
> ClassCastException occurs on wrong converting  (String)value.
> import junit.framework.TestCase;
> import java.beans.*;
> public class test extends TestCase {
>   public static void main(String[] args) {
>           PropertyEditorSupport support = new PropertyEditorSupport();
>           String[] value = null;
>           assertEquals("null",support.getAsText());
>           value = new String[] {"java.awt.Color.orange"};
>           support.setValue(value);
>           assertEquals(value.toString(),support.getAsText()); 
> }
> Output on Harmonyjava.lang.ClassCastException
>         at java.beans.PropertyEditorSupport.getAsText()
>         at test.main(test.java:11)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira