Arent-Jan Banck pushed to branch release/3.2 at cms-community / hippo-cms
Commits: df00582c by Arent-Jan Banck at 2018-03-14T11:29:36+01:00 CMS-11118 Manage beanutils version and use beanutils 1.9.3. In addition use json-lib 2.4 - - - - - 5 changed files: - api/pom.xml - api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java - engine/pom.xml - pom.xml - test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java Changes: ===================================== api/pom.xml ===================================== --- a/api/pom.xml +++ b/api/pom.xml @@ -104,6 +104,10 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + </dependency> + <dependency> <groupId>org.imgscalr</groupId> <artifactId>imgscalr-lib</artifactId> <version>${imgscalr-lib.version}</version> ===================================== api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java ===================================== --- a/api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java +++ b/api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com) + * Copyright 2010-2018 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,9 +33,9 @@ public class PluginConfigMapper implements Serializable { public static void populate(Object bean, IValueMap config) throws MappingException { try { - Map<String, Object> entries = BeanUtils.describe(bean); + Map<String, String> entries = BeanUtils.describe(bean); BeanUtilsBean bub = BeanUtilsBean.getInstance(); - for (Map.Entry<String, Object> entry : entries.entrySet()) { + for (Map.Entry<String, String> entry : entries.entrySet()) { if ("class".equals(entry.getKey())) { continue; } ===================================== engine/pom.xml ===================================== --- a/engine/pom.xml +++ b/engine/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright 2007-2015 Hippo B.V. (http://www.onehippo.com) + Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -65,7 +65,6 @@ <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> - <version>${commons-beanutils.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> ===================================== pom.xml ===================================== --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright 2007-2017 Hippo B.V. (http://www.onehippo.com) + Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -103,7 +103,7 @@ <!-- Project Dependencies --> <commons-codec.version>1.4</commons-codec.version> <commons-collections.version>3.2.2</commons-collections.version> - <commons-beanutils.version>1.7.0</commons-beanutils.version> + <commons-beanutils.version>1.9.3</commons-beanutils.version> <commons-lang.version>2.6</commons-lang.version> <commons-io.version>1.4</commons-io.version> <commons-proxy.version>1.0</commons-proxy.version> @@ -119,7 +119,7 @@ <httpclient.version>4.2.2</httpclient.version> <joda-time.version>2.0</joda-time.version> - <json-lib.version>2.2.2</json-lib.version> + <json-lib.version>2.4</json-lib.version> <drewnoakes-extractor.version>2.6.2</drewnoakes-extractor.version> <sanselan.version>0.97-incubator</sanselan.version> @@ -351,6 +351,11 @@ <version>${commons-lang.version}</version> </dependency> <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>${commons-beanutils.version}</version> + </dependency> + <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>${mockito.version}</version> ===================================== test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java ===================================== --- a/test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java +++ b/test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com) + * Copyright 2009-2018 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ import org.junit.Test; import junit.framework.TestCase; import net.sf.json.JSONArray; +import net.sf.json.JSONNull; import net.sf.json.JSONObject; import net.sf.json.JsonConfig; @@ -138,7 +139,7 @@ public class TestSettings extends TestCase { JsonConfig jsonConfig = new JsonConfig(); jsonConfig.registerJsonValueProcessor(YuiId.class, new YuiIdProcessor()); JSONObject wfObject = JSONObject.fromObject(wfSettings, jsonConfig); - assertTrue(((JSONObject) wfObject.get("rootId")).isNullObject()); + assertEquals(JSONNull.getInstance(), wfObject.get("rootId")); JSONArray units = wfObject.getJSONArray("units"); Map<String, JSONObject> unitMap = new TreeMap<String, JSONObject>(); @@ -171,7 +172,7 @@ public class TestSettings extends TestCase { JsonConfig jsonConfig = new JsonConfig(); jsonConfig.registerJsonValueProcessor(YuiId.class, new YuiIdProcessor()); JSONObject wfObject = JSONObject.fromObject(wfSettings, jsonConfig); - assertTrue(((JSONObject) wfObject.get("rootId")).isNullObject()); + assertEquals(JSONNull.getInstance(), wfObject.get("rootId")); JSONArray units = wfObject.getJSONArray("units"); JSONObject centerObject = null; View it on GitLab: https://code.onehippo.org/cms-community/hippo-cms/commit/df00582c9a3e55950c79646765ea3d09a503f518 --- View it on GitLab: https://code.onehippo.org/cms-community/hippo-cms/commit/df00582c9a3e55950c79646765ea3d09a503f518 You're receiving this email because of your account on code.onehippo.org.
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn