package pingis.controllers;

import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;
import pingis.utils.JavaSyntaxChecker;

/**
 *
 * @author authority
 */
@Controller
public class SyntaxCheckController {

  @MessageMapping("/javaparser/{taskInstanceId}")
  public String[] submissionSyntaxChecker(
          @DestinationVariable Long taskInstanceId, String submissionCode) {
    return JavaSyntaxChecker.parseCode(submissionCode);
  }
}

@@ -22,16 +22,67 @@
 llers;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.List;%0A
 import o
@@ -150,16 +150,16 @@
 riable;%0A
-
 import o
@@ -310,16 +310,49 @@
 Checker;
+%0Aimport pingis.utils.SyntaxError;
 %0A%0A/**%0A *
@@ -490,16 +490,25 @@
 lic 
-String%5B%5D
+List%3CSyntaxError%3E
  sub
@@ -638,33 +638,83 @@
 cker
-.parseCode(submissionCode
+%0A        .getSyntaxErrors(submissionCode)%0A        .orElse(new ArrayList%3C%3E()
 );%0A 

Use getSyntaxErrors() in SyntaxCheckController.