Changeset 36001
- Timestamp:
- 2022-01-14T10:14:57+13:00 (2 years ago)
- Location:
- main/trunk/greenstone3/src/java/org/greenstone/gsdl3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java
r35897 r36001 650 650 GSXML.addParameter2ToList(xslt_params, "interface_name", (String) config_params.get(GSConstants.INTERFACE_NAME)); 651 651 GSXML.addParameter2ToList(xslt_params, "site_name", (String) config_params.get(GSConstants.SITE_NAME)); 652 GSXML.addParameter2ToList(xslt_params, "cookie_consent", (String) config_params.get(GSConstants.COOKIE_CONSENT)); 652 653 Boolean useClientXSLT = (Boolean) config_params.get(GSConstants.USE_CLIENT_SIDE_XSLT); 653 654 GSXML.addParameter2ToList(xslt_params, "use_client_side_xslt", useClientXSLT.toString()); -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSConstants.java
r34112 r36001 45 45 public static final String UTF8="UTF-8"; 46 46 // The default encoding Greenstone expects when reading in its XML files 47 public static final String XML_FILE_ENCODING=UTF8; 47 public static final String XML_FILE_ENCODING = UTF8; 48 49 /** 50 * Gets the name of the cookie consent servlet parameter. 51 */ 52 public static final String COOKIE_CONSENT = "cookie_consent"; 48 53 } -
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
r35998 r36001 17 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 18 */ 19 20 /** 21 * Note (cstephen): 22 * Use of org.apache.commons.lang3.StringUtils can likely be removed when compiling 23 * for Java 1.13+, due to performance improvements in the standard library. 24 * https://stackoverflow.com/questions/16228992/commons-lang-stringutils-replace-performance-vs-string-replace 25 */ 26 19 27 package org.greenstone.gsdl3.util; 20 28 … … 882 890 if (key.startsWith(prefix)) 883 891 { 884 int lastDotIndex = key.lastIndexOf(".");892 int lastDotIndex = StringUtils.lastIndexOf(key, '.'); 885 893 // If this is true, the key is nested under nodes that we might have to construct 886 894 if (lastDotIndex > 0) { … … 890 898 buildJSObjectGraph( 891 899 outputStr, 892 prependToPrefix + "." + key.substring(0, lastDotIndex), // Strip the actual key from the path900 prependToPrefix + "." + StringUtils.substring(key, 0, lastDotIndex), // Strip the actual key from the path 893 901 initialisedNodes 894 902 ); … … 943 951 } 944 952 945 String[] nodes = objectGraph.split("\\.");953 String[] nodes = StringUtils.split(objectGraph, '.'); 946 954 947 955 if (!preBuiltNodes.contains(nodes[0])) {
Note:
See TracChangeset
for help on using the changeset viewer.