org.eclipse.lsp4jakarta.commons.JavaCursorContextKind.forValue() throws an IllegalArgumentException when passed the value from its own NONE constant. #520
This was discovered while testing completion support in Liberty Tools for IntelliJ. See discussion here: https://github.com/OpenLiberty/liberty-tools-intellij/issues/681. The problem is that the forValue() method assumes that all of the values are 1 more than their regular enum ordinal value which is true for all of the constants except for NONE whose value is 2000.
This was discovered while testing completion support in Liberty Tools for IntelliJ. See discussion here: https://github.com/OpenLiberty/liberty-tools-intellij/issues/681. The problem is that the
forValue()
method assumes that all of the values are 1 more than their regular enum ordinal value which is true for all of the constants except forNONE
whose value is 2000.