Mercurial Hosting > luan
changeset 255:e5ad26746c94
improve toString(Number)
git-svn-id: https://luan-java.googlecode.com/svn/trunk@256 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 27 Oct 2014 21:19:42 +0000 |
parents | e0fb8a49e031 |
children | 15122d724ce4 |
files | core/src/luan/Luan.java dist/jars/luan-core-trunk.jar dist/jars/luan-logging-trunk.jar dist/jars/luan-lucene-trunk.jar dist/jars/luan-mail-trunk.jar dist/jars/luan-web-trunk.jar |
diffstat | 6 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r e0fb8a49e031 -r e5ad26746c94 core/src/luan/Luan.java --- a/core/src/luan/Luan.java Mon Oct 27 20:45:05 2014 +0000 +++ b/core/src/luan/Luan.java Mon Oct 27 21:19:42 2014 +0000 @@ -80,6 +80,9 @@ public static String toString(Number n) { if( n instanceof Integer ) return n.toString(); + int i = n.intValue(); + if( i == n.doubleValue() ) + return Integer.toString(i); String s = n.toString(); int iE = s.indexOf('E'); String ending = null;
diff -r e0fb8a49e031 -r e5ad26746c94 dist/jars/luan-core-trunk.jar Binary file dist/jars/luan-core-trunk.jar has changed
diff -r e0fb8a49e031 -r e5ad26746c94 dist/jars/luan-logging-trunk.jar Binary file dist/jars/luan-logging-trunk.jar has changed
diff -r e0fb8a49e031 -r e5ad26746c94 dist/jars/luan-lucene-trunk.jar Binary file dist/jars/luan-lucene-trunk.jar has changed