Skip to content

Commit

Permalink
fix of version's comparing.(I don't know why it was wrong but...)
Browse files Browse the repository at this point in the history
  • Loading branch information
xsun2001 committed Aug 13, 2017
1 parent 63880be commit 107fc55
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/main/java/appeng/services/version/DefaultVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ public DefaultVersion( @Nonnegative final int revision, @Nonnull final Channel c
@Override
public boolean isNewerAs( final Version maybeOlder )
{
if( this.revision() < maybeOlder.revision() )
if( this.revision() == maybeOlder.revision() )
{
return false;
if( this.channel().compareTo( maybeOlder.channel() ) == 0 )
{
return this.build() > maybeOlder.build();
}
return this.channel().compareTo( maybeOlder.channel() ) > 0;
}

if( this.channel().compareTo( maybeOlder.channel() ) < 0 )
{
return false;
}

return this.build() > maybeOlder.build();
else
return this.revision() > maybeOlder.revision();
}
}

0 comments on commit 107fc55

Please sign in to comment.