Skip to content

Commit 382e995

Browse files
Fix deprecated API usage (#267)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Rashidi Zin <rashidi@zin.my>
1 parent 5217be7 commit 382e995

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/gradle-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- '**/*.gradle.kts'
4343
- '**/gradle-build.yml'
4444
- 'gradle.properties'
45+
- '**/*.java'
4546
4647
gradle-build:
4748
name: Build project with Gradle
@@ -79,7 +80,7 @@ jobs:
7980
- name: Run CI build
8081
env:
8182
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82-
run: ./gradlew build jacocoTestReport --configuration-cache
83+
run: ./gradlew check --configuration-cache
8384
- name: Publish Sonar report
8485
env:
8586
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ out/
4040
**/gradle/
4141
### Antora ###
4242
build/site/
43+
44+
### Jules ###
45+
*.log

data-jpa-filtered-query/src/main/java/zin/rashidi/boot/data/jpa/jpa/JpaCustomBaseRepository.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package zin.rashidi.boot.data.jpa.jpa;
22

3-
import static org.springframework.data.jpa.domain.Specification.where;
43
import static zin.rashidi.boot.data.jpa.user.User.Status.ACTIVE;
54

65
import java.util.List;
@@ -24,7 +23,7 @@ public JpaCustomBaseRepository(JpaEntityInformation<T, ?> entityInformation, Ent
2423
@Override
2524
public List<T> findAll() {
2625
var hasStatusField = Stream.of(ReflectionUtils.getDeclaredMethods(getDomainClass())).anyMatch(field -> field.getName().equals("status"));
27-
return hasStatusField ? findAll(where((root, query, criteriaBuilder) -> root.get("status").in(ACTIVE))) : super.findAll();
26+
return hasStatusField ? findAll((root, query, criteriaBuilder) -> root.get("status").in(ACTIVE)) : super.findAll();
2827
}
2928

3029
}

data-mongodb-full-text-search/src/main/java/zin/rashidi/boot/data/mongodb/character/CharacterSearchRepositoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CharacterSearchRepositoryImpl implements CharacterSearchRepository {
2222
@Override
2323
public List<Character> findByText(String text, Sort sort) {
2424
operations.indexOps(Character.class)
25-
.ensureIndex(new TextIndexDefinitionBuilder().onFields("name", "publisher").build());
25+
.createIndex(new TextIndexDefinitionBuilder().onFields("name", "publisher").build());
2626

2727
var parameters = text.split(" ");
2828
var query = TextQuery.queryText(new TextCriteria().matchingAny(parameters)).with(sort);

0 commit comments

Comments
 (0)