You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chunrong Lai (JIRA)" <ji...@apache.org> on 2007/09/17 17:05:56 UTC
[jira] Updated: (HARMONY-4803) [classlib][awt] firepropertyChange
only when it really change?
[ https://issues.apache.org/jira/browse/HARMONY-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chunrong Lai updated HARMONY-4803:
----------------------------------
Attachment: H4803.fixedreproducer.patch
This patch fixes the dead loop introduced by the reproducer.
It is possible that we will have other similar reproducers for other events.
> [classlib][awt] firepropertyChange only when it really change?
> --------------------------------------------------------------
>
> Key: HARMONY-4803
> URL: https://issues.apache.org/jira/browse/HARMONY-4803
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Environment: Win32 + Linux32
> Reporter: Chunrong Lai
> Attachments: H4803.fixedreproducer.patch
>
>
> Below reproducer shows the reaint and firePropertyChange triggered from setBackground().
> Harmony falls into a dead loop setBackground()->repaint()->update()->paint()->setBackground().
> It is easy to break the loop if we only repaint (and firepropertyChange) when the old background does not equal to the new background.
> I believe there are other similar issues like this.
> import java.awt.* ;
> import java.awt.event.* ;
>
> class MyPanel extends Panel{
> int flag = 0 ;
>
> public void paint(Graphics g){
> setBackground(Color.blue) ;
> System.out.println ("hi") ;
> }
> }
>
> public class MyFrame extends Frame{
> MyFrame(){
> add(new MyPanel()) ;
> setSize(300,200) ;
> setVisible(true) ;
> }
> public static void main(String args[]){
> new MyFrame() ;
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.