From ca669ae54f86dbeea277280690584d9f591c7571 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 18 Feb 2015 07:26:26 +0000
Subject: [PATCH] AutoRefactor: collapse if statements

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
index af07931..29c24f8 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
@@ -1055,13 +1055,11 @@
     }
 
     setPrimaryValid(lUsage);
-    if (nonModifiable.isSelected())
+    if (nonModifiable.isSelected()
+        && AttributeUsage.USER_APPLICATIONS.equals(usage.getSelectedItem()))
     {
-      if (AttributeUsage.USER_APPLICATIONS.equals(usage.getSelectedItem()))
-      {
-        errors.add(ERR_NON_MODIFIABLE_CANNOT_BE_USER_APPLICATIONS.get());
-        setPrimaryInvalid(lUsage);
-      }
+      errors.add(ERR_NON_MODIFIABLE_CANNOT_BE_USER_APPLICATIONS.get());
+      setPrimaryInvalid(lUsage);
     }
 
     if (errors.isEmpty())

--
Gitblit v1.10.0