I am getting the build failure for the tomcat 10.1.x, as I dig in I find
the below is the root cause

[javac]
E:\apache-tomcat-10.1.12-src\apache-tomcat-10.1.12-src\webapps\examples\WEB-INF\classes\websocket\drawboard\DrawboardEndpoint.java:168:
error: cannot infer type arguments for Whole<T>
    [javac]             new MessageHandler.Whole<>() {
    [javac]                                     ^
    [javac]   reason: cannot use '<>' with anonymous inner classes
    [javac]   where T is a type-variable:
    [javac]     T extends Object declared in interface Whole
    [javac] 1 error


Please help how to overcome this error

class name
========
DrawboardEndpoint:


 private final MessageHandler.Whole<String> stringHandler =
            new MessageHandler.Whole<>() {

Reply via email to