From d5605dc9e0cd310aca854397cf22c9b2a3083dc9 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Wed, 22 Mar 2023 16:49:58 +0100 Subject: [PATCH] improve performance of regexp --- .../validation/spi/impl/OsgiConfigurationParserValidator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/OsgiConfigurationParserValidator.java b/vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/OsgiConfigurationParserValidator.java index e70cad96..99306c4f 100644 --- a/vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/OsgiConfigurationParserValidator.java +++ b/vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/OsgiConfigurationParserValidator.java @@ -63,8 +63,8 @@ public class OsgiConfigurationParserValidator implements DocumentViewXmlValidato private static final String SLING_OSGI_CONFIG_NODETYPE = "sling:OsgiConfig"; - private static final String OSGI_CONFIG_NODE_PATH = "/(?:[^/]*/){0,4}?config(?:\\..*)?/.*"; - + private static final String OSGI_CONFIG_NODE_PATH = "/(?:[^/]*/){0,4}?config(?:\\.[^/]*)?/.*"; + private static final Pattern OSGI_CONFIG_NODE_PATH_PATTERN = Pattern.compile(OSGI_CONFIG_NODE_PATH); /**