Hi Ian, the fix is new to me... and also a bit strange, you're basically casting to the superclass of ByteBuffer, where the clear method is defined... but it should be visible by inheritance. See the javadocs: * https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html * https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html
The only difference I'm seeing, it's that in java 8 the inherited method is final, but in java 11 it's not... oh that might explain the difference, if the resolution of which method to call it's done at compile time. I guess the code change is not going to break the code, even accessing them method in the context of the base class, inheritance should kick in at run time and have the subclass method be called, right? Cheers Andrea On Fri, Mar 20, 2020 at 12:30 PM Ian Turton <ijtur...@gmail.com> wrote: > I'm seeing an "java.lang.NoSuchMethodError: > java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;" error when trying to read > a ShapeFile using 24-snapshot (i.e. master) in eclipse. Googling indicates > it might be caused by compiling with Java 9+ and running on Java 8, which > is odd because I don't have Java 9 (or 11) installed currently. All the > tests pass locally using maven. > > I have a fix https://github.com/geotools/geotools/pull/2843 ready - but I > was wondering if anyone else had seen the issue or if something weird has > occurred to my setup? > > Should I raise an issue and apply the fix or carry on trying to fix my > setup? > > Ian > > -- > Ian Turton > _______________________________________________ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- *Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.*
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel