You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2022/09/17 14:24:29 UTC
[sling-whiteboard] branch master updated: Fix md resource decorator
This is an automated email from the ASF dual-hosted git repository.
cziegeler 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 10fdc980 Fix md resource decorator
10fdc980 is described below
commit 10fdc9802a1008d4a1af55b25115d9e3d6e4a430
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sat Sep 17 16:24:23 2022 +0200
Fix md resource decorator
---
mdresourcedecorator/pom.xml | 22 +++++++++++++---------
.../sling/mdresource/impl/ResourceUtils.java | 7 ++-----
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/mdresourcedecorator/pom.xml b/mdresourcedecorator/pom.xml
index bb6c87f6..e10b07c0 100644
--- a/mdresourcedecorator/pom.xml
+++ b/mdresourcedecorator/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling-bundle-parent</artifactId>
- <version>39</version>
+ <version>49</version>
<relativePath/>
</parent>
@@ -44,44 +44,48 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
+ <version>1.5.0</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.metatype.annotations</artifactId>
+ <version>1.4.1</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
- <version>2.22.0</version>
+ <version>2.27.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark</artifactId>
- <version>0.62.2</version>
- </dependency>
- <dependency>
- <groupId>com.vladsch.flexmark</groupId>
- <artifactId>flexmark-ext-yaml-front-matter</artifactId>
+ <artifactId>flexmark-osgi</artifactId>
<version>0.62.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <version>4.13.2</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>3.4.6</version>
+ <version>4.8.0</version>
<scope>test</scope>
</dependency>
diff --git a/mdresourcedecorator/src/main/java/org/apache/sling/mdresource/impl/ResourceUtils.java b/mdresourcedecorator/src/main/java/org/apache/sling/mdresource/impl/ResourceUtils.java
index 09e8d85c..5af73389 100644
--- a/mdresourcedecorator/src/main/java/org/apache/sling/mdresource/impl/ResourceUtils.java
+++ b/mdresourcedecorator/src/main/java/org/apache/sling/mdresource/impl/ResourceUtils.java
@@ -26,14 +26,12 @@ import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
-import java.util.Optional;
-import java.util.concurrent.Future;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ValueMap;
-import org.apache.sling.api.wrappers.CompositeValueMap;
import org.apache.sling.api.wrappers.ValueMapDecorator;
+import org.apache.sling.api.wrappers.ValueMapUtil;
import org.apache.sling.mdresource.impl.ResourceConfiguration.SourceType;
import org.apache.sling.mdresource.impl.md.MarkdownProcessor;
import org.apache.sling.mdresource.impl.md.ProcessingInstructions;
@@ -112,7 +110,6 @@ public class ResourceUtils {
if ( origProps == null ) {
return new ValueMapDecorator(props);
}
- Future<V>
- return new CompositeValueMap(new ValueMapDecorator(props), origProps);
+ return ValueMapUtil.merge(new ValueMapDecorator(props), origProps);
}
}