From a8f5d8345278d27ddf5325d3977e460b86b6275f Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Tue, 27 Apr 2010 20:56:50 +0000
Subject: [PATCH] Fixing several issues with the Control Panel, the QuickSetup, Core server and Replication. Also improves unit, functional tests. More specifically this commit resolves the following open issues: 4385 - NPE when using ExtensibleMatch filter without a matching rule 4521 - dynamic lookup in attribut selection when selecting the sort order attribut while defining VLV index 4531 - Control Panel creates virtual static groups using groupOfURLs as objectclass 4533 - NullPointerException when configuring replication between 2 OpenDS 4539 - DSML Gateway - jaxb.properties Exception

---
 opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java b/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
index 5110237..6139948 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Copyright 2006-2010 Sun Microsystems, Inc.
  */
 
 package org.opends.quicksetup.ui;
@@ -732,11 +732,13 @@
 
   /**
    * This method initialize the look and feel and UI settings.
+   * @throws Throwable if there is a problem initializing the look and feel.
    */
-  public static void initialize()
+  public static void initialize() throws Throwable
   {
     if (!initialized)
     {
+      final Throwable[] ts = {null};
       Runnable r = new Runnable()
       {
         public void run()
@@ -744,11 +746,16 @@
           System.setProperty("swing.aatext", "true");
           try
           {
-            UIManager.setLookAndFeel(
-                UIManager.getSystemLookAndFeelClassName());
+            String lf = UIManager.getSystemLookAndFeelClassName();
+            if (lf.equalsIgnoreCase(
+                "com.sun.java.swing.plaf.motif.MotifLookAndFeel"))
+            {
+             lf = UIManager.getCrossPlatformLookAndFeelClassName();
+            }
+            UIManager.setLookAndFeel(lf);
           } catch (Throwable t)
           {
-            t.printStackTrace();
+            ts[0] = t;
           }
           JFrame.setDefaultLookAndFeelDecorated(false);
         }
@@ -765,9 +772,13 @@
         }
         catch (Throwable t)
         {
-          t.printStackTrace();
+          ts[0] = t;
         }
       }
+      if (ts[0] != null)
+      {
+        throw ts[0];
+      }
       initialized = true;
     }
   }

--
Gitblit v1.10.0