From 2f6d798e90520dd1b83ac30e53838ae6fd41a150 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 18 May 2015 08:18:13 +0000
Subject: [PATCH] AutoRefactor'ed use multi-catch

---
 opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
index 514b710..66edee4 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/InstallerHelper.java
@@ -298,18 +298,10 @@
 
       writer.writeEntry(entry);
       writer.close();
-    } catch (DirectoryException de) {
+    } catch (DirectoryException | LDIFException | IOException de) {
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR,
               getThrowableMsg(INFO_ERROR_IMPORTING_LDIF.get(), de), de);
-    } catch (LDIFException le) {
-      throw new ApplicationException(
-          ReturnCode.CONFIGURATION_ERROR,
-              getThrowableMsg(INFO_ERROR_IMPORTING_LDIF.get(), le), le);
-    } catch (IOException ioe) {
-      throw new ApplicationException(
-          ReturnCode.CONFIGURATION_ERROR,
-              getThrowableMsg(INFO_ERROR_IMPORTING_LDIF.get(), ioe), ioe);
     } catch (Throwable t) {
       throw new ApplicationException(
           ReturnCode.BUG, getThrowableMsg(
@@ -361,15 +353,11 @@
       Utilities.deleteConfigSubtree(
           DirectoryServer.getConfigHandler(), DN.valueOf(dn));
     }
-    catch (OpenDsException ode)
+    catch (OpenDsException | ConfigException ode)
     {
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR, ode.getMessageObject(), ode);
     }
-    catch(ConfigException ce)
-    {
-      throw new ApplicationException(ReturnCode.CONFIGURATION_ERROR, ce.getMessageObject(), ce);
-    }
   }
 
 

--
Gitblit v1.10.0