function checkErrorsReportedByJavaExtension()

in src/build.ts [82:94]


function checkErrorsReportedByJavaExtension(): boolean {
    const problems = vscode.languages.getDiagnostics() || [];
    for (const problem of problems) {
        const fileName = path.basename(problem[0].fsPath || "");
        if (fileName.endsWith(".java") || fileName === "pom.xml" || fileName.endsWith(".gradle")) {
            if (problem[1].filter((diagnostic) => diagnostic.severity === vscode.DiagnosticSeverity.Error).length) {
                return true;
            }
        }
    }

    return false;
}