Thinking.

That is darn annoying as changing the return type to be more specific is part 
of Java (since Java 5). It did not occur to me that that would break 
reflection? The returned SimpleFeatureSource is still a FeatureSource.

I can think of a workaround; but I am not sure if they will ... work.
- You can try wrapping with a dynamic proxy; and route the method as appropriate

Other than that we try our best to give a full release cycle before any 
deprecated method is removed. As andrea indicated the project cycles on the 
point release. This is an artifact from when we tracked the geoapi project; so 
a full release would only occur when geoapi changed the implementation target.

The other thing I ask is that you watch the request for changes that go buy the 
GeoTools list and evaluate them against the impact to your project. As a major 
user of GeoTools you can work towards being involved and sitting on the 
steering committee.

We do try and respect the opinion of committers on the project; but being on 
the steering committee gets you a vote (in addition to some work with respect 
project wide changes).

-- 
Jody Garnett

On Monday, 28 February 2011 at 9:40 PM, Jan De Moerloose wrote: 
> Hello,
> 
> while upgrading to geotools 2.7-RC2 i am getting the following error on 
> 2.6 code:
> 
> Caused by: java.lang.NoSuchMethodError: 
> org.geotools.data.DataStore.getFeatureSource(Ljava/lang/String;)Lorg/geotools/data/FeatureSource;
>  at 
> org.geomajas.layer.shapeinmem.FeatureSourceRetriever.getFeatureSource(FeatureSourceRetriever.java:81)
>  
> ~[classes/:na]
>  at 
> org.geomajas.layer.shapeinmem.ShapeInMemLayer.initFeatures(ShapeInMemLayer.java:221)
>  
> ~[classes/:na]
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> ~[na:1.6.0_18]
> 
> Apparently the return type of getFeatureSource() has changed to a 
> subtype of FeatureSource called SimpleFeatureSource.
> I suppose the signature change is intentionally, but it causes a big 
> problem for us as we try to adhere to a strict api contract for our 
> Geomajas project (no recompilation of old code for upgrades).
> 
> I would like to know if there is a fix possible that does not require 
> recompiling the 2.6 code (i doubt it from a java view point) ?
> If not, should we expect similar issues with upcoming minor version 
> upgrades or is this an exceptional case ?
> 
> Thank you for your help,
> Jan
> 
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to