Fixes #2515: Incorrectly version comparison

Incorrectly prefer the channel over revision to determine the newest
version.
This commit is contained in:
yueh 2016-10-27 19:01:40 +02:00
parent 2a206594cf
commit 3600c72709
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();