harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3414) [classlib][swing] Can not put null value to UIManager
Date Fri, 16 Mar 2007 13:47:09 GMT
[classlib][swing] Can not put null value to UIManager
-----------------------------------------------------

                 Key: HARMONY-3414
                 URL: https://issues.apache.org/jira/browse/HARMONY-3414
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Alexey Petrenko
            Priority: Minor


When you are trying to put null value to UIManager default value appears instead.

Here is the test:
import javax.swing.UIManager;

public class UIManagerTest {
    public static void main(String argv[]) {
        Object oldO = UIManager.get("InternalFrame.windowBindings");
        Object newO = new Object();
        
        System.err.println("oldO: "+oldO);
        System.err.println("Putting "+newO+" to UIManager");
        UIManager.put("InternalFrame.windowBindings", newO);
        System.err.println("UIManager value equals to newO: "+(UIManager.get("InternalFrame.windowBindings")
== newO));
        System.err.println("UIManager value equals to oldO: "+(UIManager.get("InternalFrame.windowBindings")
== oldO));
        System.err.println();

        newO = null;
        System.err.println("Putting "+newO+" to UIManager");
        UIManager.put("InternalFrame.windowBindings", newO);
        System.err.println("UIManager value equals to newO: "+(UIManager.get("InternalFrame.windowBindings")
== newO));
        System.err.println("UIManager value equals to oldO: "+(UIManager.get("InternalFrame.windowBindings")
== oldO));
    }
}

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


Mime
View raw message