[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Sat Jun 9 18:14:33 UTC 2007
gordonp
Sat Jun 9 14:14:33 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv4871/src/main/org/biomoby/shared/data
Modified Files:
MobyDataBoolean.java MobyDataDateTime.java MobyDataFloat.java
MobyDataInt.java
Log Message:
Added trim() calls to make primitives' parsing more robust
moby-live/Java/src/main/org/biomoby/shared/data MobyDataBoolean.java,1.4,1.5 MobyDataDateTime.java,1.9,1.10 MobyDataFloat.java,1.7,1.8 MobyDataInt.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.java 2007/06/07 23:58:15 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataBoolean.java 2007/06/09 18:14:33 1.5
@@ -62,11 +62,11 @@
* "Yes" and "1" are not acceptable.
*/
public MobyDataBoolean(String articleName, String booleanString){
- this(articleName, Boolean.valueOf(booleanString), null);
+ this(articleName, Boolean.valueOf(booleanString.trim()), null);
}
public MobyDataBoolean(String articleName, String booleanString, Registry registry){
- this(articleName, Boolean.valueOf(booleanString), registry);
+ this(articleName, Boolean.valueOf(booleanString.trim()), registry);
}
public MobyDataBoolean(Boolean b){
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataDateTime.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataDateTime.java 2007/06/07 23:58:15 1.9
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataDateTime.java 2007/06/09 18:14:33 1.10
@@ -55,7 +55,7 @@
public MobyDataDateTime(String articleName, String stringISO8601, Registry registry) throws IllegalArgumentException{
super(articleName);
setDataType(MobyDataType.getDataType(MobyTags.MOBYDATETIME, registry));
- value = parseISO8601(stringISO8601);
+ value = parseISO8601(stringISO8601.trim());
}
public MobyDataDateTime(String stringISO8601){
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataFloat.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataFloat.java 2007/06/07 23:58:15 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataFloat.java 2007/06/09 18:14:33 1.8
@@ -102,7 +102,7 @@
public MobyDataFloat(String articleName, String stringNumber, Registry registry) throws NumberFormatException{
super(articleName);
setDataType(MobyDataType.getDataType(MobyTags.MOBYFLOAT, registry));
- value = new BigDecimal(stringNumber);
+ value = new BigDecimal(stringNumber.trim());
}
public MobyDataFloat(String stringNumber){
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataInt.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataInt.java 2007/06/07 23:58:15 1.6
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataInt.java 2007/06/09 18:14:33 1.7
@@ -97,7 +97,7 @@
public MobyDataInt(String articleName, String stringNumber, Registry registry) throws NumberFormatException{
super(articleName);
setDataType(MobyDataType.getDataType(MobyTags.MOBYINTEGER, registry));
- value = new BigInteger(stringNumber);
+ value = new BigInteger(stringNumber.trim());
}
/**
More information about the MOBY-guts
mailing list