I have this code inside a B4J library of mine placed inline with java.
It works correctly if I compile with Java 11 but if I compile with Java 8.202 it tells me that it can't compile in java 7 (strange since I compile with 8 and that if compiled outside b4j it doesn't throw an error).
My question since I know very little about java, how could I change this Lambda into a normal function.
in reality it is not called multiple times, but only when starting a device to transmit a code that authorizes its use. the device after receiving the code responds to the software.
This piece of code is provided by the device manufacturer in an example for Java. Corresponding manufacturer examples in other languages do not have this part. I tried to remove it but the device does not work