You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/02/04 19:36:19 UTC
(commons-vfs) 03/26: Remove redundant parens
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
commit 2bbf25da73ffd52ea6899e33b4605387c0995dd4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Feb 4 14:25:11 2024 -0500
Remove redundant parens
---
.../org/apache/commons/vfs2/example/filter/AgeFileFilterExample.java | 2 +-
.../src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java | 4 ++--
.../test/java/org/apache/commons/vfs2/filter/AgeFileFilterTest.java | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/filter/AgeFileFilterExample.java b/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/filter/AgeFileFilterExample.java
index b0d15593..0e84c906 100644
--- a/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/filter/AgeFileFilterExample.java
+++ b/commons-vfs2-examples/src/main/java/org/apache/commons/vfs2/example/filter/AgeFileFilterExample.java
@@ -41,7 +41,7 @@ public final class AgeFileFilterExample {
final FileObject dir = fsManager.toFileObject(new File("."));
// We are interested in files older than one day
- final long cutoff = System.currentTimeMillis() - (24 * 60 * 60 * 1000);
+ final long cutoff = System.currentTimeMillis() - 24 * 60 * 60 * 1000;
final AgeFileFilter filter = new AgeFileFilter(cutoff);
final FileObject[] files = dir.findFiles(new FileFilterSelector(filter));
diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
index edf099e0..6777a0f1 100644
--- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
+++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java
@@ -59,7 +59,7 @@ public class DefaultCryptor implements Cryptor {
if (id2 == INDEX_NOT_FOUND) {
throw new IllegalArgumentException("Character " + chars[index - 1] + " at position " + (index - 1) + " is not a valid hexadecimal character");
}
- decoded[i] = (byte) ((id1 << BITS_IN_HALF_BYTE) | id2);
+ decoded[i] = (byte) (id1 << BITS_IN_HALF_BYTE | id2);
}
return decoded;
}
@@ -88,7 +88,7 @@ public class DefaultCryptor implements Cryptor {
final StringBuilder builder = new StringBuilder();
for (final byte b : bytes) {
- builder.append(HEX_CHARS[(b >> BITS_IN_HALF_BYTE) & MASK]);
+ builder.append(HEX_CHARS[b >> BITS_IN_HALF_BYTE & MASK]);
builder.append(HEX_CHARS[b & MASK]);
}
return builder.toString();
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/AgeFileFilterTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/AgeFileFilterTest.java
index 4ac93552..714eccbf 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/AgeFileFilterTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/filter/AgeFileFilterTest.java
@@ -44,9 +44,9 @@ public class AgeFileFilterTest extends BaseFilterTest {
private static final long NOW_MILLIS = System.currentTimeMillis();
- private static final long TWO_DAYS_AGO_MILLIS = NOW_MILLIS - (2 * DAY_MILLIS);
+ private static final long TWO_DAYS_AGO_MILLIS = NOW_MILLIS - 2 * DAY_MILLIS;
- private static final long TWO_DAYS_LATER_MILLIS = NOW_MILLIS + (2 * DAY_MILLIS);
+ private static final long TWO_DAYS_LATER_MILLIS = NOW_MILLIS + 2 * DAY_MILLIS;
private static File testDir;