elharo commented on code in PR #2: URL: https://github.com/apache/maven-jarsigner/pull/2#discussion_r1161162052
########## src/main/java/org/apache/maven/shared/jarsigner/JarSignerUtil.java: ########## @@ -200,37 +174,32 @@ public static boolean isArchiveSigned( final File jarFile ) * @param entryName The name of the JAR file entry to check, must not be <code>null</code>. * @return <code>true</code> if the entry is related to a signature, <code>false</code> otherwise. */ - protected static boolean isSignatureFile( String entryName ) - { - if ( entryName.regionMatches( true, 0, "META-INF", 0, 8 ) ) - { - entryName = entryName.replace( '\\', '/' ); - - if ( entryName.indexOf( '/' ) == 8 && entryName.lastIndexOf( '/' ) == 8 ) - { - return endsWithIgnoreCase( entryName, ".SF" ) || endsWithIgnoreCase( entryName, ".DSA" ) - || endsWithIgnoreCase( entryName, ".RSA" ) || endsWithIgnoreCase( entryName, ".EC" ); + protected static boolean isSignatureFile(String entryName) { + if (entryName.regionMatches(true, 0, "META-INF", 0, 8)) { + entryName = entryName.replace('\\', '/'); + + if (entryName.indexOf('/') == 8 && entryName.lastIndexOf('/') == 8) { + return endsWithIgnoreCase(entryName, ".SF") + || endsWithIgnoreCase(entryName, ".DSA") + || endsWithIgnoreCase(entryName, ".RSA") + || endsWithIgnoreCase(entryName, ".EC"); } } return false; } - protected static boolean isManifestFile( String entryName ) - { - if ( entryName.regionMatches( true, 0, "META-INF", 0, 8 ) ) - { - entryName = entryName.replace( '\\', '/' ); + protected static boolean isManifestFile(String entryName) { + if (entryName.regionMatches(true, 0, "META-INF", 0, 8)) { + entryName = entryName.replace('\\', '/'); Review Comment: ditto ########## src/main/java/org/apache/maven/shared/jarsigner/JarSignerUtil.java: ########## @@ -200,37 +174,32 @@ public static boolean isArchiveSigned( final File jarFile ) * @param entryName The name of the JAR file entry to check, must not be <code>null</code>. * @return <code>true</code> if the entry is related to a signature, <code>false</code> otherwise. */ - protected static boolean isSignatureFile( String entryName ) - { - if ( entryName.regionMatches( true, 0, "META-INF", 0, 8 ) ) - { - entryName = entryName.replace( '\\', '/' ); - - if ( entryName.indexOf( '/' ) == 8 && entryName.lastIndexOf( '/' ) == 8 ) - { - return endsWithIgnoreCase( entryName, ".SF" ) || endsWithIgnoreCase( entryName, ".DSA" ) - || endsWithIgnoreCase( entryName, ".RSA" ) || endsWithIgnoreCase( entryName, ".EC" ); + protected static boolean isSignatureFile(String entryName) { + if (entryName.regionMatches(true, 0, "META-INF", 0, 8)) { + entryName = entryName.replace('\\', '/'); Review Comment: Please file an issue for that. These lines are changing only because parent pom 39 requires reformatting. Byte code should be identical. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org