【发布时间】:2014-11-28 01:49:39
【问题描述】:
我在 Eclipse 中使用 Checkstyle Plug-in 5.7.0 和 Java 8。我在我的界面默认方法中得到 Got an exception - expecting EOF, found 'throw'。你能帮我解决我的检查样式吗?以下是方法
default void validate(final String fieldName) {
if (StringUtils.isEmpty(fieldValue)) {
throw new RuntimeException(""); //check style error here
}
}
即使我删除了方法体,我也会在结束大括号上得到相同的错误。看来checkstyle不支持接口中带有body的方法。
【问题讨论】:
标签: eclipse-plugin java-8 checkstyle