Skip to content

Commit f800d56

Browse files
authored
Merge pull request #1525 from Caltech-IPAC/wise-hotfix
Wise hotfix allow null ObsDate string
2 parents 8996fe9 + a569654 commit f800d56

File tree

1 file changed

+2
-1
lines changed
  • src/firefly/java/edu/caltech/ipac/firefly/server/query/mos

1 file changed

+2
-1
lines changed

src/firefly/java/edu/caltech/ipac/firefly/server/query/mos/QueryMOS.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,12 @@ private URL createURL(MOSRequest req, boolean forGator) throws EndUserException,
187187
return new URL(url);
188188
}
189189

190+
//Using catch Exception including the empty ObsDate
190191
private static String getObsDate(String obsDateParam) {
191192
try {
192193
DateUtils.parseDate(obsDateParam, new String[]{"yyyy-MM-dd", "yyyy-MM-dd hh:mm:ss", "yyyy-MM-dd'T'hh:mm:ssX"}); // check for valid dates
193194
return obsDateParam.replaceAll("[^0-9:-]", " ").trim(); // convert to format expected by MOST
194-
} catch (ParseException e) {
195+
} catch (Exception e) {
195196
return null;
196197
}
197198
}

0 commit comments

Comments
 (0)