You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Thomas Wolf <th...@paranor.ch> on 2021/11/17 14:23:41 UTC

ByteBuffer (Was: Re: JIRA Emails)

On 17.11.21 14:37 , Jonathan Valliere wrote:
> The error you posted was related to java.lang.NoSuchMethodError:
> java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; and not the SSLFilter. You
> sure there wasn’t something else
> wrong with your env cause I’m pretty sure ByteBuffer.fip() has been around
> since ByteBuffer.

But there was a co-variant return type override. In Java 1.8, 
ByteBuffer.flip() is inherited from Buffer and returns a Buffer.

In Java > 1.8, ByteBuffer.flip() is an override returning ByteBuffer.

So when you compile with Java > 1.8 w/o --release 8 and then run on Java 
1.8, you'll get that NoSuchMethodError.

Cheers,

   Thomas


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


Re: ByteBuffer (Was: Re: JIRA Emails)

Posted by Jonathan Valliere <jo...@apache.org>.
Good job.   So yeah, back to adopting Java 11 moving forward.

On Wed, Nov 17, 2021 at 9:23 AM Thomas Wolf <th...@paranor.ch> wrote:

> On 17.11.21 14:37 , Jonathan Valliere wrote:
> > The error you posted was related to java.lang.NoSuchMethodError:
> > java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; and not the SSLFilter.
> You
> > sure there wasn’t something else
> > wrong with your env cause I’m pretty sure ByteBuffer.fip() has been
> around
> > since ByteBuffer.
>
> But there was a co-variant return type override. In Java 1.8,
> ByteBuffer.flip() is inherited from Buffer and returns a Buffer.
>
> In Java > 1.8, ByteBuffer.flip() is an override returning ByteBuffer.
>
> So when you compile with Java > 1.8 w/o --release 8 and then run on Java
> 1.8, you'll get that NoSuchMethodError.
>
> Cheers,
>
>    Thomas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
> For additional commands, e-mail: dev-help@mina.apache.org
>
>