Skip to content

Commit

Permalink
Fix errors and warnings with newer java
Browse files Browse the repository at this point in the history
  • Loading branch information
josugoar authored Sep 2, 2023
1 parent fb232ce commit 6428f75
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/maze/components/cell/composite/CellComposite.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final void override() {
if (isLeaf())
return;
// Remove MutableTreeNode children
new Vector<CellComposite>(children).forEach(child -> {
((Vector<CellComposite>)children.clone()).forEach(child -> {
removeAllChildren();
child.override();
});
Expand Down Expand Up @@ -96,7 +96,7 @@ public final void setWalkable(final boolean walkable) {
mzModel.nodesWereRemoved(this, new int[0], new Object[0]);
else {
// Remove CellComposite neighbors
new Vector<CellComposite>(children).forEach(child -> child.children.remove(this));
((Vector<CellComposite>)children.clone()).forEach(child -> child.children.remove(this));
// Get old DefaultMutableTreeNode enpoints
final int[] oldIndex = IntStream.range(0, getChildCount()).toArray();
final Object[] oldChildren = children.toArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public MenuItemDecorator(final String text, final String fileName, final Integer
if (mnemonic == null)
return;
setMnemonic(mnemonic);
setAccelerator(KeyStroke.getKeyStroke(mnemonic, InputEvent.CTRL_MASK));
setAccelerator(KeyStroke.getKeyStroke(mnemonic, InputEvent.CTRL_DOWN_MASK));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @see app.view.components.RangedSlider.BoundedRange
* @deprecated
*/
@Deprecated
public class SliderDecorator extends JSlider {

private static final long serialVersionUID = 1L;
Expand Down
1 change: 1 addition & 0 deletions src/utils/Delegate.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Deprecated
public @interface Delegate {

/**
Expand Down
1 change: 1 addition & 0 deletions src/utils/GridManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @see utils.GridManager.GridObject GridObject
* @deprecated
*/
@Deprecated
public class GridManager<T extends GridManager.GridObject<T>> implements Serializable {

/**
Expand Down

0 comments on commit 6428f75

Please sign in to comment.