Skip to content

Commit

Permalink
Sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Aug 21, 2024
1 parent 4663e02 commit 7eabc95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private VersionCheck() {}

public static String findFromPropsFile( String path ) {
Properties props = PropsIO.loadFromClassLoaderSafe( path );
if ( props != null && props.containsKey( "version" ) ) {
if ( props.containsKey( "version" ) ) {
String latest = props.getProperty( "version" );
log.info( "findVersion() latest : {}", latest );
return latest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
@Slf4j
public class TestVersionCheck {

private static String V_8_6_2 = "8.6.2";
private static final String V_8_6_2 = "8.6.2";

@Test
public void testVersionCheck() {
Assert.assertTrue(VersionCheck.isMajorThan( V_8_6_2, "8.6.1" ));
Assert.assertTrue(VersionCheck.isMajorThan( V_8_6_2, "8.6.1-SNAPSHOT" ));
Assert.assertFalse(VersionCheck.isMajorThan( "8.5.1", "8.5.2" ));
VenusContext context = new VenusContext( new File( "target" ), V_8_6_2, "base" );
Assert.assertFalse( context.isPreVersion862() );
log.info( "version from null to : {}", VersionCheck.findVersion( null ) );
log.info( "version from null to : {}", VersionCheck.findVersion( VersionCheck.LATEST ) );
Assert.assertEquals( V_8_6_2, VersionCheck.findFromPropsFile( "maven/pom.properties" ) );
}

Expand Down

0 comments on commit 7eabc95

Please sign in to comment.