diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2020-02-27 20:27:31 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2020-02-27 20:27:31 +0900 |
commit | 5a6b6eee35f07615f5d496781ee37f8ffe56b7d3 (patch) | |
tree | b45fc5270a414f8096d974c6cd15f48304fa97fa /org.eclipse.jgit.ssh.apache | |
parent | abb461533fccfd59117c3415cf9c0ed06e460473 (diff) | |
download | jgit-5a6b6eee35f07615f5d496781ee37f8ffe56b7d3.tar.gz jgit-5a6b6eee35f07615f5d496781ee37f8ffe56b7d3.zip |
Move array designators from the variable to the type
As reported by Sonar Lint:
Array designators should always be located on the type for better code
readability. Otherwise, developers must look both at the type and the
variable name to know whether or not a variable is an array.
Change-Id: If6b41fed3483d0992d402d8680552ab4bef89ffb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache')
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java index a1ec31883d..9673ff0fbf 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java @@ -121,7 +121,7 @@ public class CachingKeyPairProvider extends FileKeyPairProvider if (cache == null) { return loadKey(session, resource, path, getPasswordFinder()); } - Throwable t[] = { null }; + Throwable[] t = { null }; KeyPair key = cache.get(path, p -> { try { return loadKey(session, resource, p, getPasswordFinder()); diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java index 02771b501c..af8bf47009 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java @@ -249,7 +249,7 @@ public final class HttpParser { start = nextStart + 1; } else { if (header.charAt(nextStart) == '"') { - int nextEnd[] = { nextStart + 1 }; + int[] nextEnd = { nextStart + 1 }; String value = scanQuotedString(header, nextStart + 1, nextEnd); challenge.addArgument(header.substring(start, end), value); |