我正在检查一个 JAVA 项目的代码库,我发现 Eclipse 在以下几行显示错误:
<c:if test="${not empty queryClauses && ((activeRole eq 'ROLE_ADMIN' && querySearch.project.isPublic()) or (not querySearch.project.isPublic()))}">
<div class="control-btns">
<input class="btn btn-primary" type="button" id="updateQuery" value="<spring:message code="query.updateQuery" />"/>
<input class="btn btn-primary" type="button" id="deleteQuery" value="<spring:message code="query.deleteQuery" />"/>
</div>
</c:if>
错误显示在以下位置:
querySearch.project.isPublic()
错误是:
Multiple annotations found at this line:
- EL Syntax Error
- Encountered " "(" "( "" at line 1,
column 87.
Was expecting one of:
"." ...
">" ...
"gt" ...
"<" ...
...
这是一个同事写的,他已经离开公司了,所以我不能问他这件事。他保证没问题,但看到 Java 项目中出现错误,我感到很难过。
通过搜索,我发现了以下评论:https://stackoverflow.com/a/18417643/508654 https://stackoverflow.com/a/18417643/508654:
AFAIR,最新版本的JSP EL允许调用方法,但是
您的 IDE 可能已经过时并且不希望出现这种情况。日食是
以发出根本不是错误的信号错误而闻名。相信
您的应用程序服务器。
这是同样的原因吗?是否有解决方法(通过更改项目代码或 Eclipse 设置)? Eclipse 会更新以识别语法吗?
似乎是一个长期存在的 Eclipse 验证错误:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352491 https://bugs.eclipse.org/bugs/show_bug.cgi?id=352491
截至撰写本文时(提出这个问题两年后),它似乎仍然没有得到正确修复。
另请参阅中的评论这个类似的问题 https://stackoverflow.com/questions/19340866.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)