harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r646264 [3/13] - in /harmony/enhanced/classlib/branches/java6: depends/build/ depends/build/platform/ depends/files/ modules/accessibility/ modules/annotation/ modules/applet/ modules/archive/ modules/archive/src/main/java/java/util/jar/ mo...
Date Wed, 09 Apr 2008 11:02:07 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/color/ICC_Profile.java Wed Apr  9 04:01:14 2008
@@ -586,19 +586,19 @@
                         } catch (FileNotFoundException e) {}
 
                         // Check java.iccprofile.path entries
-                        fiStream = tryPath(System.getProperty("java.iccprofile.path"), fName); //$NON-NLS-1$
+                        fiStream = tryPath(org.apache.harmony.awt.Utils.getSystemProperty("java.iccprofile.path"), fName); //$NON-NLS-1$
                         if (fiStream != null) {
                             return fiStream;
                         }
 
                         // Check java.class.path entries
-                        fiStream = tryPath(System.getProperty("java.class.path"), fName); //$NON-NLS-1$
+                        fiStream = tryPath(org.apache.harmony.awt.Utils.getSystemProperty("java.class.path"), fName); //$NON-NLS-1$
                         if (fiStream != null) {
                             return fiStream;
                         }
 
                         // Check directory with java sample profiles
-                        String home = System.getProperty("java.home"); //$NON-NLS-1$
+                        String home = org.apache.harmony.awt.Utils.getSystemProperty("java.home"); //$NON-NLS-1$
                         if (home != null) {
                             fiStream = tryPath(
                                     home + File.separatorChar +

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/ColorConvertOp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/ColorConvertOp.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/ColorConvertOp.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/ColorConvertOp.java Wed Apr  9 04:01:14 2008
@@ -412,8 +412,8 @@
                 srcCM.getTransferType());
         
         return new BufferedImage(dstCM,
-                destCM.createCompatibleWritableRaster(src.getWidth(), src.getHeight()),
-                destCM.isAlphaPremultiplied(), 
+                dstCM.createCompatibleWritableRaster(src.getWidth(), src.getHeight()),
+                dstCM.isAlphaPremultiplied(), 
                 null);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java Wed Apr  9 04:01:14 2008
@@ -153,7 +153,7 @@
         case DATA_TYPE_INT:
             for(int y = 0; y < srcH; y++){
                 for(int x = 0; x < srcW; x++){
-                    iData[realOff++] = cm.getRGB(pixels[srcOff++] & 0xff);
+                    iData[realOff + x] = cm.getRGB(pixels[srcOff + x] & 0xff);                    
                 }
                 srcOff += srcScan;
                 realOff += scanline;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java Wed Apr  9 04:01:14 2008
@@ -77,7 +77,7 @@
         return AccessController.doPrivileged(
                 new PrivilegedAction<PrinterJob>() {
             public PrinterJob run() {
-                String s = System.getProperty("java.awt.printerjob"); //$NON-NLS-1$
+                String s = org.apache.harmony.awt.Utils.getSystemProperty("java.awt.printerjob"); //$NON-NLS-1$
 
                 if (s == null || s.equals("")){ //$NON-NLS-1$
                     s = "java.awt.print.PrinterJobImpl"; //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java Wed Apr  9 04:01:14 2008
@@ -180,7 +180,7 @@
 
 
     // Print debug output or not
-    protected static final boolean debugOutput = "1".equals(System.getProperty("g2d.debug")); //$NON-NLS-1$ //$NON-NLS-2$
+    protected static final boolean debugOutput = "1".equals(org.apache.harmony.awt.Utils.getSystemProperty("g2d.debug")); //$NON-NLS-1$ //$NON-NLS-2$
 
     // Constructors
     protected CommonGraphics2D() {
@@ -1099,4 +1099,6 @@
         //copy.origTransform = new AffineTransform(origTransform);
         copy.origPoint = new Point(origPoint);
     }
+
+    public void flush(){}
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java Wed Apr  9 04:01:14 2008
@@ -82,7 +82,7 @@
     private static final int BLUE_555_MASK = 0x001f;
 
     static{
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("gl"); //$NON-NLS-1$
         initIDs();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/color/NativeCMM.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/color/NativeCMM.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/color/NativeCMM.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/color/NativeCMM.java Wed Apr  9 04:01:14 2008
@@ -77,7 +77,7 @@
             AccessController.doPrivileged(
                   new PrivilegedAction<Void>() {
                     public Void run() {
-                        System.loadLibrary("lcmm"); //$NON-NLS-1$
+                        org.apache.harmony.awt.Utils.loadLibrary("lcmm"); //$NON-NLS-1$
                         return null;
                     }
             } );

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java Wed Apr  9 04:01:14 2008
@@ -28,6 +28,8 @@
 import java.io.IOException;
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.SoftReference;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Locale;
@@ -36,7 +38,7 @@
 
 import org.apache.harmony.awt.gl.CommonGraphics2DFactory;
 import org.apache.harmony.awt.gl.font.fontlib.FLFontManager;
-
+import org.apache.harmony.awt.Utils;
 
 public abstract class FontManager {
 
@@ -44,8 +46,7 @@
         java.awt.Toolkit.getDefaultToolkit();
     }
     
-    public static final boolean IS_FONTLIB = "true".equals(System.getProperty("java.awt.fontlib")) || 
-        GraphicsEnvironment.isHeadless();
+    public static final boolean IS_FONTLIB  = "true".equals(Utils.getSystemProperty("java.awt.fontlib")) || GraphicsEnvironment.isHeadless();    
     
     /**
      * array of font families names
@@ -205,16 +206,19 @@
      */
     public Hashtable<String, Vector<FontProperty>> fProperties = new Hashtable<String, Vector<FontProperty>>();
 
-    public FontManager(){
-        
+    public FontManager() {
         if (!IS_FONTLIB) {
             allFamilies = getAllFamilies();
             /*
              * Creating and registering shutdown hook to free resources
              * before object is destroyed.
              */
-            DisposeNativeHook shutdownHook = new DisposeNativeHook();
-            Runtime.getRuntime().addShutdownHook(shutdownHook);
+            AccessController.doPrivileged(new PrivilegedAction<Object>() {
+                public Object run() {
+                    Runtime.getRuntime().addShutdownHook(new DisposeNativeHook());
+                    return null;
+                }
+            });
         }
     }
 
@@ -577,11 +581,11 @@
     public static File getFontPropertyFile(){
         File file = null;
 
-        String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
+        String javaHome = Utils.getSystemProperty("java.home"); //$NON-NLS-1$
         Locale l = Locale.getDefault();
         String language = l.getLanguage();
         String country = l.getCountry();
-        String fileEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
+        String fileEncoding = Utils.getSystemProperty("file.encoding"); //$NON-NLS-1$
 
         String os = System.getProperty("os.name"); //$NON-NLS-1$
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/fontlib/FLFontManager.java Wed Apr  9 04:01:14 2008
@@ -22,6 +22,8 @@
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.Hashtable;
@@ -37,16 +39,20 @@
     private ArrayList<Font> allFonts = new ArrayList<Font>(); 
     
     static {
-        System.loadLibrary("FL");
+        org.apache.harmony.awt.Utils.loadLibrary("FL");
     }
 
     public FLFontManager() {
-        
-        Runtime.getRuntime().addShutdownHook(new DisposeNativeHook());
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            public Object run() {
+                Runtime.getRuntime().addShutdownHook(new DisposeNativeHook());
+                return null;
+            }
+        });
 
         initManager();
         
-        addPath(new File(System.getProperty("java.home") + "/lib/fonts/"));
+        addPath(new File(org.apache.harmony.awt.Utils.getSystemProperty("java.home") + "/lib/fonts/"));
         addPath(new File("C:\\WINNT\\Fonts"));
         addPath(new File("/usr/X11R6/lib/X11/fonts/Type1/"));
         addPath(new File("/usr/X11R6/lib/X11/fonts/truetype/"));

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/GifDecoder.java Wed Apr  9 04:01:14 2008
@@ -32,7 +32,7 @@
     private static native void initIDs();
 
     static {
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("gl"); //$NON-NLS-1$
         initIDs();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/JpegDecoder.java Wed Apr  9 04:01:14 2008
@@ -82,7 +82,7 @@
     private ColorModel cm = null;
 
     static {
-        System.loadLibrary("jpegdecoder"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("jpegdecoder"); //$NON-NLS-1$
 
         cmGray = new ComponentColorModel(
                 ColorSpace.getInstance(ColorSpace.CS_GRAY),

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java Wed Apr  9 04:01:14 2008
@@ -37,7 +37,7 @@
     private static native void initIDs();
 
     static {
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("gl"); //$NON-NLS-1$
         initIDs();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/opengl/GL.java Wed Apr  9 04:01:14 2008
@@ -38,7 +38,7 @@
     }
 
     private GL() {
-        System.loadLibrary("oglwrapper"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("oglwrapper"); //$NON-NLS-1$
         init();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/im/IMManager.java Wed Apr  9 04:01:14 2008
@@ -316,7 +316,7 @@
     
     private static String getInputStyle() {
         String propName = INPUT_STYLE_PROP;
-        String inputStyle = System.getProperty(propName);
+        String inputStyle = org.apache.harmony.awt.Utils.getSystemProperty(propName);
         if (inputStyle != null) {
             return inputStyle;
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/NativeBridge.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/NativeBridge.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/NativeBridge.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/nativebridge/NativeBridge.java Wed Apr  9 04:01:14 2008
@@ -20,6 +20,9 @@
  */
 package org.apache.harmony.awt.nativebridge;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
 import org.apache.harmony.misc.accessors.AccessorFactory;
 import org.apache.harmony.misc.accessors.MemoryAccessor;
 
@@ -28,8 +31,13 @@
     private NativeBridge() {
     }
 
+    private static final MemoryAccessor memAccess = AccessController.doPrivileged(new PrivilegedAction<MemoryAccessor>() {
+                                                      public MemoryAccessor run() {
+                                                          return AccessorFactory.getMemoryAccessor();
+                                                      }
+                                                  });
+
     private static final NativeBridge instance = new NativeBridge();
-    private static final MemoryAccessor memAccess = AccessorFactory.getMemoryAccessor();
     public static final int ptrSize = memAccess.getPointerSize();
     public static final boolean is64 = (ptrSize == 8);
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/theme/DefaultFileDialog.java Wed Apr  9 04:01:14 2008
@@ -229,7 +229,7 @@
     }
 
     private File getDefaultFolder() {
-        return new File(System.getProperty("user.dir")); //$NON-NLS-1$
+        return new File(org.apache.harmony.awt.Utils.getSystemProperty("user.dir")); //$NON-NLS-1$
     }
 
     private void addListeners() {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java Wed Apr  9 04:01:14 2008
@@ -713,7 +713,7 @@
             java.security.AccessController
                     .doPrivileged(new java.security.PrivilegedAction() {
                         public Object run() {
-                            System.loadLibrary("linuxfont"); //$NON-NLS-1$
+                            org.apache.harmony.awt.Utils.loadLibrary("linuxfont"); //$NON-NLS-1$
                             return null;
                         }
                     });

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java Wed Apr  9 04:01:14 2008
@@ -45,7 +45,7 @@
         inst = new LinuxGraphics2DFactory();
     }
     public Graphics2D getGraphics2D(NativeWindow nw, int tx, int ty, MultiRectArea clip) {
-        String opengl = System.getProperty("java2d.opengl"); //$NON-NLS-1$
+        String opengl = org.apache.harmony.awt.Utils.getSystemProperty("java2d.opengl"); //$NON-NLS-1$
         boolean useOpenGL = opengl != null && opengl.equals("true"); //$NON-NLS-1$
         return useOpenGL ?
                 (Graphics2D) new OGLGraphics2D(nw, tx, ty, clip) :
@@ -53,7 +53,7 @@
     }
 
     public Graphics2D getGraphics2D(NativeWindow nw, int tx, int ty, int width, int height) {
-        String opengl = System.getProperty("java2d.opengl"); //$NON-NLS-1$
+        String opengl = org.apache.harmony.awt.Utils.getSystemProperty("java2d.opengl"); //$NON-NLS-1$
         boolean useOpenGL = opengl != null && opengl.equals("true"); //$NON-NLS-1$
         return useOpenGL ?
                 (Graphics2D) new OGLGraphics2D(nw, tx, ty, width, height) :

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java Wed Apr  9 04:01:14 2008
@@ -950,6 +950,11 @@
 
     }
 
+    @Override
+    public void flush(){
+        flush(display);
+    }
+
     // Native methods
 
     // GC methods
@@ -985,5 +990,9 @@
     private native int fillArc(long display, long drawable, long gc, int x, int y, int width, int height, int startAngle, int angle);
 
     private native int copyArea(long display, long src, long dst, long gc, int src_x, int src_y, int width, int height, int dst_x, int dst_y);
+
+    // Send all queued requests to the server
+
+    private native void flush(long display);
 
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphicsDevice.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphicsDevice.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphicsDevice.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphicsDevice.java Wed Apr  9 04:01:14 2008
@@ -131,7 +131,7 @@
         // Allocate array for configurations
         configs = new XGraphicsConfiguration[numVisualInfos];
 
-        String opengl = System.getProperty("java2d.opengl"); //$NON-NLS-1$
+        String opengl = org.apache.harmony.awt.Utils.getSystemProperty("java2d.opengl"); //$NON-NLS-1$
         boolean useOpenGL = opengl != null && opengl.equals("true"); //$NON-NLS-1$
 
         for (int i=0; i<numVisualInfos; i++) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/GLX.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/GLX.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/GLX.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/GLX.java Wed Apr  9 04:01:14 2008
@@ -37,7 +37,7 @@
     }
 
     private GLX() {
-        System.loadLibrary("X11Wrapper");
+        org.apache.harmony.awt.Utils.loadLibrary("X11Wrapper");
         init();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/X11.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/X11.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/X11.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/X11.java Wed Apr  9 04:01:14 2008
@@ -39,7 +39,7 @@
     }
 
     private X11() {
-        System.loadLibrary("X11Wrapper"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("X11Wrapper"); //$NON-NLS-1$
         init();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/Xft.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/Xft.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/Xft.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/Xft.java Wed Apr  9 04:01:14 2008
@@ -39,7 +39,7 @@
     }
 
     private Xft() {
-        System.loadLibrary("X11Wrapper"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("X11Wrapper"); //$NON-NLS-1$
         init();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/LinuxWTK.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/LinuxWTK.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/LinuxWTK.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/LinuxWTK.java Wed Apr  9 04:01:14 2008
@@ -30,7 +30,7 @@
 public final class LinuxWTK extends WTK {
 
     static {
-        System.loadLibrary("gl");
+        org.apache.harmony.awt.Utils.loadLibrary("gl");
     }
 
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/XServerConnection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/XServerConnection.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/XServerConnection.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/wtk/linux/XServerConnection.java Wed Apr  9 04:01:14 2008
@@ -37,7 +37,7 @@
         this.x11 = X11.getInstance();;
         display = x11.XOpenDisplay(0); //0 - we use default display only
         if (display == 0) {
-            String name = System.getProperty("DISPLAY"); //$NON-NLS-1$
+            String name = org.apache.harmony.awt.Utils.getSystemProperty("DISPLAY"); //$NON-NLS-1$
             // awt.0F=Cannot open display '{0}'
             throw new InternalError(Messages.getString("awt.0F", //$NON-NLS-1$ 
                     (name != null ? name : ""))); //$NON-NLS-1$
@@ -45,7 +45,7 @@
 
         screen = x11.XDefaultScreen(display);
 
-        System.loadLibrary("gl");
+        org.apache.harmony.awt.Utils.loadLibrary("gl");
         init(display, screen);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDTK.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDTK.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDTK.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/datatransfer/windows/WinDTK.java Wed Apr  9 04:01:14 2008
@@ -24,6 +24,8 @@
 import java.awt.dnd.DropTargetContext;
 import java.awt.dnd.peer.DragSourceContextPeer;
 import java.awt.dnd.peer.DropTargetContextPeer;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
 import org.apache.harmony.awt.datatransfer.DTK;
 import org.apache.harmony.awt.datatransfer.NativeClipboard;
@@ -39,8 +41,11 @@
 public final class WinDTK extends DTK implements Callback.Handler {
     
     private static final Win32 win32 = Win32.getInstance();
-    private static final ObjectAccessor objAccessor = 
-        AccessorFactory.getObjectAccessor();
+    private static final ObjectAccessor objAccessor = AccessController.doPrivileged(new PrivilegedAction<ObjectAccessor>() {
+                                                        public ObjectAccessor run() {
+                                                            return AccessorFactory.getObjectAccessor();
+                                                        }
+                                                    });    
     
     private static final int WM_TASK = WindowsDefs.WM_USER + 1;
     

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java Wed Apr  9 04:01:14 2008
@@ -534,7 +534,7 @@
             AccessController.doPrivileged(
                   new PrivilegedAction<Void>() {
                     public Void run() {
-                        System.loadLibrary("fontlib"); //$NON-NLS-1$
+                        org.apache.harmony.awt.Utils.loadLibrary("fontlib"); //$NON-NLS-1$
                         return null;
                     }
             } );

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/GDIPTextRenderer.java Wed Apr  9 04:01:14 2008
@@ -52,7 +52,7 @@
     int curPenColor;
     
     // Print debug output or not
-    protected static final boolean debugOutput = "1".equals(System.getProperty("g2d.debug")); //$NON-NLS-1$ //$NON-NLS-2$
+    protected static final boolean debugOutput = "1".equals(org.apache.harmony.awt.Utils.getSystemProperty("g2d.debug")); //$NON-NLS-1$ //$NON-NLS-2$
 
     public static final GDIPTextRenderer inst = new GDIPTextRenderer();
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIGraphics2D.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIGraphics2D.java Wed Apr  9 04:01:14 2008
@@ -76,7 +76,7 @@
 
 
     static {
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("gl"); //$NON-NLS-1$
     }
 
     public WinGDIGraphics2D(NativeWindow nw, int tx, int ty, MultiRectArea clip) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java Wed Apr  9 04:01:14 2008
@@ -36,6 +36,8 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.PathIterator;
 import java.awt.geom.Point2D;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Map;
 
 import org.apache.harmony.awt.gl.CommonGraphics2D;
@@ -79,14 +81,18 @@
     private static final long gdipToken;
 
     static {
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("gl"); //$NON-NLS-1$
 
         // GDI+ startup
         gdipToken = gdiPlusStartup();
 
         // Prepare GDI+ shutdown
-        GDIPShutdown hook = new GDIPShutdown();
-        Runtime.getRuntime().addShutdownHook(hook);
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            public Object run() {
+                Runtime.getRuntime().addShutdownHook(new GDIPShutdown());
+                return null;
+            }
+        });
     }
 
     public WinGDIPGraphics2D(NativeWindow nw, int tx, int ty, MultiRectArea clip) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsDevice.java Wed Apr  9 04:01:14 2008
@@ -55,8 +55,8 @@
     static boolean useOpenGL;
     static boolean useGDI;
     static {
-        String opengl = System.getProperty("java2d.opengl"); //$NON-NLS-1$
-        String gdi = System.getProperty("java2d.gdi"); //$NON-NLS-1$
+        String opengl = org.apache.harmony.awt.Utils.getSystemProperty("java2d.opengl"); //$NON-NLS-1$
+        String gdi = org.apache.harmony.awt.Utils.getSystemProperty("java2d.gdi"); //$NON-NLS-1$
         useOpenGL = opengl != null && opengl.equals("true"); //$NON-NLS-1$
         useGDI = gdi != null && gdi.equals("true"); //$NON-NLS-1$
     };

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphicsEnvironment.java Wed Apr  9 04:01:14 2008
@@ -25,7 +25,7 @@
 
 import org.apache.harmony.awt.gl.CommonGraphicsEnvironment;
 import org.apache.harmony.awt.wtk.WindowFactory;
-
+import org.apache.harmony.awt.Utils;
 
 /**
  * Windows GraphicsEnvironment implementation
@@ -36,7 +36,7 @@
     WinGraphicsDevice []devices = null;
 
     static {
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        Utils.loadLibrary("gl"); //$NON-NLS-1$
     }
 
     public WinGraphicsEnvironment(WindowFactory wf) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Callback.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Callback.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Callback.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Callback.java Wed Apr  9 04:01:14 2008
@@ -37,7 +37,7 @@
     private static Handler handlerDataTransfer;
 
     static {
-        System.loadLibrary("Win32Wrapper"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("Win32Wrapper"); //$NON-NLS-1$
         callbackWNDPROC = initCallBackWNDPROC();
         callbackOFNHOOKPROC = initCallBackOFNHOOKPROC();
         callbackDataTransferProc = initCallBackDataTransferProc();

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WGL.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WGL.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WGL.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WGL.java Wed Apr  9 04:01:14 2008
@@ -40,7 +40,7 @@
     }
 
     private WGL() {
-        System.loadLibrary("Win32Wrapper");
+        org.apache.harmony.awt.Utils.loadLibrary("Win32Wrapper");
         init();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/Win32.java Wed Apr  9 04:01:14 2008
@@ -23,8 +23,8 @@
  */
 package org.apache.harmony.awt.nativebridge.windows;
 
-
 import org.apache.harmony.awt.nativebridge.*;
+import org.apache.harmony.awt.Utils;
 
 public class Win32 extends BasicLibWrapper {
     static Win32 instance;
@@ -37,7 +37,7 @@
     }
 
     private Win32() {
-        System.loadLibrary("Win32Wrapper"); //$NON-NLS-1$
+        Utils.loadLibrary("Win32Wrapper"); //$NON-NLS-1$
         init();
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/nativebridge/windows/WinDataTransfer.java Wed Apr  9 04:01:14 2008
@@ -36,7 +36,7 @@
 public final class WinDataTransfer {
     
     static {
-        System.loadLibrary("Win32Wrapper"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("Win32Wrapper"); //$NON-NLS-1$
     }
 
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/theme/windows/WinFileDialog.java Wed Apr  9 04:01:14 2008
@@ -223,7 +223,7 @@
 
     private void setDir(String dirName) {
         if (dirName == null) {
-            dirName = System.getProperty("user.dir"); //$NON-NLS-1$
+            dirName = org.apache.harmony.awt.Utils.getSystemProperty("user.dir"); //$NON-NLS-1$
         }
         ofn.set_lpstrInitialDir(nb.createInt16Pointer(dirName, false));
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinWTK.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinWTK.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinWTK.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinWTK.java Wed Apr  9 04:01:14 2008
@@ -28,7 +28,7 @@
 public class WinWTK extends WTK {
 
     static {
-        System.loadLibrary("gl"); //$NON-NLS-1$
+        org.apache.harmony.awt.Utils.loadLibrary("gl"); //$NON-NLS-1$
     }
 
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Font.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Font.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Font.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Font.cpp Wed Apr  9 04:01:14 2008
@@ -22,6 +22,7 @@
 #include "Environment.h"
 #include "TTFont.h"
 #include "T1Font.h"
+#include <string.h>
 
 Font::Font() {
     _famName = NULL;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Outline.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Outline.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Outline.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Outline.cpp Wed Apr  9 04:01:14 2008
@@ -19,6 +19,7 @@
  * @version $Revision$
  */
 #include "Outline.h"
+#include <string.h>
 
 Outline::Outline(ufshort pointsNumber, ufshort commandNumber) {
 	pointsCount = 0;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Font.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Font.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Font.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Font.cpp Wed Apr  9 04:01:14 2008
@@ -20,6 +20,8 @@
  */
 
 #include <string>
+#include <string.h>
+#include <stdlib.h>
 #if defined(LINUX)
 #include <ctype.h>
 #endif

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Glyph.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Glyph.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Glyph.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/T1Glyph.cpp Wed Apr  9 04:01:14 2008
@@ -19,6 +19,7 @@
  * @version $Revision$
  */
 #include "T1Glyph.h"
+#include <string.h>
 
 T1Glyph::T1Glyph(Type1Map *charStringMap, Type1Map *subrsMap, ufshort unicode, ufshort size, ffloat relativeSize, ffloat* fontBB):Glyph() {
 	_charStringMap = charStringMap;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Tables.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Tables.h?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Tables.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/Tables.h Wed Apr  9 04:01:14 2008
@@ -55,7 +55,7 @@
 typedef flong Fixed;
 typedef long long LONGDT;
 
-typedef enum
+enum
 {
 	ON_CURVE	= 0x01, // on curve or not
 	REPEAT		= 0x08,	// next byte specifies the number of 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/fljni.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/fljni.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/fljni.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/shared/fljni.cpp Wed Apr  9 04:01:14 2008
@@ -16,6 +16,7 @@
  */
 
 #include "fljni.h"
+#include <string.h>
 
 /*
  * Class:     org_apache_harmony_awt_gl_font_fontlib_FLFontManager

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XBlitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XBlitter.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XBlitter.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XBlitter.cpp Wed Apr  9 04:01:14 2008
@@ -361,8 +361,6 @@
         XRenderComposite(display, op, srcPict, alphaMask, dstPict, 
             srcX, srcY, 0, 0, dstX, dstY, width, height);
 
-        XFlush(display);
-
         if(alphaMask) XRenderFreePicture(display, alphaMask);
         XRenderFreePicture(display, srcPict);
         XRenderFreePicture(display, dstPict);
@@ -447,7 +445,6 @@
 
         XSetClipRectangles(display, dstSurf->gc, 0, 0, rects, num_rects, Unsorted);
         XCopyArea(display, srcSurf->drawable, dstSurf->drawable, dstSurf->gc, srcX, srcY, width, height, dstX, dstY);
-        XFlush(display);
 
         if(rects) free(rects);
         return;
@@ -568,8 +565,6 @@
 
         XRenderComposite(display, op, srcPict, alphaMask, dstPict, 
             srcX, srcY, 0, 0, dstX, dstY, width, height);
-
-        XFlush(display);
 
         if(alphaMask) XRenderFreePicture(display, alphaMask);
         XRenderFreePicture(display, srcPict);

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/XGraphics2D.cpp Wed Apr  9 04:01:14 2008
@@ -244,4 +244,10 @@
     return ret;
 }
 
+JNIEXPORT jint JNICALL 
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_flush
+(JNIEnv *env, jobject obj, jlong display)
+{
+    XFlush((Display *)display);
+}
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/exports.txt Wed Apr  9 04:01:14 2008
@@ -32,6 +32,7 @@
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setForeground
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setFunction
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setStroke
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_flush
 Java_org_apache_harmony_awt_gl_linux_XSurface_createSurfData
 Java_org_apache_harmony_awt_gl_linux_XSurface_dispose
 Java_org_apache_harmony_awt_gl_linux_PixmapSurface_createSurfData

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/unix/include/org_apache_harmony_awt_gl_linux_XGraphics2D.h Wed Apr  9 04:01:14 2008
@@ -158,6 +158,12 @@
 Java_org_apache_harmony_awt_gl_linux_XGraphics2D_setStroke(JNIEnv *, jobject, 
     jlong, jlong, jint, jint, jint, jint, jbyteArray, jint);
 
+/*
+ * Method: org.apache.harmony.awt.gl.linux.XGraphics2D.flush(J)V
+ */
+JNIEXPORT jint JNICALL 
+Java_org_apache_harmony_awt_gl_linux_XGraphics2D_flush(JNIEnv *, jobject, jlong);
+
 #ifdef __cplusplus
 }
 #endif

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c Wed Apr  9 04:01:14 2008
@@ -27,7 +27,7 @@
 
 int gl_cmsErrorHandler(int errorCode, const char *msg) {
   if(errorCode == LCMS_ERRC_ABORTED) {
-    errMsg = strdup(msg); // Throw exception later, after returning control from cmm
+    errMsg = _strdup(msg); // Throw exception later, after returning control from cmm
   }
 
   return 1;

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/build.xml?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/build.xml Wed Apr  9 04:01:14 2008
@@ -101,7 +101,8 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/beans.jar"
-             manifest="${hy.beans}/META-INF/MANIFEST.MF">
+             manifest="${hy.beans}/META-INF/MANIFEST.MF"
+             compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyDescriptor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyDescriptor.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyDescriptor.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyDescriptor.java Wed Apr  9 04:01:14 2008
@@ -218,7 +218,7 @@
     String createDefaultMethodName(String propertyName, String prefix) {
         String result = null;
         if (propertyName != null) {
-            String bos = propertyName.substring(0, 1).toUpperCase();
+            String bos = BeansUtils.toASCIIUpperCase(propertyName.substring(0, 1));
             String eos = propertyName.substring(1, propertyName.length());
             result = prefix + bos + eos;
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/BeansUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/BeansUtils.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/BeansUtils.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/BeansUtils.java Wed Apr  9 04:01:14 2008
@@ -26,4 +26,32 @@
     public static final int getHashCode(boolean b) {
         return b?1:0;
     }
+    
+    public static String toASCIILowerCase(String s) {
+        int len = s.length();
+        StringBuilder buffer = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = s.charAt(i);
+            if ('A' <= c && c <= 'Z') {
+                buffer.append((char) (c + ('a' - 'A')));
+            } else {
+                buffer.append(c);
+            }
+        }
+        return buffer.toString();
+    }
+    
+    public static String toASCIIUpperCase(String s) {
+        int len = s.length();
+        StringBuilder buffer = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = s.charAt(i);
+            if ('a' <= c && c <= 'z') {
+                buffer.append((char) (c - ('a' - 'A')));
+            } else {
+                buffer.append(c);
+            }
+        }
+        return buffer.toString();
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java Wed Apr  9 04:01:14 2008
@@ -23,6 +23,7 @@
 import java.beans.PropertyEditorSupport;
 import java.io.Serializable;
 import java.lang.reflect.Method;
+import java.util.Locale;
 
 import junit.framework.TestCase;
 
@@ -1221,5 +1222,27 @@
         PropertyDescriptor pd2 = new PropertyDescriptor("a",MockBean.class);
         assertEquals(pd1, pd2);
         assertEquals(pd1.hashCode(), pd2.hashCode());
+    }
+    
+    private class MockBeanForTR {
+        int i;
+
+        public int getI() {
+            return i;
+        }
+
+        public void setI(int i) {
+            this.i = i;
+        }
+    }
+    
+    public void testByLocale() throws IntrospectionException{
+        Locale backup = Locale.getDefault();
+        Locale.setDefault(new Locale("TR"));
+        try {
+            assertNotNull(new PropertyDescriptor("i", MockBeanForTR.class));
+        } finally {
+            Locale.setDefault(backup);
+        }
     }
 }

Propchange: harmony/enhanced/classlib/branches/java6/modules/concurrent/
------------------------------------------------------------------------------
--- svn:externals (original)
+++ svn:externals Wed Apr  9 04:01:14 2008
@@ -1 +1 @@
-standard https://svn.apache.org/repos/asf/harmony/standard/classlib/trunk/modules/concurrent
+standard http://svn.apache.org/repos/asf/harmony/standard/classlib/trunk/modules/concurrent

Modified: harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml Wed Apr  9 04:01:14 2008
@@ -99,7 +99,8 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/${hy.concurrent.packaging.jarname}.jar"
-             manifest="${hy.concurrent}/META-INF/MANIFEST.MF">
+             manifest="${hy.concurrent}/META-INF/MANIFEST.MF"
+             compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 

Modified: harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml Wed Apr  9 04:01:14 2008
@@ -101,7 +101,8 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/${hy.crypto.packaging.jarname}.jar"
-             manifest="${hy.crypto}/META-INF/MANIFEST.MF">
+             manifest="${hy.crypto}/META-INF/MANIFEST.MF"
+             compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 

Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml Wed Apr  9 04:01:14 2008
@@ -145,7 +145,8 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/imageio.jar"
-             manifest="${hy.imageio}/META-INF/MANIFEST.MF">
+             manifest="${hy.imageio}/META-INF/MANIFEST.MF"
+             compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 

Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/ImageIO.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/ImageIO.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/ImageIO.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/src/main/java/javax/imageio/ImageIO.java Wed Apr  9 04:01:14 2008
@@ -50,10 +50,9 @@
 
     public static void setUseCache(boolean useCache) throws NotImplementedException {
         // TODO: implement
-        throw new NotImplementedException();
     }
 
-    public static boolean getUseCache() {
+    public static boolean getUseCache()  throws NotImplementedException {
         // TODO: implement
         return false;
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml Wed Apr  9 04:01:14 2008
@@ -124,7 +124,8 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/instrument.jar"
-             manifest="${hy.instrument}/META-INF/MANIFEST.MF">
+             manifest="${hy.instrument}/META-INF/MANIFEST.MF"
+             compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml Wed Apr  9 04:01:14 2008
@@ -99,7 +99,8 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/jndi.jar"
-             manifest="${hy.jndi}/META-INF/MANIFEST.MF">
+             manifest="${hy.jndi}/META-INF/MANIFEST.MF"
+             compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompoundName.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompoundName.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompoundName.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompoundName.java Wed Apr  9 04:01:14 2008
@@ -625,6 +625,9 @@
     }
 
     public Name getSuffix(int index) {
+        if (index == elem.size()) {
+            return new CompoundName(new Vector<String>().elements(), mySyntax);
+        }
         validateIndex(index, false);
         return new CompoundName(new Vector<String>(elem.subList(index, elem
                 .size())).elements(), mySyntax);

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/EnvironmentReader.java Wed Apr  9 04:01:14 2008
@@ -304,7 +304,12 @@
 
         String resPath = null;
         // Construct the full filename of "java.home"/lib/jndi.properties
-        resPath = System.getProperty("java.home"); //$NON-NLS-1$
+        resPath = AccessController.doPrivileged(new PrivilegedAction<String>(){
+            public String run() {
+                return System.getProperty("java.home"); //$NON-NLS-1$ 
+            }
+        }); 
+        
         if (!resPath.endsWith(sep)) {
             resPath += sep;
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapClient.java Wed Apr  9 04:01:14 2008
@@ -27,13 +27,10 @@
 import java.util.List;
 
 import javax.naming.CommunicationException;
-import javax.naming.ConfigurationException;
-import javax.naming.Context;
 import javax.naming.NamingException;
 import javax.naming.ldap.Control;
 import javax.naming.ldap.StartTlsRequest;
 import javax.net.SocketFactory;
-import javax.net.ssl.SSLSocketFactory;
 
 import org.apache.harmony.jndi.internal.nls.Messages;
 import org.apache.harmony.jndi.provider.ldap.LdapContextImpl.UnsolicitedListener;
@@ -95,6 +92,11 @@
      */
     private List<UnsolicitedListener> unls = new ArrayList<UnsolicitedListener>();
 
+    /**
+     * how may references point to this client
+     */
+    private int referCount = 0;
+
     // constructor for test
     public LdapClient() {
         // do nothing
@@ -520,33 +522,17 @@
      */
     public static LdapClient newInstance(String host, int port,
             Hashtable<?, ?> envmt) throws NamingException {
-        String factoryName = (String) envmt
-                .get("java.naming.ldap.factory.socket");
+        return newInstance(host, port, envmt, false);
+    }
 
-        SocketFactory factory = null;
-        if (factoryName == null || "".equals(factoryName)) {
-            if ("ssl".equalsIgnoreCase((String) envmt
-                    .get(Context.SECURITY_PROTOCOL))) {
-                factory = SSLSocketFactory.getDefault();
-            } else {
-                factory = SocketFactory.getDefault();
-            }
-        } else {
+    public static LdapClient newInstance(String host, int port,
+            Hashtable<?, ?> envmt, boolean isLdaps) throws NamingException {
+        SocketFactory factory = LdapUtils.getSocketFactory(envmt, isLdaps);
 
-            try {
-                factory = (SocketFactory) classForName(factoryName)
-                        .newInstance();
-            } catch (Exception e) {
-                ConfigurationException ex = new ConfigurationException();
-                ex.setRootCause(e);
-                throw ex;
-            }
-        }
         // TODO: get LdapClient from pool first.
 
         try {
             return new LdapClient(factory, host, port);
-
         } catch (IOException e) {
             CommunicationException ex = new CommunicationException();
             ex.setRootCause(e);
@@ -554,34 +540,6 @@
         }
     }
 
-    private static Class<?> classForName(final String className)
-            throws ClassNotFoundException {
-
-        Class<?> cls = null;
-        // try thread context class loader first
-        try {
-            cls = Class.forName(className, true, Thread.currentThread()
-                    .getContextClassLoader());
-        } catch (ClassNotFoundException e) {
-            // Ignored.
-        }
-        // try system class loader second
-        try {
-            cls = Class.forName(className, true, ClassLoader
-                    .getSystemClassLoader());
-        } catch (ClassNotFoundException e1) {
-            // Ignored.
-        }
-
-        if (cls == null) {
-            // jndi.1C=class {0} not found
-            throw new ClassNotFoundException(Messages.getString(
-                    "jndi.1C", className)); //$NON-NLS-1$
-        }
-
-        return cls;
-    }
-
     /**
      * struct for holding necessary info to add to requests list
      */
@@ -705,6 +663,16 @@
         }
     }
 
+    // FIXME simple implementation
+    public void use() {
+        referCount++;
+    }
+
+    // FIXME simple implementation
+    public void unuse() {
+        referCount--;
+    }
+
     private void notifyPersistenSearchListener(Element element) {
         PersistentSearchResult psr = (PersistentSearchResult) ((SearchOp) element.response
                 .getResponseOp()).getSearchResult();
@@ -726,4 +694,7 @@
         }
     }
 
+    public int getReferCount() {
+        return referCount;
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactory.java?rev=646264&r1=646263&r2=646264&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/LdapContextFactory.java Wed Apr  9 04:01:14 2008
@@ -49,7 +49,8 @@
         int port = parser.getPort();
         String dn = parser.getBaseObject();
 
-        LdapClient client = LdapClient.newInstance(host, port, myEnv);
+        LdapClient client = LdapClient.newInstance(host, port, myEnv, LdapUtils
+                .isLdapsURL(url));
 
         LdapContextImpl context = new LdapContextImpl(client, myEnv, dn);
 



Mime
View raw message