Test and build errors on Java 11
Running LSP4J's build with Java 11 has numerous warnings and errors, such as:
warning - invalid usage of tag >and similar in many javadocsTracingMessageConsumerTesthas many test failures
The tests are failing with this diff (note PM vs pm)
org.junit.ComparisonFailure: expected:<[Trace - 06:07:30 [PM]] Sending response '...> but was:<[Trace - 06:07:30 [pm]] Sending response '...>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at org.eclipse.lsp4j.jsonrpc.test.TracingMessageConsumerTest.testSendingResponse(TracingMessageConsumerTest.java:207)
The tests are failing with this diff (note
PMvspm)org.junit.ComparisonFailure: expected:<[Trace - 06:07:30 [PM]] Sending response '...> but was:<[Trace - 06:07:30 [pm]] Sending response '...> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at org.eclipse.lsp4j.jsonrpc.test.TracingMessageConsumerTest.testSendingResponse(TracingMessageConsumerTest.java:207)
The problem here is the date time formatter was using default locale. Not sure why the calculation and resulting output is different between Java 8 and 11. I have fixed this with https://github.com/eclipse/lsp4j/pull/460/commits/b5a2b94de7692792bcb743d43417276c60ba0547 which adds a new constructor that takes the locale and the tests pass in the US locale so we can do string comparisons.
warning - invalid usage of tag >and similar in many javadocs
I fixed a bunch of the Java11 javadoc issues in https://github.com/eclipse/lsp4j/pull/460/commits/820be5691654d032d824725f4330435204a93e19 - but some of the links were problematic. In particular I couldn't get this link to work in Java 8 and 11 at the same time. The current code renders properly in Java 8: https://github.com/eclipse/lsp4j/blob/c0b921895b4576feeb355eea7a053a0d56daba7b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/util/SemanticHighlightingTokens.java#L134
Are there any issues left or this can be closed?
I can't remember - need to try using Java 11 and see if it complains. I can see that SemanticHighlightingTokens no longer exists, so that may have solved the problem.
i dont see any compile and test errors with 11.