Home Comments

Ice 3.6b: Bug in Functional_TwowayCallbackDouble

rleighrleigh Member Roger LeighOrganization: University of DundeeProject: OMERO (Open Microscopy Environment)
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

  • rleighrleigh Member Roger LeighOrganization: University of DundeeProject: OMERO (Open Microscopy Environment)
    Patch

    The following change fixes things for me:
    commit 17d82ff561aa379b7d6d69d0f30d3c9781fba06d
    Author: Roger Leigh <[email protected]>
    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)
             {
    
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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.
  • rleighrleigh Member Roger LeighOrganization: University of DundeeProject: OMERO (Open Microscopy Environment)
    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!
Sign In or Register to comment.