Skip to content

Commit

Permalink
Merge pull request #1096 from Windchild292/dev_Windchild_AssertionCle…
Browse files Browse the repository at this point in the history
…anup

Fixing all Assert Usages
  • Loading branch information
Windchild292 authored Jun 2, 2022
2 parents 9bef302 + 2b153f6 commit a766c38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ protected AbstractMMLButtonDialog(final JFrame frame, final boolean modal, final

/**
* This override forces the preferences for this class to be tracked in MML instead of MegaMek
* @throws Exception if there's an issue initializing the preferences. Normally this means
* a component has <strong>not</strong> had its name value set.
*/
@Override
protected void setPreferences() {
protected void setPreferences() throws Exception {
setPreferences(MegaMekLab.getMMLPreferences().forClass(getClass()));
}
}
7 changes: 5 additions & 2 deletions megameklab/src/megameklab/ui/dialog/AbstractMMLDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Inheriting classes must call initialize() in their constructors and override createCenterPane().
*/
public abstract class AbstractMMLDialog extends AbstractDialog {

//region Constructors
/**
* This creates a non-modal AbstractMMLDialog using the default MML dialog resource bundle. This is
* the normal constructor to use for an AbstractMMLDialog.
Expand All @@ -53,12 +53,15 @@ protected AbstractMMLDialog(final JFrame frame, final boolean modal, final Resou
final String name, final String title) {
super(frame, modal, resources, name, title);
}
//endregion Constructors

/**
* This override forces the preferences for this class to be tracked in MML instead of MegaMek
* @throws Exception if there's an issue initializing the preferences. Normally this means
* a component has <strong>not</strong> had its name value set.
*/
@Override
protected void setPreferences() {
protected void setPreferences() throws Exception {
setPreferences(MegaMekLab.getMMLPreferences().forClass(getClass()));
}
}

0 comments on commit a766c38

Please sign in to comment.