Skip to content

Commit

Permalink
Update to Snakeyaml 2.0
Browse files Browse the repository at this point in the history
This closes #660
  • Loading branch information
kwin committed Sep 27, 2023
1 parent 6a3ccd2 commit 4f3f320
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions accesscontroltool-bundle/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ org.apache.sling.commons.scheduler.*;resolution:=optional,\
org.apache.jackrabbit.oak.spi.security.principal;version="[1.5.0,3)",\
!jakarta.servlet*,\
*

# snakeyaml 2.0 uses multi version jars which are not supported: https://github.com/bndtools/bnd/issues/3514
-fixupmessages "Classes found in the wrong directory"; restrict:=error; is:=warning
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.osgi.service.cm.ConfigurationPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.constructor.AbstractConstruct;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.env.EnvScalarConstructor;
Expand All @@ -23,7 +24,7 @@
* Usually this is called with
* <a href="https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation">Felix Configadmin Interpolation Plugin</a>.
*
* @see <a href="https://bitbucket.org/asomov/snakeyaml/wiki/Variable%20substitution">Variable substitution</a>
* @see <a href="https://bitbucket.org/snakeyaml/snakeyaml/wiki/Variable%20substitution">Variable substitution</a>
*
*/
public class YamlConfigurationAdminPluginScalarConstructor extends Constructor {
Expand All @@ -37,6 +38,7 @@ public class YamlConfigurationAdminPluginScalarConstructor extends Constructor {
private final InstallationLogger installLog;

public YamlConfigurationAdminPluginScalarConstructor(InstallationLogger installLog, ConfigurationPlugin interpolationPlugin) {
super(new LoaderOptions());
this.yamlConstructors.put(TAG, new ConstructYamlConfigurationAdminPlugin());
this.interpolationPlugin = interpolationPlugin;
this.installLog = installLog;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.32</version>
<version>2.0</version>
</dependency>
<!-- due to https://bugs.openjdk.java.net/browse/JDK-8231581 OOTB JRE is not sufficient -->
<dependency>
Expand Down

0 comments on commit 4f3f320

Please sign in to comment.