harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r453297 - in /incubator/harmony/enhanced/classlib/trunk/modules: awt/src/main/java/common/java/awt/ awt/src/main/java/common/org/apache/harmony/awt/ awt/src/main/java/common/org/apache/harmony/awt/wtk/ awt/src/main/java/windows/org/apache/h...
Date Thu, 05 Oct 2006 17:44:57 GMT
Author: tellison
Date: Thu Oct  5 10:44:56 2006
New Revision: 453297

URL: http://svn.apache.org/viewvc?view=rev&rev=453297
Log:
Make objects used for locking more easily identifiable.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueue.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ContextStorage.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventQueue.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDropTarget.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinSystemProperties.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/ORAddress.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JRadioButton.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/JTextComponent.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Component.java
Thu Oct  5 10:44:56 2006
@@ -879,7 +879,8 @@
      * The lock object for private component's data
      * which don't affect the component hierarchy
      */
-    private final transient Object componentLock = new Object();
+    private class ComponentLock {}
+    private final transient Object componentLock = new ComponentLock();
 
     static {
         PrivilegedAction<String[]> action = new PrivilegedAction<String[]>()
{
@@ -4404,7 +4405,7 @@
 
         accessor.set("toolkit", Toolkit.getDefaultToolkit());
         accessor.set("behaviour", createBehavior());
-        accessor.set("componentLock", new Object());
+        accessor.set("componentLock", new Object());  //$NON-LOCK-1$
     }
 
     final void onDrawImage(Image image, Point destLocation, Dimension destSize, Rectangle
source) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueue.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueue.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueue.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/EventQueue.java
Thu Oct  5 10:44:56 2006
@@ -59,7 +59,7 @@
         }
 
         final Toolkit toolkit = Toolkit.getDefaultToolkit();
-        final Object notifier = new Object();
+        final Object notifier = new Object();  //$NON-LOCK-1$
         InvocationEvent event = new InvocationEvent(
                 toolkit, runnable, notifier, true);
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Image.java
Thu Oct  5 10:44:56 2006
@@ -29,7 +29,7 @@
 
 public abstract class Image {
 
-    public static final Object UndefinedProperty = new Object();
+    public static final Object UndefinedProperty = new Object();  //$NON-LOCK-1$
 
     public static final int SCALE_DEFAULT = 1;
 
@@ -84,4 +84,5 @@
         return capabilities;
     }
 }
+
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
Thu Oct  5 10:44:56 2006
@@ -115,7 +115,8 @@
 
     private final Map<NativeWindow, Window> windowFocusProxyMap = new HashMap<NativeWindow,
Window>();
 
-    final Object awtTreeLock = new Object();
+    private class AWTTreeLock {}
+    final Object awtTreeLock = new AWTTreeLock();
     private final Synchronizer synchronizer = ContextStorage.getSynchronizer();
     final ShutdownWatchdog shutdownWatchdog = new ShutdownWatchdog();
 
@@ -1445,7 +1446,8 @@
          * with concurrently running lock-free iterator loop
          */
         private LinkedHashSet<Component> windows = new LinkedHashSet<Component>();
-        private final Object lock = new Object();
+        private class Lock {}
+        private final Object lock = new Lock();
 
         @SuppressWarnings("unchecked")
         void add(Component w) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ContextStorage.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ContextStorage.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ContextStorage.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ContextStorage.java
Thu Oct  5 10:44:56 2006
@@ -39,7 +39,8 @@
     private WTK wtk;
     private GraphicsEnvironment graphicsEnvironment;
 
-    private final Object contextLock = new Object();
+    private class ContextLock {}
+    private final Object contextLock = new ContextLock();
     private final Synchronizer synchronizer = new Synchronizer();
 
     public static void activateMultiContextMode() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventQueue.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventQueue.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventQueue.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/NativeEventQueue.java
