Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-10-08 03:26:32 -0400
committerMichael Keppler2018-10-16 12:21:04 -0400
commit319c8ef33f07ec09b34585c3e970fa9d01269676 (patch)
tree8821e16152f83c3edeb09a7ebeca24508ad985f6
parentdc8a5caece10b9e914a9d9bc6597b0862fba5dd0 (diff)
downloadegit-github-319c8ef33f07ec09b34585c3e970fa9d01269676.tar.gz
egit-github-319c8ef33f07ec09b34585c3e970fa9d01269676.tar.xz
egit-github-319c8ef33f07ec09b34585c3e970fa9d01269676.zip
[findbugs] Don't use inefficient String constructor in unit test
The encoding utils do not manipulate the source byte array, so there is no need to explicitly invoke the String constructor to create a second instance of the same string. Change-Id: I4cfc08cceb83eede06fece681206d1d507b46104 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EncodingUtilsTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EncodingUtilsTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EncodingUtilsTest.java
index bf23d303..47e99ecc 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EncodingUtilsTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EncodingUtilsTest.java
@@ -43,7 +43,7 @@ public class EncodingUtilsTest {
assertNotNull(encoded);
assertFalse(encoded.length() == 0);
assertFalse(test.equals(encoded));
- byte[] decoded = EncodingUtils.fromBase64(new String(encoded));
+ byte[] decoded = EncodingUtils.fromBase64(encoded);
assertNotNull(decoded);
assertFalse(decoded.length == 0);
assertEquals(test, new String(decoded));

Back to the top