You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Linbin Yu (JIRA)" <ji...@apache.org> on 2007/12/10 12:00:42 UTC

[jira] Created: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

[classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
-------------------------------------------------------------------------------------------------------

                 Key: HARMONY-5279
                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
             Project: Harmony
          Issue Type: Bug
            Reporter: Linbin Yu


JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.

It's similar as Harmony-5223, no NPE thrown in RI.

Just move mouse on frame to reproduce it:

import javax.swing.JFrame;
import javax.swing.JList;

public class CellRendererDemo extends JFrame {
	CellRendererDemo() {
		JList list = new JList(new String[] { "a", "b", "c" });
		list.setCellRenderer(null);
		add(list);
		setBounds(0, 0, 200,200);
		setVisible(true);
	}

	public static void main(String[] args) {
		new CellRendererDemo();
	}
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Linbin Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550022 ] 

Linbin Yu commented on HARMONY-5279:
------------------------------------

Yes they are both throw NPE ( but RI doesn't ). We should carefully review related methods. Thanks.

> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>            Assignee: Alexey Petrenko
>         Attachments: h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-5279:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>            Assignee: Alexey Petrenko
>         Attachments: h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko updated HARMONY-5279:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>            Assignee: Alexey Petrenko
>         Attachments: h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Linbin Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Linbin Yu updated HARMONY-5279:
-------------------------------

    Attachment: h5279-fix-replace.patch

There is a replacement patch. These methods are changed:
JList.setPrototypeCellValue()
JList.AccessibleJList.AccessibleJListChild.getRenderingComponent()
JList.getMaximumCellWidth()
JList.getToolTipText()
JList.setCellRenderer()
BasicListUI.PaintCell
MetalFileChooserUI.SingleClickListener.CellEditor.configure()


> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>            Assignee: Alexey Petrenko
>         Attachments: h5279-fix-replace.patch, h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko resolved HARMONY-5279.
--------------------------------------

    Resolution: Fixed

The patch has been applied. Please verify.

> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>            Assignee: Alexey Petrenko
>         Attachments: h5279-fix-replace.patch, h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Linbin Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Linbin Yu updated HARMONY-5279:
-------------------------------

    Attachment: h5279-fix.patch

patch for it.

> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>         Attachments: h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5279) [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null

Posted by "Dmitry Irlyanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550021 ] 

Dmitry Irlyanov commented on HARMONY-5279:
------------------------------------------

My apologies,
I think the only verification for tooltip getter  is probably bad solution.

Try to verify getPreferredScrollableViewportSize() method and setPrototypeCellValue(). I'm not sure because I haven't acess to harmony code right now, but, please, verify these cases too.

> [classlib][swing][EIOffice] JList.getToolTipText(MouseEvent) throws NPE if set ListCellRenderer to null
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5279
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5279
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Linbin Yu
>            Assignee: Alexey Petrenko
>         Attachments: h5279-fix.patch
>
>
> JList.getToolTipText(MouseEvent) will throw NPE if set ListCellRenderer to null.
> It's similar as Harmony-5223, no NPE thrown in RI.
> Just move mouse on frame to reproduce it:
> import javax.swing.JFrame;
> import javax.swing.JList;
> public class CellRendererDemo extends JFrame {
> 	CellRendererDemo() {
> 		JList list = new JList(new String[] { "a", "b", "c" });
> 		list.setCellRenderer(null);
> 		add(list);
> 		setBounds(0, 0, 200,200);
> 		setVisible(true);
> 	}
> 	public static void main(String[] args) {
> 		new CellRendererDemo();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.