Thu Oct  5 10:44:56 2006
@@ -33,7 +33,8 @@
 public abstract class NativeEventQueue {
     
     private ShutdownWatchdog shutdownWatchdog;
-    private final Object eventMonitor = new Object();
+    private class EventMonitor {}
+    private final Object eventMonitor = new EventMonitor();
     private final LinkedList eventQueue = new LinkedList();
 
     public static abstract class Task {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDropTarget.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDropTarget.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDropTarget.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDropTarget.java
Thu Oct  5 10:44:56 2006
@@ -66,7 +66,8 @@
     private int dragState;
     private int dropAction;
     private DropTargetEvent currentEvent;
-    private final Object dropMonitor = new Object();
+    private class DropMonitor {}
+    private final Object dropMonitor = new DropMonitor();
 
     private final WinDTK dtk;
     

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinSystemProperties.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinSystemProperties.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinSystemProperties.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinSystemProperties.java
Thu Oct  5 10:44:56 2006
@@ -169,7 +169,8 @@
 
     private Font defaultFont;
 
-    private final Object cacheLock = new Object();
+    private class CacheLock {}
+    private final Object cacheLock = new CacheLock();
 
     public int getSystemColorARGB(int index) {
         synchronized (cacheLock) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/ORAddress.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/ORAddress.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/ORAddress.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x509/ORAddress.java
Thu Oct  5 10:44:56 2006
@@ -83,7 +83,7 @@
             return new ORAddress();
         }
 
-        private final Object foo = new Object();
+        private final Object foo = new Object();  //$NON-LOCK-1$
 
         protected void getValues(Object object, Object[] values) {
             values[0] = foo;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
Thu Oct  5 10:44:56 2006
@@ -248,7 +248,7 @@
     public static final String DISABLED_ICON_CHANGED_PROPERTY = "disabledIcon";
     public static final String DISABLED_SELECTED_ICON_CHANGED_PROPERTY = "disabledSelectedIcon";
 
-    private static final Object ALL_ACTION_PROPERTIES = new Object() {
+    private static final Object ALL_ACTION_PROPERTIES = new Object() {  //$NON-LOCK-1$
         public boolean equals(final Object o) {
             return true;
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JMenu.java
Thu Oct  5 10:44:56 2006
@@ -104,7 +104,7 @@
 
     private static final String UI_CLASS_ID = "MenuUI";
 
-    private static final Object ALL_ACTION_PROPERTIES = new Object() {
+    private static final Object ALL_ACTION_PROPERTIES = new Object() {  //$NON-LOCK-1$
         public boolean equals(final Object o) {
             return !Action.ACCELERATOR_KEY.equals(o);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JOptionPane.java
Thu Oct  5 10:44:56 2006
@@ -65,7 +65,8 @@
     };
 
     private class ClosingInternalFrameListener extends InternalFrameAdapter {
-        public final Object lock = new Object();
+        private class Lock {}
+        public final Object lock = new Lock();
 
         public void internalFrameClosed(final InternalFrameEvent e) {
             synchronized (lock) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JRadioButton.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JRadioButton.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JRadioButton.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JRadioButton.java
Thu Oct  5 10:44:56 2006
@@ -33,7 +33,7 @@
     private static final String UI_CLASS_ID = "RadioButtonUI";
 
     // this constant is also used by JCheckBox
-    static final Object NO_ICON_ACTION_PROPERTIES = new Object() {
+    static final Object NO_ICON_ACTION_PROPERTIES = new Object() {  //$NON-LOCK-1$
         public boolean equals(final Object o) {
             return !Action.SMALL_ICON.equals(o);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/JTextComponent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/JTextComponent.java?view=diff&rev=453297&r1=453296&r2=453297
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/JTextComponent.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/JTextComponent.java
Thu Oct  5 10:44:56 2006
@@ -458,7 +458,7 @@
      */
     public static final String DEFAULT_KEYMAP = "default";
 
-    private static final Object DEFAULT_ACTION_KEY = new Object();
+    private static final Object DEFAULT_ACTION_KEY = new Object();  //$NON-LOCK-1$
     // last focused text component
     private static JTextComponent focusedComponent;
     // class to store all keymaps,which were added to JTextComponent



Mime
View raw message