commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject Re: [math] incompatible change in r936295
Date Tue, 01 Jun 2010 12:37:33 GMT
> >>> Sorry I did not notice this before.  I see it now flagged by the
> >>> Clirr report.  The problem is here:
> >>>
> >>> -    public BivariateRealFunction interpolate(final double[] xval,
> >>> -                                             final double[] yval,
> >>> -                                             final double[][] zval)
> >>> +    public BicubicSplineInterpolatingFunction interpolate(final
> >>>
> >>> Changing the return type of a function is an incompatible change.
> >>> We should revert this change.
> >>>
> >> Even though BicubicSplineInterpolatingFunction implements
> >> BivariateRealFunction ?
> > 
> > Hence, this is not an incompatible change.
> 
> Unfortunately, no.  See
> http://commons.apache.org/releases/versioning.html
> http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html
> (13.4.15)
> http://wiki.eclipse.org/Evolving_Java-based_APIs_2
> 
> Clients that recompile and just use the method will not break.
> Clients that do not recompile and/or extend the class may break.


I don't understand.
Supposing that some (compiled) client code refers to

  BivariateRealFunction interpolate(...)

Since "BivariateRealFunction" is an interface, then, by definition, the
code cannot contain information about the specific type that will be
returned.
How can this code break when a "BicubicSplineInterpolatingFunction" is
returned?


Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message