Странная ошибка, пробовал гуглить, пишут, что это из-за конфликтов в библиотеках, но я ничего не добавлял. В самой ошибке в комментах написано "Thrown when an incompatible class change has occurred to some class definition. The definition of some class, on which the currently executing method depends, has since changed". Возможно ли это из-за того, что я пару раз нажимал Revert в истории проекта?
Exception in thread "AWT-EventQueue-0" java.lang.IncompatibleClassChangeError: Method 'java.util.List ru.chess.model.PseudoValidMoves.getIntersecting(ru.chess.cell.Cell[][], ru.chess.Position, ru.chess.AbsolutePieceType)' must be Methodref constant
at ru.chess.model.Model.highlightLoseCause(Model.java:284)
at ru.chess.model.Model.handleMove(Model.java:249)
at ru.chess.model.Model$MouseHandler.mouseReleased(Model.java:479)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at java.desktop/java.awt.Component.processEvent(Component.java:6386)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
/
static List<Cell> getIntersecting(Cell[][] cells,
Position targetPosition,
AbsolutePieceType absolutePieceType) {
List<Cell> intersectingCells = new ArrayList<>();
for (Cell[] cellArray : cells)
for (Cell cell : cellArray) {
AbsolutePieceType t = cell.absolutePieceType.invert();
List<Position> positions = get(cells, cell);
if (t == absolutePieceType && positions.contains(targetPosition))
intersectingCells.add(cell);
}
return intersectingCells;
}