# HG changeset patch # User son # Date 1205416614 -10800 # Node ID a777da6f3f55d8303490bb78b0799279495a2dd7 # Parent d35e2fc341c7dfda73df1b73cbafba1064759b34 6636368: XAtom contains unused code Summary: unused code has been removed Reviewed-by: dcherepanov diff -r d35e2fc341c7 -r a777da6f3f55 jdk/src/solaris/classes/sun/awt/X11/XAtom.java --- a/jdk/src/solaris/classes/sun/awt/X11/XAtom.java Thu Mar 13 16:54:51 2008 +0300 +++ b/jdk/src/solaris/classes/sun/awt/X11/XAtom.java Thu Mar 13 16:56:54 2008 +0300 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ import sun.misc.Unsafe; import java.util.HashMap; -public class XAtom { +public final class XAtom { // Order of lock: XAWTLock -> XAtom.class @@ -175,7 +175,7 @@ public static XAtom get(String name) { XAtom xatom = lookup(name); if (xatom == null) { - xatom = new XAtom(name); + xatom = new XAtom(XToolkit.getDisplay(), name); } return xatom; } @@ -232,10 +232,6 @@ this(display, name, true); } - private XAtom(String name) { - this(XToolkit.getDisplay(), name, true); - } - public XAtom(String name, boolean autoIntern) { this(XToolkit.getDisplay(), name, autoIntern); } @@ -262,7 +258,7 @@ * @since 1.5 */ - public XAtom(long display, String name, boolean autoIntern) { + private XAtom(long display, String name, boolean autoIntern) { this.name = name; this.display = display; if (autoIntern) { @@ -651,28 +647,6 @@ } } - /** - * Initializes atom with name and display values - */ - public void setValues(long display, String name, boolean autoIntern) { - this.display = display; - this.name = name; - if (autoIntern) { - XToolkit.awtLock(); - try { - atom = XlibWrapper.InternAtom(display,name,0); - } finally { - XToolkit.awtUnlock(); - } - } - register(); - } - - public void setValues(long display, long atom) { - this.display = display; - this.atom = atom; - register(); - } public void setValues(long display, String name, long atom) { this.display = display; this.atom = atom;