Fix testsuite with Sybase

This commit is contained in:
mposolda 2016-01-29 13:30:38 +01:00
parent 41551e08b0
commit f2082d5e24
2 changed files with 10 additions and 10 deletions

View file

@ -5,41 +5,41 @@
<!-- This is needed for MSSQL :( --> <!-- This is needed for MSSQL :( -->
<!-- 1.5 --> <!-- 1.5 -->
<update tableName="REALM"> <update tableName="REALM">
<column name="OTP_POLICY_COUNTER" type="INT" value="0" /> <column name="OTP_POLICY_COUNTER" type="INT" valueNumeric="0" />
<where>OTP_POLICY_COUNTER is NULL</where> <where>OTP_POLICY_COUNTER is NULL</where>
</update> </update>
<update tableName="REALM"> <update tableName="REALM">
<column name="OTP_POLICY_WINDOW" type="INT" value="1" /> <column name="OTP_POLICY_WINDOW" type="INT" valueNumeric="1" />
<where>OTP_POLICY_WINDOW is NULL</where> <where>OTP_POLICY_WINDOW is NULL</where>
</update> </update>
<update tableName="REALM"> <update tableName="REALM">
<column name="OTP_POLICY_PERIOD" type="INT" value="30" /> <column name="OTP_POLICY_PERIOD" type="INT" valueNumeric="30" />
<where>OTP_POLICY_PERIOD is NULL</where> <where>OTP_POLICY_PERIOD is NULL</where>
</update> </update>
<update tableName="REALM"> <update tableName="REALM">
<column name="OTP_POLICY_DIGITS" type="INT" value="6" /> <column name="OTP_POLICY_DIGITS" type="INT" valueNumeric="6" />
<where>OTP_POLICY_DIGITS is NULL</where> <where>OTP_POLICY_DIGITS is NULL</where>
</update> </update>
<update tableName="CREDENTIAL"> <update tableName="CREDENTIAL">
<column name="COUNTER" type="INT" value="0" /> <column name="COUNTER" type="INT" valueNumeric="0" />
<where>COUNTER is NULL</where> <where>COUNTER is NULL</where>
</update> </update>
<update tableName="CREDENTIAL"> <update tableName="CREDENTIAL">
<column name="DIGITS" type="INT" value="6" /> <column name="DIGITS" type="INT" valueNumeric="6" />
<where>DIGITS is NULL</where> <where>DIGITS is NULL</where>
</update> </update>
<update tableName="CREDENTIAL"> <update tableName="CREDENTIAL">
<column name="PERIOD" type="INT" value="30" /> <column name="PERIOD" type="INT" valueNumeric="30" />
<where>PERIOD is NULL</where> <where>PERIOD is NULL</where>
</update> </update>
<!-- 1.6 --> <!-- 1.6 -->
<update tableName="REALM"> <update tableName="REALM">
<column name="OFFLINE_SESSION_IDLE_TIMEOUT" type="INT" value="2592000" /> <column name="OFFLINE_SESSION_IDLE_TIMEOUT" type="INT" valueNumeric="2592000" />
<where>OFFLINE_SESSION_IDLE_TIMEOUT is NULL</where> <where>OFFLINE_SESSION_IDLE_TIMEOUT is NULL</where>
</update> </update>
<!-- 1.7 --> <!-- 1.7 -->
<update tableName="REALM"> <update tableName="REALM">
<column name="ACCESS_TOKEN_LIFE_IMPLICIT" type="INT" value="900" /> <column name="ACCESS_TOKEN_LIFE_IMPLICIT" type="INT" valueNumeric="900" />
<where>ACCESS_TOKEN_LIFE_IMPLICIT is NULL</where> <where>ACCESS_TOKEN_LIFE_IMPLICIT is NULL</where>
</update> </update>

View file

@ -32,7 +32,7 @@ public class PasswordPolicy implements Serializable {
this.policyString = policyString; this.policyString = policyString;
this.policies = new LinkedList<>(); this.policies = new LinkedList<>();
if (policyString != null && !policyString.isEmpty()) { if (policyString != null && !policyString.trim().isEmpty()) {
for (String policy : policyString.split(" and ")) { for (String policy : policyString.split(" and ")) {
policy = policy.trim(); policy = policy.trim();