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/AbstractVLVIndexPanel.java | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java
index 918df78..fa21c1d 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/AbstractVLVIndexPanel.java
@@ -666,13 +666,10 @@
if (index != null)
{
IndexType type = indexTypes[i];
- if (type != null)
+ if (type != null && !index.getTypes().contains(type))
{
- if (!index.getTypes().contains(type))
- {
- msgs.add(INFO_CTRL_PANEL_MUST_UPDATE_INDEX_DEFINITION_TYPE.get(
- filter.getAttributeType(), indexTypeNames[i]));
- }
+ msgs.add(INFO_CTRL_PANEL_MUST_UPDATE_INDEX_DEFINITION_TYPE.get(
+ filter.getAttributeType(), indexTypeNames[i]));
}
}
else
@@ -1214,15 +1211,13 @@
model.getElementAt(j);
if (o.getType() == CategorizedComboBoxElement.Type.REGULAR)
{
- if (dealingWithCustom == isCustom)
+ if (dealingWithCustom == isCustom
+ && attrName.compareTo(o.getValue().toString()) < 0)
{
- if (attrName.compareTo(o.getValue().toString()) < 0)
- {
- model.insertElementAt(new CategorizedComboBoxElement(
- attrName,
- CategorizedComboBoxElement.Type.REGULAR), j);
- break;
- }
+ model.insertElementAt(new CategorizedComboBoxElement(
+ attrName,
+ CategorizedComboBoxElement.Type.REGULAR), j);
+ break;
}
}
else if (!o.getValue().equals(CUSTOM_ATTRIBUTES))
--
Gitblit v1.10.0