cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r691312 - in /cxf/branches/2.1.x-fixes: ./ rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
Date Tue, 02 Sep 2008 16:40:30 GMT
Author: dkulp
Date: Tue Sep  2 09:40:29 2008
New Revision: 691312

URL: http://svn.apache.org/viewvc?rev=691312&view=rev
Log:
Merged revisions 691246 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r691246 | dkulp | 2008-09-02 09:42:32 -0400 (Tue, 02 Sep 2008) | 2 lines
  
  [CXF-1780] Fix -INF/INF in corba binding. Patch from Matteo Vescovi applied.
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep  2 09:40:29 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Sep  2 09:40:29 2008
@@ -1 +1 @@
-/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,690638
+/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,690638,691246

Modified: cxf/branches/2.1.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java?rev=691312&r1=691311&r2=691312&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveHandler.java
Tue Sep  2 09:40:29 2008
@@ -154,14 +154,18 @@
             data = ((java.math.BigInteger)value).toString();
             break;
         case TCKind._tk_float:
-            if (((Float)value).isInfinite()) {
+            if (((Float)value).equals(Float.NEGATIVE_INFINITY)) {
+                data = "-INF";
+            } else if (((Float)value).equals(Float.POSITIVE_INFINITY)) {
                 data = "INF";
             } else {
                 data = ((Float)value).toString();
             }
             break;
         case TCKind._tk_double:
-            if (((Double)value).isInfinite()) {
+            if (((Double)value).equals(Double.NEGATIVE_INFINITY)) {
+                data = "-INF";
+            } else if (((Double)value).equals(Double.POSITIVE_INFINITY)) {
                 data = "INF";
             } else {
                 data = ((Double)value).toString();
@@ -294,17 +298,23 @@
             data = java.math.BigInteger.valueOf(any.extract_ulonglong()).toString();
             break;
         case TCKind._tk_float:
-            if (Float.isInfinite(any.extract_float())) {
+            Float f = any.extract_float();
+            if (f.equals(Float.NEGATIVE_INFINITY)) {
+                data = "-INF";
+            } else if (f.equals(Float.POSITIVE_INFINITY)) {
                 data = "INF";
             } else {
-                data = Float.toString(any.extract_float());
+                data = f.toString();
             }
             break;
         case TCKind._tk_double:
-            if (Double.isInfinite(any.extract_double())) {
+            Double d = any.extract_double();
+            if (d.equals(Double.NEGATIVE_INFINITY)) {
+                data = "-INF";
+            } else if (d.equals(Double.POSITIVE_INFINITY)) {
                 data = "INF";
             } else {
-                data = Double.toString(any.extract_double());
+                data = d.toString();
             }
             break;
         case TCKind._tk_string:

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java?rev=691312&r1=691311&r2=691312&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java
Tue Sep  2 09:40:29 2008
@@ -195,10 +195,13 @@
     }
     
     protected float[][] getTestFloatData() {
-        return new float[][] {{0.0f, 1.0f}, {-1.0f, (float)java.lang.Math.PI}, {-100.0f,
100.0f}};
+        return new float[][] {{0.0f, 1.0f}, {-1.0f, (float)java.lang.Math.PI},
+                              {-100.0f, 100.0f},
+                              {Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY}};
     }
     protected double[][] getTestDoubleData() {
-        return new double[][] {{0.0f, 1.0f}, {-1, java.lang.Math.PI}, {-100.0, 100.0}};
+        return new double[][] {{0.0f, 1.0f}, {-1, java.lang.Math.PI}, {-100.0, 100.0},
+                               {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY}};
     }
 
 }



Mime
View raw message