diff options
author | Michael Keppler | 2018-10-08 07:26:32 +0000 |
---|---|---|
committer | Michael Keppler | 2018-10-16 16:21:04 +0000 |
commit | 319c8ef33f07ec09b34585c3e970fa9d01269676 (patch) | |
tree | 8821e16152f83c3edeb09a7ebeca24508ad985f6 /org.eclipse.egit.github.core.tests/src/org/eclipse/egit | |
parent | dc8a5caece10b9e914a9d9bc6597b0862fba5dd0 (diff) | |
download | egit-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>
Diffstat (limited to 'org.eclipse.egit.github.core.tests/src/org/eclipse/egit')
-rw-r--r-- | org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/EncodingUtilsTest.java | 2 |
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)); |