Fixes #2515: Incorrectly version comparison
Incorrectly prefer the channel over revision to determine the newest version.
This commit is contained in:
@@ -42,14 +42,14 @@ public final class DefaultVersion extends BaseVersion
|
|||||||
@Override
|
@Override
|
||||||
public boolean isNewerAs( final Version maybeOlder )
|
public boolean isNewerAs( final Version maybeOlder )
|
||||||
{
|
{
|
||||||
if( this.revision() > maybeOlder.revision() )
|
if( this.revision() < maybeOlder.revision() )
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.channel().compareTo( maybeOlder.channel() ) > 0 )
|
if( this.channel().compareTo( maybeOlder.channel() ) < 0 )
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.build() > maybeOlder.build();
|
return this.build() > maybeOlder.build();
|
||||||
|
|||||||
Reference in New Issue
Block a user