我见过的大多数遇到这个问题的人都=在他们需要的地方使用==。是什么导致了我的问题?
com\callmeyer\jopp\FieldCoordinator.java:303:意外类型
必需:类、包
发现:变量
if (event.getType() == event.Type.INSERT) {
^
枚举定义和访问器:
public class DataLayoutEvent {
public static enum Type { INSERT, DELETE, RENAME, MOVE, RESIZE }
private Type type = null;
public Type getType() {
return type;
}
...
}
以及发生错误的方法:
public void layoutChanged(DataLayoutEvent event) {
if (event.getType() == event.Type.INSERT) {
fieldAdded(event.getField(), event.getToIndex());
}
...