Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice 3.6b: Bug in Functional_TwowayCallbackDouble

java/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java contains:
public void response(byte arg)

However, this should be double rather than byte? The interface Ice.TwowayCallbackDouble contains
void response(double arg);

which this is not implementing.

Could I suggest that this should be using @Overrride to flag up problems like this, and perhaps instantiating all the concrete classes during compilation, e.g. of tests, to ensure failure to build if there are problems. It might be worth checking the other related classes for similar problems.


Regards,
Roger

Comments

  • Patch

    The following change fixes things for me:
    commit 17d82ff561aa379b7d6d69d0f30d3c9781fba06d
    Author: Roger Leigh <r.leigh@dundee.ac.uk>
    Date:   Thu Jan 15 13:44:39 2015 +0000
    
        Fix Functional_TwowayCallbackDouble
    
    diff --git a/java/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java b/java/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java
    index 32782b9..e7f938d 100644
    --- a/java/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java
    +++ b/java/src/Ice/src/main/java/IceInternal/Functional_TwowayCallbackDouble.java
    @@ -30,7 +30,7 @@ public abstract class Functional_TwowayCallbackDouble
             __responseCb = responseCb;
         }
     
    -    public void response(byte arg)
    +    public void response(double arg)
         {
             if(__responseCb != null)
             {
    
  • matthew
    matthew NL, Canada
    rleigh wrote: »
    Could I suggest that this should be using @Overrride to flag up problems like this, and perhaps instantiating all the concrete classes during compilation, e.g. of tests, to ensure failure to build if there are problems. It might be worth checking the other related classes for similar problems.


    Regards,
    Roger


    We added @Override automatically during the 3.6 process to avoid this type of issue. However, of course the tool didn't add it in this case since this doesn't override the parent :)

    We've fixed the bug and added more tests for the 3.6 release.

    Thanks for the report.
  • matthew wrote: »
    We added @Override automatically during the 3.6 process to avoid this type of issue. However, of course the tool didn't add it in this case since this doesn't override the parent :)

    Oops, but good to know that it will be guarded against for the future :)
    matthew wrote: »
    We've fixed the bug and added more tests for the 3.6 release.

    Super, thanks!