harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r823948 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
Date Sat, 10 Oct 2009 21:30:41 GMT
Author: ndbeyer
Date: Sat Oct 10 21:30:40 2009
New Revision: 823948

URL: http://svn.apache.org/viewvc?rev=823948&view=rev
Log:
removing boxing, add finals, remove EOL spaces

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java?rev=823948&r1=823947&r2=823948&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/GraphicsEnvironment.java
Sat Oct 10 21:30:40 2009
@@ -21,8 +21,6 @@
 package java.awt;
 
 import java.awt.image.BufferedImage;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Locale;
 
 import org.apache.harmony.awt.ContextStorage;
@@ -38,13 +36,13 @@
     public static GraphicsEnvironment getLocalGraphicsEnvironment() {
         synchronized(ContextStorage.getContextLock()) {
             if (ContextStorage.getGraphicsEnvironment() == null) {
-                if (isHeadless()) {                    
-                    ContextStorage.setGraphicsEnvironment(new HeadlessGraphicsEnvironment());
                   
+                if (isHeadless()) {
+                    ContextStorage.setGraphicsEnvironment(new HeadlessGraphicsEnvironment());
                 } else {
-                    CommonGraphics2DFactory g2df =
-                            (CommonGraphics2DFactory) Toolkit.getDefaultToolkit().getGraphicsFactory();
-                    
-                    ContextStorage.setGraphicsEnvironment( 
+                    final CommonGraphics2DFactory g2df =
+                        (CommonGraphics2DFactory) Toolkit.getDefaultToolkit().getGraphicsFactory();
+
+                    ContextStorage.setGraphicsEnvironment(
                             g2df.createGraphicsEnvironment(ContextStorage.getWindowFactory())
                     );
                 }
@@ -60,9 +58,9 @@
 
     public static boolean isHeadless() {
         if (isHeadless == null) {
-            isHeadless = "true".equals(org.apache.harmony.awt.Utils.getSystemProperty("java.awt.headless"));
//$NON-NLS-1$ //$NON-NLS-2$
+            isHeadless = Boolean.valueOf(org.apache.harmony.awt.Utils.getSystemProperty("java.awt.headless"));
//$NON-NLS-1$ 
         }
-        
+
         return isHeadless.booleanValue();
     }
 
@@ -71,7 +69,7 @@
     }
 
     public Point getCenterPoint() throws HeadlessException {
-        Rectangle mwb = getMaximumWindowBounds();
+        final Rectangle mwb = getMaximumWindowBounds();
         return new Point(mwb.width >> 1, mwb.height >> 1);
     }
 



Mime
View raw message