Skip to content

Commit

Permalink
- fix static analyzer warning
Browse files Browse the repository at this point in the history
  • Loading branch information
derreisende77 committed Oct 26, 2024
1 parent 10e2ac7 commit 00bcd6f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ private TModelFilm performTableFiltering() {

//the complete lucene query...
Query finalQuery = qb.build();
logger.info("Executing Lucene query: {}", finalQuery.toString());
logger.info("Executing Lucene query: {}", finalQuery);

//SEARCH
final var searcher = new IndexSearcher(listeFilme.getReader());
final var docs = searcher.search(finalQuery, listeFilme.size());
final var hit_length = docs.scoreDocs.length;

Set<Integer> filmNrSet = new HashSet<>(hit_length);
Set<Integer> filmNrSet = HashSet.newHashSet(hit_length);

logger.trace("Hit size: {}", hit_length);
var watch2 = Stopwatch.createStarted();
Expand Down Expand Up @@ -220,13 +220,13 @@ private void addHighQualityOnlyQuery(@NotNull BooleanQuery.Builder qb) {

private Query createZeitraumQuery() throws ParseException {
var numDays = Integer.parseInt(filterActionPanel.zeitraumProperty().get());
var to_Date = LocalDateTime.now();
var from_Date = to_Date.minusDays(numDays);
var toDate = LocalDateTime.now();
var fromDate = toDate.minusDays(numDays);
var utcZone = ZoneId.of("UTC");
//[20190101 TO 20190801]
var toStr = DateTools.timeToString(to_Date.atZone(utcZone).toInstant().toEpochMilli(),
var toStr = DateTools.timeToString(toDate.atZone(utcZone).toInstant().toEpochMilli(),
DateTools.Resolution.DAY);
var fromStr = DateTools.timeToString(from_Date.atZone(utcZone).toInstant().toEpochMilli(),
var fromStr = DateTools.timeToString(fromDate.atZone(utcZone).toInstant().toEpochMilli(),
DateTools.Resolution.DAY);
String zeitraum = String.format("[%s TO %s]", fromStr, toStr);
return new QueryParser(LuceneIndexKeys.SENDE_DATUM, analyzer).parse(zeitraum);
Expand Down

0 comments on commit 00bcd6f

Please sign in to comment.