From a41662c1136b2bb4a4198df89e0e87d2be3ef099 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 16 Jul 2015 14:57:56 +0000
Subject: [PATCH] AutoRefactor'ed simplify expressions

---
 opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java b/opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java
index e700455..478169e 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/schema/GeneralizedTimeSyntax.java
@@ -864,7 +864,7 @@
       case '-':
         // These are fine only if there are exactly two or four more digits that
         // specify a valid offset.
-        if ((length == 13) || (length == 15))
+        if (length == 13 || length == 15)
         {
           try
           {
@@ -1036,7 +1036,7 @@
       case '-':
         // These are fine only if there are exactly two or four more digits that
         // specify a valid offset.
-        if ((length == 15) || (length == 17))
+        if (length == 15 || length == 17)
         {
           try
           {
@@ -1126,7 +1126,7 @@
       case '-':
         // These are fine only if there are exactly two or four more digits that
         // specify a valid offset.
-        if ((length == 17) || (length == 19))
+        if (length == 17 || length == 19)
         {
           try
           {
@@ -1224,7 +1224,7 @@
 
         case 'Z':
           // This is only acceptable if we're at the end of the value.
-          if (i != (value.length() - 1))
+          if (i != value.length() - 1)
           {
             LocalizableMessage message =
                 WARN_ATTR_SYNTAX_GENERALIZED_TIME_ILLEGAL_FRACTION_CHAR.
@@ -1307,7 +1307,8 @@
           throws DirectoryException
   {
     String offSetStr = value.substring(startPos);
-    if ((offSetStr.length() != 3) && (offSetStr.length() != 5))
+    int len = offSetStr.length();
+    if (len != 3 && len != 5)
     {
       LocalizableMessage message = WARN_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET.get(
           value, offSetStr);
@@ -1389,7 +1390,7 @@
 
     // If there are two more characters, then they must be an integer between
     // 00 and 59.
-    if (offSetStr.length() == 5)
+    if (len == 5)
     {
       switch (offSetStr.charAt(3))
       {

--
Gitblit v1.10.0