hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r227188 - in /jakarta/hivemind/trunk: framework/src/java/org/apache/hivemind/service/ClassFabUtils.java framework/src/test/org/apache/hivemind/service/impl/TestClassFabUtils.java status.xml
Date Wed, 03 Aug 2005 09:35:11 GMT
Author: knut
Date: Wed Aug  3 02:33:55 2005
New Revision: 227188

URL: http://svn.apache.org/viewcvs?rev=227188&view=rev
Log:
ClassFabUtils.addNoOpMethod() now creates a return statement with the return values 0L, 0.0d,
0.0f for the return types long, double, and float respectively. Fixes HIVEMIND-144.

Modified:
    jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/service/ClassFabUtils.java
    jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/service/impl/TestClassFabUtils.java
    jakarta/hivemind/trunk/status.xml

Modified: jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/service/ClassFabUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/service/ClassFabUtils.java?rev=227188&r1=227187&r2=227188&view=diff
==============================================================================
--- jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/service/ClassFabUtils.java
(original)
+++ jakarta/hivemind/trunk/framework/src/java/org/apache/hivemind/service/ClassFabUtils.java
Wed Aug  3 02:33:55 2005
@@ -146,6 +146,12 @@
             {
                 if (returnType == boolean.class)
                     body.append(" false");
+                else if (returnType == long.class)
+                    body.append(" 0L");
+                else if (returnType == float.class)
+                    body.append(" 0.0f");
+                else if (returnType == double.class)
+                    body.append(" 0.0d");
                 else
                     body.append(" 0");
             }

Modified: jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/service/impl/TestClassFabUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/service/impl/TestClassFabUtils.java?rev=227188&r1=227187&r2=227188&view=diff
==============================================================================
--- jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/service/impl/TestClassFabUtils.java
(original)
+++ jakarta/hivemind/trunk/framework/src/test/org/apache/hivemind/service/impl/TestClassFabUtils.java
Wed Aug  3 02:33:55 2005
@@ -51,8 +51,13 @@
     {
         tryAddNoOpMethod(void.class, "{  }");
         tryAddNoOpMethod(String.class, "{ return null; }");
-        tryAddNoOpMethod(int.class, "{ return 0; }");
         tryAddNoOpMethod(boolean.class, "{ return false; }");
+        tryAddNoOpMethod(char.class, "{ return 0; }");
+        tryAddNoOpMethod(short.class, "{ return 0; }");
+        tryAddNoOpMethod(int.class, "{ return 0; }");
+        tryAddNoOpMethod(long.class, "{ return 0L; }");
+        tryAddNoOpMethod(double.class, "{ return 0.0d; }");
+        tryAddNoOpMethod(float.class, "{ return 0.0f; }");
     }
 
     /** @since 1.1 */
@@ -75,7 +80,6 @@
     }
 
     /** @since 1.1 */
-
     public void testGenerateClassName() throws Exception
     {
         String name = ClassFabUtils.generateClassName(Runnable.class);

Modified: jakarta/hivemind/trunk/status.xml
URL: http://svn.apache.org/viewcvs/jakarta/hivemind/trunk/status.xml?rev=227188&r1=227187&r2=227188&view=diff
==============================================================================
--- jakarta/hivemind/trunk/status.xml (original)
+++ jakarta/hivemind/trunk/status.xml Wed Aug  3 02:33:55 2005
@@ -33,6 +33,7 @@
     <release version="1.1-beta-3" date="unreleased">
       <action type="update" dev="HLS">Change dist targets to use SSH passphrase for
authentication.</action>
       <action type="fix" dev="KW">Allow for null values in &lt;invoke-parent&gt;
rule.</action>
+      <action type="fix" dev="KW" fixes-bug="HIVEMIND-144">PlaceholderFactory generates
incorrect return statement for some primitive return types.</action>
     </release>
     <release version="1.1-beta-2" date="Jun 28 2005">
       <action type="fix" dev="JC" fixes-bug="HIVEMIND-122">IBM JDK 1.4.1 and java.net.URL.openStream
causes NPE"</action>



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message