|
From: Dave B. <bla...@us...> - 2012-05-31 14:58:17
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cim
In directory vz-cvs-3.sog:/tmp/cvs-serv25607/src/org/sblim/cimclient/internal/cim
Modified Files:
DTStringReader.java
Log Message:
3526675 - Unit test fails on Java 7
Index: DTStringReader.java
===================================================================
RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cim/DTStringReader.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- DTStringReader.java 28 Apr 2009 19:42:45 -0000 1.7
+++ DTStringReader.java 31 May 2012 14:58:14 -0000 1.8
@@ -1,5 +1,5 @@
/**
- * (C) Copyright IBM Corp. 2006, 2009
+ * (C) Copyright IBM Corp. 2006, 2012
*
* THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
* ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
@@ -17,6 +17,7 @@
* 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL
* 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1)
* 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors
+ * 3526675 2012-05-14 blaschke-oss Unit test fails on Java 7
*/
package org.sblim.cimclient.internal.cim;
@@ -98,6 +99,9 @@
}
if (res < 0) throw new IllegalArgumentException("Negative value is not allowed for "
+ pFieldName + " in " + this.iDateTimeStr + "!");
+ // Java 7 parseInt began allowing plus sign
+ if (field.indexOf('+') != -1) throw new IllegalArgumentException(
+ "Plus sign is not allowed for " + pFieldName + " in " + this.iDateTimeStr + "!");
return res;
}
|