jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1349460 - /jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java
Date Tue, 12 Jun 2012 17:59:54 GMT
Author: andy
Date: Tue Jun 12 17:59:54 2012
New Revision: 1349460

URL: http://svn.apache.org/viewvc?rev=1349460&view=rev
Log:
JENA-254 - coudl print decimals with leading dot.

Modified:
    jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java

Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java?rev=1349460&r1=1349459&r2=1349460&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java Tue Jun
12 17:59:54 2012
@@ -564,7 +564,8 @@ public class N3JenaWriterCommon implemen
             if ( datatype.equals(XSD.decimal.getURI()) )
             {
                 // Must have ., can't have e or E
-                if ( s.indexOf('.') >= 0 &&
+                // "." can't be first character, hence "> 0"
+                if ( s.indexOf('.') > 0 &&
                      s.indexOf('e') == -1 && s.indexOf('E') == -1 )
                 {
                     // See if parsable.



Mime
View raw message