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

---
 opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java
index 43c0677..0fef398 100644
--- a/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/Driver.java
@@ -202,10 +202,7 @@
                     // definition of the component being created.
                     PropertyDefinition<?> pdTmp = definition.getPropertyDefinition(propertyName);
                     pd2 = pd1.getClass().cast(pdTmp);
-                } catch (IllegalArgumentException e) {
-                    throw new PropertyNotFoundException(propertyName);
-                } catch (ClassCastException e) {
-                    // FIXME: would be nice to throw a better exception here.
+                } catch (IllegalArgumentException | ClassCastException e) {
                     throw new PropertyNotFoundException(propertyName);
                 }
 
@@ -227,16 +224,8 @@
                     // inherits its defaults from the newly created managed object.
                     return getPropertyValues(target, pd2);
                 }
-            } catch (PropertyException e) {
-                // Wrap any errors due to recursion.
-                throw PropertyException.defaultBehaviorException(pd1, e);
-            } catch (DefinitionDecodingException e) {
-                throw PropertyException.defaultBehaviorException(pd1, e);
-            } catch (PropertyNotFoundException e) {
-                throw PropertyException.defaultBehaviorException(pd1, e);
-            } catch (LdapException e) {
-                throw PropertyException.defaultBehaviorException(pd1, e);
-            } catch (ManagedObjectNotFoundException e) {
+            } catch (PropertyException | DefinitionDecodingException | PropertyNotFoundException
+                    | LdapException | ManagedObjectNotFoundException e) {
                 throw PropertyException.defaultBehaviorException(pd1, e);
             }
         }

--
Gitblit v1.10.0