You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2008/08/07 22:59:50 UTC

svn commit: r683713 - /db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/SQLDecimal.java

Author: kmarsden
Date: Thu Aug  7 13:59:50 2008
New Revision: 683713

URL: http://svn.apache.org/viewvc?rev=683713&view=rev
Log:
DERBY-3813 Derby tests for the existance of BigDecimal methods toPlainString and bdPrecison but does not check if they were found before using them.


Modified:
    db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/SQLDecimal.java

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/SQLDecimal.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/SQLDecimal.java?rev=683713&r1=683712&r2=683713&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/SQLDecimal.java (original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/SQLDecimal.java Thu Aug  7 13:59:50 2008
@@ -317,7 +317,7 @@
 		BigDecimal localValue = getBigDecimal();
 		if (localValue == null)
 			return null;
-		else if (JVMInfo.JDK_ID < JVMInfo.J2SE_15)
+		else if (toPlainString == null)
 			return localValue.toString();
         else
         {
@@ -1157,7 +1157,7 @@
             return 0;
         }
         
-        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_15)
+        if (bdPrecision != null)
 		{
 	        // use reflection so we can still compile using JDK1.4
 			// if we are prepared to require 1.5 to compile then this can be a