From 9313e445bdc6e0232c2a519e79193d728a66be4f Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Mon, 1 Jul 2024 11:47:00 +0200 Subject: [PATCH] #217 refactor sonar issues --- .../main/java/com/github/thmarx/cms/filesystem/MetaData.java | 4 ++-- .../thmarx/cms/filesystem/metadata/memory/MemoryMetaData.java | 4 ++-- .../thmarx/cms/filesystem/metadata/memory/MemoryQuery.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/MetaData.java b/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/MetaData.java index 1ca54790..664a094c 100644 --- a/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/MetaData.java +++ b/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/MetaData.java @@ -60,6 +60,6 @@ public enum Type { Map getTree(); - ContentQuery query(final BiFunction nodeMapper); - ContentQuery query(final String startURI, final BiFunction nodeMapper); + ContentQuery query(final BiFunction nodeMapper); + ContentQuery query(final String startURI, final BiFunction nodeMapper); } diff --git a/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryMetaData.java b/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryMetaData.java index f08501ee..da2e82ec 100644 --- a/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryMetaData.java +++ b/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryMetaData.java @@ -84,7 +84,7 @@ public void close() throws IOException { @Override public ContentQuery query(final BiFunction nodeMapper) { - return new MemoryQuery(new ArrayList<>(nodes.values()), nodeMapper); + return new MemoryQuery(new ArrayList<>(nodes.values()), nodeMapper); } @Override @@ -99,7 +99,7 @@ public ContentQuery query(final String startURI, final BiFunction node.uri().startsWith(uri)).toList(); - return new MemoryQuery(filtered, nodeMapper); + return new MemoryQuery(filtered, nodeMapper); } diff --git a/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryQuery.java b/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryQuery.java index 72c1525e..fe4043e2 100644 --- a/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryQuery.java +++ b/cms-filesystem/src/main/java/com/github/thmarx/cms/filesystem/metadata/memory/MemoryQuery.java @@ -43,7 +43,7 @@ * @author t.marx * @param */ -public class MemoryQuery extends ExtendableQuery { +public class MemoryQuery extends ExtendableQuery { private QueryContext context; @@ -191,7 +191,7 @@ public Map> groupby(final String field) { return QueryUtil.groupby(context.getNodes(), field); } - public static record Sort(String field, QueryContext context) implements ContentQuery.Sort { + public static record Sort(String field, QueryContext context) implements ContentQuery.Sort { public MemoryQuery asc() { return new MemoryQuery(sorted(context, field, true));