summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.apache.agent/src
diff options
context:
space:
mode:
authorFabio Ponciroli <ponch78@gmail.com>2022-03-03 17:27:25 +0100
committerFabio Ponciroli <ponch78@gmail.com>2022-03-17 16:03:16 -0500
commita820ff0896efae688352ea6a972aba5092f4e5ce (patch)
tree34f982795ac27db90ca110160d7ff198fe200094 /org.eclipse.jgit.ssh.apache.agent/src
parent2d9ed3cf2aa01491e43d5108bda5dc494b53e1f8 (diff)
downloadjgit-a820ff0896efae688352ea6a972aba5092f4e5ce.tar.gz
jgit-a820ff0896efae688352ea6a972aba5092f4e5ce.zip
WinPipeConnector: Resolve warnings by using "equals" instead of "=="
Errorprone raises the following warning: "[ReferenceEquality] Comparison using reference equality instead of value equality". Change-Id: Ic73305b2af628f66e7659ea1b839b3a640e3cd8d
Diffstat (limited to 'org.eclipse.jgit.ssh.apache.agent/src')
-rw-r--r--org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/WinPipeConnector.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/WinPipeConnector.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/WinPipeConnector.java
index 7bad90f24f..81c653722f 100644
--- a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/WinPipeConnector.java
+++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/WinPipeConnector.java
@@ -90,7 +90,7 @@ public class WinPipeConnector extends AbstractConnector {
file = libs.kernel.CreateFile(pipeName,
WinNT.GENERIC_READ | WinNT.GENERIC_WRITE, FILE_SHARE_NONE,
null, WinNT.OPEN_EXISTING, FILE_ATTRIBUTE_NONE, null);
- if (file == null || file == WinBase.INVALID_HANDLE_VALUE) {
+ if (file == null || WinBase.INVALID_HANDLE_VALUE.equals(file)) {
int errorCode = libs.kernel.GetLastError();
if (errorCode == WinError.ERROR_FILE_NOT_FOUND
&& CANONICAL_PIPE_NAME.equalsIgnoreCase(pipeName)) {