Skip to content

Commit

Permalink
Change the to string method used for metadata attributes. There are s…
Browse files Browse the repository at this point in the history
…ome edge cases where toCSVString ends up providing empty string.
  • Loading branch information
ChrisJohnNOAA committed Nov 7, 2024
1 parent 1ad4f67 commit ae20e14
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16167,14 +16167,11 @@ private void addMetadata(Map<String, String> metadata, Attributes attributes, St
continue;
}
PrimitiveArray tValue = attributes.get(tName);
if (tValue == null || tValue.size() == 0 || tValue.toString().length() == 0) {
continue; // do nothing
}
if ("time_".equalsIgnoreCase(prefix)
&& Calendar2.SECONDS_SINCE_1970.equals(attributes.getString(tName))) {
metadata.put(prefix + tName, Calendar2.MILLISECONDS_SINCE_1970);
} else {
metadata.put(prefix + tName, tValue.toCSVString());
metadata.put(prefix + tName, tValue == null ? null : tValue.toString());
}
}
}
Expand Down

0 comments on commit ae20e14

Please sign in to comment.