From 00bcd6fb40e69cf679ea3f487515340cbbdf5353 Mon Sep 17 00:00:00 2001 From: "Christian F." Date: Sat, 26 Oct 2024 14:00:52 +0200 Subject: [PATCH] - fix static analyzer warning --- .../tab_film/helpers/LuceneGuiFilmeModelHelper.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java b/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java index 350215388..eea4e14d0 100644 --- a/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java +++ b/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java @@ -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 filmNrSet = new HashSet<>(hit_length); + Set filmNrSet = HashSet.newHashSet(hit_length); logger.trace("Hit size: {}", hit_length); var watch2 = Stopwatch.createStarted(); @@ -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);