From f4be1c757902e442bb3e22525700f488ba9a3673 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Mon, 4 Nov 2024 18:50:54 +0000 Subject: [PATCH] feat: create and fix filter Signed-off-by: Otavio Santana --- .github/workflows/java-17.yml | 2 +- .github/workflows/java-21.yml | 2 +- .../eclipse/jnosql/mapping/reflection/RepositoryFilter.java | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/java-17.yml b/.github/workflows/java-17.yml index db22f58a9..b9ba65dda 100644 --- a/.github/workflows/java-17.yml +++ b/.github/workflows/java-17.yml @@ -30,4 +30,4 @@ jobs: restore-keys: | ${{ runner.os }}-maven - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -B install --file pom.xml diff --git a/.github/workflows/java-21.yml b/.github/workflows/java-21.yml index 321da4bc9..cf8dbc7bf 100644 --- a/.github/workflows/java-21.yml +++ b/.github/workflows/java-21.yml @@ -30,4 +30,4 @@ jobs: restore-keys: | ${{ runner.os }}-maven - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -B install --file pom.xml diff --git a/jnosql-mapping/jnosql-mapping-reflection/src/main/java/org/eclipse/jnosql/mapping/reflection/RepositoryFilter.java b/jnosql-mapping/jnosql-mapping-reflection/src/main/java/org/eclipse/jnosql/mapping/reflection/RepositoryFilter.java index 9332f3bcc..5f3852df3 100644 --- a/jnosql-mapping/jnosql-mapping-reflection/src/main/java/org/eclipse/jnosql/mapping/reflection/RepositoryFilter.java +++ b/jnosql-mapping/jnosql-mapping-reflection/src/main/java/org/eclipse/jnosql/mapping/reflection/RepositoryFilter.java @@ -50,7 +50,7 @@ public boolean test(Class type) { */ public boolean isSupported(Class type) { Optional provider = getProvider(type); - return provider.map(p -> p.equals(Repository.ANY_PROVIDER) || p.equalsIgnoreCase(PROVIDER)) + return provider.map(p -> Repository.ANY_PROVIDER.equals(p) || PROVIDER.equalsIgnoreCase(p)) .isPresent(); } @@ -93,6 +93,4 @@ private Optional> getEntity(Class repository) { return Optional.empty(); } - - }