james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [05/21] james-project git commit: JAMES-2044 Removing useless else blocks in LuceneMessageSearchIndex
Date Wed, 07 Jun 2017 10:46:15 GMT
JAMES-2044 Removing useless else blocks in LuceneMessageSearchIndex


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/10260702
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/10260702
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/10260702

Branch: refs/heads/master
Commit: 10260702d71366b6df357abcd24137b058fa4561
Parents: 81ef429
Author: benwa <btellier@linagora.com>
Authored: Mon Jun 5 16:22:17 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Wed Jun 7 17:34:32 2017 +0700

----------------------------------------------------------------------
 .../lucene/search/LuceneMessageSearchIndex.java | 30 +++++++-------------
 1 file changed, 10 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/10260702/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
----------------------------------------------------------------------
diff --git a/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
b/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
index 91b39a6..61a32e1 100644
--- a/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
+++ b/mailbox/lucene/src/main/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndex.java
@@ -1068,63 +1068,53 @@ public class LuceneMessageSearchIndex extends ListeningMessageSearchIndex
{
             case Arrival:
                 if (reverse) {
                     return ARRIVAL_MAILBOX_SORT_REVERSE;
-                } else {
-                    return ARRIVAL_MAILBOX_SORT;
                 }
+                return ARRIVAL_MAILBOX_SORT;
             case SentDate:
                 if (reverse) {
                     return SENT_DATE_SORT_REVERSE;
-                } else {
-                    return SENT_DATE_SORT;
                 }
+                return SENT_DATE_SORT;
             case MailboxCc:
                 if (reverse) {
                     return FIRST_CC_MAILBOX_SORT_REVERSE;
-                } else {
-                    return FIRST_CC_MAILBOX_SORT;
                 }
+                return FIRST_CC_MAILBOX_SORT;
             case MailboxFrom:
                 if (reverse) {
                     return FIRST_FROM_MAILBOX_SORT_REVERSE;
-                } else {
-                    return FIRST_FROM_MAILBOX_SORT;
                 }
+                return FIRST_FROM_MAILBOX_SORT;
             case Size:
                 if (reverse) {
                     return SIZE_SORT_REVERSE;
-                } else {
-                    return SIZE_SORT;
                 }
+                return SIZE_SORT;
             case BaseSubject:
                 if (reverse) {
                     return BASE_SUBJECT_SORT_REVERSE;
-                } else {
-                    return BASE_SUBJECT_SORT;
                 }
+                return BASE_SUBJECT_SORT;
             case MailboxTo:
                 if (reverse) {
                     return FIRST_TO_MAILBOX_SORT_REVERSE;
-                } else {
-                    return FIRST_TO_MAILBOX_SORT;
                 }
+                return FIRST_TO_MAILBOX_SORT;
             case Uid:
                 if (reverse) {
                     return UID_SORT_REVERSE;
-                } else {
-                    return UID_SORT;
                 }
+                return UID_SORT;
             case DisplayFrom:
                 if (reverse) {
                     return FIRST_FROM_MAILBOX_DISPLAY_SORT_REVERSE;
-                } else {
-                    return FIRST_FROM_MAILBOX_DISPLAY_SORT;
                 }
+                return FIRST_FROM_MAILBOX_DISPLAY_SORT;
             case DisplayTo:
                 if (reverse) {
                     return FIRST_TO_MAILBOX_DISPLAY_SORT_REVERSE;
-                } else {
-                    return FIRST_TO_MAILBOX_DISPLAY_SORT;
                 }
+                return FIRST_TO_MAILBOX_DISPLAY_SORT;
             default:
                 return null;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message