Skip to content

Commit a508c7b

Browse files
committed
moved the wildcard argument to the code
1 parent 78183cf commit a508c7b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

core/src/main/java/org/sterl/spring/persistent_tasks/history/HistoryService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public Page<TriggerHistoryLastStateEntity> findTriggerState(
102102
if (key == null && status == null) {
103103
return triggerHistoryLastStateRepository.findAll(page);
104104
}
105-
final var id = key == null ? null : key.getId();
105+
var id = key == null ? null : key.getId();
106+
if (id != null) id = id += "%";
106107
final var name = key == null ? null : key.getTaskName();
107108
return triggerHistoryLastStateRepository.findAll(id, name, status, page);
108109
}

core/src/main/java/org/sterl/spring/persistent_tasks/shared/repository/TriggerDataRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
public interface TriggerDataRepository<T extends HasTriggerData> extends JpaRepository<T, Long> {
1919
@Query("""
2020
SELECT e FROM #{#entityName} e
21-
WHERE (e.data.key.id LIKE :id% OR :id IS NULL)
21+
WHERE (e.data.key.id LIKE :id OR :id IS NULL)
2222
AND (e.data.key.taskName = :taskName OR :taskName IS NULL)
2323
AND (e.data.status = :status OR :status IS NULL)
2424
""")

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@
150150
<target>${java.version}</target>
151151
<encoding>${project.reporting.outputEncoding}</encoding>
152152
<compilerArgs>
153+
<arg>-parameters</arg>
153154
<arg>-Xlint:all</arg>
154155
<arg>-Xlint:-options</arg>
155156
<arg>-Xlint:-path</arg>
156-
<arg>-parameters</arg>
157157
</compilerArgs>
158158
</configuration>
159159
</plugin>

0 commit comments

Comments
 (0)