potential NPE

This commit is contained in:
Stephen Connolly 2014-01-06 10:43:51 +00:00
parent 9bec8d7386
commit 445421051c
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ public class ComparableVersion
Item r = right.hasNext() ? right.next() : null;
// if this is shorter, then invert the compare and mul with -1
int result = l == null ? -1 * r.compareTo( l ) : l.compareTo( r );
int result = l == null ? ( r == null ? 0 : -1 * r.compareTo( l ) ) : l.compareTo( r );
if ( result != 0 )
{