This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new fe3f3e46 chore(mcp): fix formatting
fe3f3e46 is described below
commit fe3f3e46b3df535cd4563706bbaadaf3eb708a00
Author: Robert Munteanu <[email protected]>
AuthorDate: Thu Dec 11 17:48:39 2025 +0100
chore(mcp): fix formatting
---
.../mcp/server/impl/contribs/RepositoryPromptsRegistrar.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git
a/mcp-server/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
b/mcp-server/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
index 5d1b47cf..990de0df 100644
---
a/mcp-server/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
+++
b/mcp-server/src/main/java/org/apache/sling/mcp/server/impl/contribs/RepositoryPromptsRegistrar.java
@@ -102,7 +102,12 @@ public class RepositoryPromptsRegistrar {
}
}
},
- new Hashtable<>(Map.of(ResourceChangeListener.PATHS,
PROMPT_LIBS_DIR, ResourceChangeListener.CHANGES, new String[] {
ResourceChangeListener.CHANGE_ADDED, ResourceChangeListener.CHANGE_CHANGED,
ResourceChangeListener.CHANGE_REMOVED } )));
+ new Hashtable<>(Map.of(
+ ResourceChangeListener.PATHS, PROMPT_LIBS_DIR,
ResourceChangeListener.CHANGES, new String[] {
+ ResourceChangeListener.CHANGE_ADDED,
+ ResourceChangeListener.CHANGE_CHANGED,
+ ResourceChangeListener.CHANGE_REMOVED
+ })));
// TODO - use service user
try (ResourceResolver resolver =
rrf.getAdministrativeResourceResolver(null)) {
@@ -136,7 +141,7 @@ public class RepositoryPromptsRegistrar {
// remove prefix
String promptName = path.substring(PROMPT_LIBS_DIR.length() + 1); //
account for trailing slash
-
+
// remove optional /jcr:content node name
if (promptName.endsWith("/jcr:content")) {
promptName = promptName.substring(0, promptName.length() -
"/jcr:content".length());
@@ -159,7 +164,7 @@ public class RepositoryPromptsRegistrar {
try {
Resource promptResource = resolver.getResource(promptPath);
String encoding =
promptResource.getResourceMetadata().getCharacterEncoding();
- if ( encoding == null ) {
+ if (encoding == null) {
encoding = StandardCharsets.UTF_8.name();
}
try (InputStream stream =
promptResource.adaptTo(InputStream.class)) {