Azure / azure-relay-java

Azure Relay Java SDK
MIT License
8 stars 9 forks source link

0.0.4 Release throws java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip() on Java 8 Runtime #87

Open paul-mcculloch opened 2 years ago

paul-mcculloch commented 2 years ago

When compiling & running the sample code from https://github.com/Azure/azure-relay/tree/master/samples/hybrid-connections/java/simple-http-demo with Java 8 (Windows, Java version: 1.8.0_322, vendor: Temurin) and error is thrown:

java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at com.microsoft.azure.relay.HybridHttpConnection$ResponseStream.lambda$closeAsync$7(HybridHttpConnection.java:471)

I think the issue is that 0.0.4 release was build with Java 16 (MANIFEST.MF says Build-Jdk: 16.0.2) as described here: https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip

0.0.3 doesn't suffer from this, and was built with Java 8.