Skip to content

Commit fe16cce

Browse files
committed
CWMSVUE-600 Moved rating id query to happen before opening new connection for catRatings call
1 parent 59f2ab9 commit fe16cce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cwms-data-api/src/main/java/cwms/cda/data/dao/RatingSpecDao.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,9 @@ public void create(String xml, boolean failIfExists) {
431431
* NOTE: This makes a separate query to get the list of non-aliased spec ids for the officeIdMask, so that aliased specs can be skipped.
432432
*/
433433
public RatingEffectiveDatesMap retrieveSpecEffectiveDates(String officeIdMask, String specIdMask, Instant begin, Instant end) {
434+
//set of non-alias spec ids used to filter out aliased specs
435+
Set<String> ratingIdsNoAliases = getRatingIds(officeIdMask, "*", false);
434436
return connectionResult(dsl, conn -> {
435-
//set of non-alias spec ids used to filter out aliased specs
436-
Set<String> ratingIdsNoAliases = getRatingIds(officeIdMask, "*", false);
437437
//office->spec->dates
438438
NavigableMap<String, NavigableMap<String, NavigableSet<Instant>>> specDateMap = new TreeMap<>();
439439
ResultSet rs = catRatings(conn, officeIdMask, specIdMask, begin, end);

0 commit comments

Comments
 (0)