mirror of https://github.com/apache/maven.git
potential NPE
This commit is contained in:
parent
9bec8d7386
commit
445421051c
|
@ -309,7 +309,7 @@ public class ComparableVersion
|
||||||
Item r = right.hasNext() ? right.next() : null;
|
Item r = right.hasNext() ? right.next() : null;
|
||||||
|
|
||||||
// if this is shorter, then invert the compare and mul with -1
|
// 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 )
|
if ( result != 0 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue