You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/03/16 14:47:09 UTC

[jira] Created: (HARMONY-3414) [classlib][swing] Can not put null value to UIManager

[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.