Author: anil.saldhana(a)jboss.com
Date: 2011-05-03 22:56:58 -0400 (Tue, 03 May 2011)
New Revision: 926
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/SystemPropertyAsStringUnitTestCase.java
Log:
fix stringutil sys prop
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java 2011-05-04
02:15:33 UTC (rev 925)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StringUtil.java 2011-05-04
02:56:58 UTC (rev 926)
@@ -104,6 +104,7 @@
{
int index = subString.indexOf("::");
defaultValue = subString.substring(index + 2);
+ subString = subString.substring(0, index);
}
sysPropertyValue = SecurityActions.getSystemProperty(subString,
defaultValue);
if (sysPropertyValue.isEmpty())
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/SystemPropertyAsStringUnitTestCase.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/SystemPropertyAsStringUnitTestCase.java 2011-05-04
02:15:33 UTC (rev 925)
+++
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/SystemPropertyAsStringUnitTestCase.java 2011-05-04
02:56:58 UTC (rev 926)
@@ -62,6 +62,8 @@
assertEquals("test",
StringUtil.getSystemPropertyAsString("test"));
assertEquals("test/test",
StringUtil.getSystemPropertyAsString("test/test"));
+ assertEquals("anil",
StringUtil.getSystemPropertyAsString("${test::something}"));
+
assertEquals("anil",
StringUtil.getSystemPropertyAsString("${test}"));
assertEquals("test/anil",
StringUtil.getSystemPropertyAsString("test/${test}"));
Show replies by date