harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r466068 - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src: main/java/windows/org/apache/harmony/awt/wtk/windows/WinSystemProperties.java test/api/java/common/java/awt/ToolkitRTest.java
Date Fri, 20 Oct 2006 11:33:15 GMT
Author: mloenko
Date: Fri Oct 20 04:33:12 2006
New Revision: 466068

URL: http://svn.apache.org/viewvc?view=rev&rev=466068
Log:
applied patch from HARMONY-1483
[classlib][awt] "Debug error" messagebox is shown by debug DRLVM while initializing Toolkit
desktop properties

Modified:
    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/awt/src/test/api/java/common/java/awt/ToolkitRTest.java

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=466068&r1=466067&r2=466068
==============================================================================
--- 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
Fri Oct 20 04:33:12 2006
@@ -28,7 +28,7 @@
 import java.util.Map;
 import java.util.TreeSet;
 import org.apache.harmony.awt.ComponentInternals;
-import org.apache.harmony.awt.nativebridge.Int16Pointer;
+import org.apache.harmony.awt.nativebridge.Int32Pointer;
 import org.apache.harmony.awt.nativebridge.NativeBridge;
 import org.apache.harmony.awt.nativebridge.windows.Win32;
 import org.apache.harmony.awt.nativebridge.windows.WindowsDefs;
@@ -456,19 +456,19 @@
         setIntProperty(propName, win32.GetSystemMetrics(idx), props);
     }
     
-    private Int16Pointer getIntSPI(int idx) {
-        NativeBridge bridge = NativeBridge.getInstance();        
-        Int16Pointer ptr = bridge.createInt16Pointer(1, false);
+    private int getIntSPI(int idx) {
+        NativeBridge bridge = NativeBridge.getInstance();
+        Int32Pointer ptr = bridge.createInt32Pointer(1, false);
         win32.SystemParametersInfoW(idx, 0, ptr, 0);
-        return ptr;
+        return ptr.get(0);
     }
     
     private void getBoolSPI(String propName, int idx, Map<String, Object> props) {
-        setBoolProperty(propName, getIntSPI(idx).get(0), props);
+        setBoolProperty(propName, getIntSPI(idx), props);
     }
     
     private void getIntSPI(String propName, int idx, Map<String, Object> props) {
-        setIntProperty(propName, getIntSPI(idx).get(0), props);
+        setIntProperty(propName, getIntSPI(idx), props);
     }
     
     void getXPTheme(Map<String, Object> props) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java?view=diff&rev=466068&r1=466067&r2=466068
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java
Fri Oct 20 04:33:12 2006
@@ -53,4 +53,9 @@
         }
         assertTrue(npe);
     }
+
+    public void testInitializeDesktopProperties() {
+        // Regression for HARMONY-1483
+        Toolkit.getDefaultToolkit().initializeDesktopProperties();
+    }
 }



Mime
View raw message