Skip to content

Commit

Permalink
Remove unnecessary null test.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad committed Jun 5, 2023
1 parent d995e73 commit a4c529d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/htsjdk/variant/vcf/VCFCodec.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,10 @@ protected void reportDuplicateInfoKeyValue(final String duplicateKey, final Stri
*/
protected Map<String, Object> parseInfo(String infoField) {
if ((infoField.indexOf(' ') != -1) && !version.isAtLeastAsRecentAs(VCFHeaderVersion.VCF4_3)) {
generateException(
String.format("Whitespace is not allowed in the INFO field in VCF version %s: %s",
version == null ?
"unknown" :
version.getVersionString(),
infoField)
);
generateException(String.format(
"Whitespace is not allowed in the INFO field in VCF version %s: %s",
version.getVersionString(),
infoField));
}
return super.parseInfo(infoField);
}
Expand Down

0 comments on commit a4c529d

Please sign in to comment.