Skip to content

Commit

Permalink
Add Checkstyle UnnecessaryParentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Dec 29, 2024
1 parent 76fff81 commit ca7cad0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/conf/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ limitations under the License.
<module name="SuperClone" />
<module name="SuperFinalize" />
<module name="UnusedImports" />
<module name="UnnecessaryParentheses" />
<module name="UpperEll" />
<module name="WhitespaceAfter" />
<module name="WhitespaceAround" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ public static boolean matches(final byte[] signature, final int length) {
if (length < 6) {
return false;
}

// Check binary values
if ((signature[0] == 0x71 && (signature[1] & 0xFF) == 0xc7) || (signature[1] == 0x71 && (signature[0] & 0xFF) == 0xc7)) {
if (signature[0] == 0x71 && (signature[1] & 0xFF) == 0xc7 || signature[1] == 0x71 && (signature[0] & 0xFF) == 0xc7) {
return true;
}

// Check Ascii (String) values
// 3037 3037 30nn
if (signature[0] != 0x30) {
Expand Down Expand Up @@ -115,7 +113,6 @@ public static boolean matches(final byte[] signature, final int length) {
if (signature[5] == 0x37) {
return true;
}

return false;
}

Expand Down

0 comments on commit ca7cad0

Please sign in to comment.