Fixes #2515: Incorrectly version comparison

Incorrectly prefer the channel over revision to determine the newest
version.

(cherry picked from commit 3600c72)
This commit is contained in:
yueh 2016-10-28 01:01:40 +08:00 committed by xsun2001
parent 1f22bc4205
commit f296445521
1 changed files with 4 additions and 4 deletions

View File

@ -42,14 +42,14 @@ public final class DefaultVersion extends BaseVersion
@Override
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();