Skip to content

Commit a4c529d

Browse files
committed
Remove unnecessary null test.
1 parent d995e73 commit a4c529d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main/java/htsjdk/variant/vcf/VCFCodec.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,10 @@ protected void reportDuplicateInfoKeyValue(final String duplicateKey, final Stri
105105
*/
106106
protected Map<String, Object> parseInfo(String infoField) {
107107
if ((infoField.indexOf(' ') != -1) && !version.isAtLeastAsRecentAs(VCFHeaderVersion.VCF4_3)) {
108-
generateException(
109-
String.format("Whitespace is not allowed in the INFO field in VCF version %s: %s",
110-
version == null ?
111-
"unknown" :
112-
version.getVersionString(),
113-
infoField)
114-
);
108+
generateException(String.format(
109+
"Whitespace is not allowed in the INFO field in VCF version %s: %s",
110+
version.getVersionString(),
111+
infoField));
115112
}
116113
return super.parseInfo(infoField);
117114
}

0 commit comments

Comments
 (0)