Bug in CRDParser's COMMENTS
For CRD file, “Comment lines can occur anywhere within a file.”
So in class CRDParser
:
(1) COMMENTS can be followed by COMMENTS and any other records;
(2) Any other records can be followed by COMMENTS record.
Here is a test file. lageos1-test.npt
The following is the changes of COMMENTS("00")
, and COMMENTS
should be added to any other records.
/** Comments. */
COMMENTS("00") {
/** {@inheritDoc} */
@Override
public void parse(final String line, final ParseInfo pi) {
// Comment
final String comment = line.split(getFirstIdentifier())[1].trim();
pi.file.getComments().add(comment);
}
/** {@inheritDoc} */
@Override
public Stream<LineParser> allowedNext() {
return Stream.of(H1, H2, H3, H4, H5, H8, C0, C1, C2, C3, C4, C5, C6, C7, TEN, ELEVEN, TWELVE, METEO,
METEO_SUPP, ANGLES, CALIB, CALIB_DETAILS, CALIB_SHOT, STAT, COMPATIBILITY, COMMENTS);
}
},