You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2016/03/01 18:37:13 UTC
lucene-solr git commit: LUCENE-7053: Simplify code to work around
Java 8u25 compiler bug
Repository: lucene-solr
Updated Branches:
refs/heads/master ff6557cbc -> 3c27980c4
LUCENE-7053: Simplify code to work around Java 8u25 compiler bug
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3c27980c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3c27980c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3c27980c
Branch: refs/heads/master
Commit: 3c27980c4ae7777716ba74b3a0e2c70b3dd1c1d4
Parents: ff6557c
Author: Uwe Schindler <us...@apache.org>
Authored: Tue Mar 1 18:36:54 2016 +0100
Committer: Uwe Schindler <us...@apache.org>
Committed: Tue Mar 1 18:36:54 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/lucene/search/suggest/tst/TSTLookup.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3c27980c/lucene/suggest/src/java/org/apache/lucene/search/suggest/tst/TSTLookup.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/tst/TSTLookup.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/tst/TSTLookup.java
index 888882a..d0b9247 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/tst/TSTLookup.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/tst/TSTLookup.java
@@ -74,12 +74,7 @@ public class TSTLookup extends Lookup {
final byte[] bBytes = b.bytes;
int bUpto = b.offset;
- final int aStop;
- if (a.length < b.length) {
- aStop = aUpto + a.length;
- } else {
- aStop = aUpto + b.length;
- }
+ final int aStop = aUpto + Math.min(a.length, b.length);
while(aUpto < aStop) {
int aByte = aBytes[aUpto++] & 0xff;