aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2019-06-12 09:50:38 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-06-15 21:55:39 +0200
commit96bd5ad8a35862b8e3d0bd5352c928057ced1ebd (patch)
tree9933cd5208b880cc408b649e83db7dff54e4d278 /org.eclipse.jgit
parent4fe4b0a6bfaa007e381644938f7bbe07c8b843db (diff)
downloadjgit-96bd5ad8a35862b8e3d0bd5352c928057ced1ebd.tar.gz
jgit-96bd5ad8a35862b8e3d0bd5352c928057ced1ebd.zip
Config: Handle reference-equality warning (and empty javadoc)
Reported by downstream analyzers. Suppress the warning on reference equality for isMissing and fill an empty javadoc field. Change-Id: I3494423daf2a53ca10e0a9c66553f00204c35396 Signed-off-by: Ivan Frade <ifrade@google.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index 1032fd0df1..71f863589d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -131,10 +131,11 @@ public class Config {
/**
* Check if a given string is the "missing" value.
*
- * @param value
+ * @param value string to be checked.
* @return true if the given string is the "missing" value.
* @since 5.4
*/
+ @SuppressWarnings({ "ReferenceEquality", "StringEquality" })
public static boolean isMissing(String value) {
return value == MISSING_ENTRY;
}
@@ -1052,7 +1053,7 @@ public class Config {
if (e.prefix == null || "".equals(e.prefix)) //$NON-NLS-1$
out.append('\t');
out.append(e.name);
- if (MISSING_ENTRY != e.value) {
+ if (!isMissing(e.value)) {
out.append(" ="); //$NON-NLS-1$
if (e.value != null) {
out.append(' ');