Merge pull request #139 from sdgx/ctor-invokes-overridable-function

Avoid calling overridable function from constructor
This commit is contained in:
Michael Bayne
2018-09-14 14:12:55 -07:00
committed by GitHub
7 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -16,13 +16,13 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.8.1</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<version>1.10.19</version> <version>2.22.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@@ -36,7 +36,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
* Parses and provide access to the information contained in the <code>getdown.txt</code> * Parses and provide access to the information contained in the <code>getdown.txt</code>
* configuration file. * configuration file.
*/ */
public class Application public final class Application
{ {
/** The name of our configuration file. */ /** The name of our configuration file. */
public static final String CONFIG_FILE = "getdown.txt"; public static final String CONFIG_FILE = "getdown.txt";
@@ -0,0 +1 @@
mock-maker-inline
@@ -28,14 +28,14 @@ import static com.threerings.getdown.Log.log;
/** /**
* Displays a confirmation that the user wants to abort installation. * Displays a confirmation that the user wants to abort installation.
*/ */
public class AbortPanel extends JFrame public final class AbortPanel extends JFrame
implements ActionListener implements ActionListener
{ {
public AbortPanel (Getdown getdown, ResourceBundle msgs) public AbortPanel (Getdown getdown, ResourceBundle msgs)
{ {
_getdown = getdown; _getdown = getdown;
_msgs = msgs; _msgs = msgs;
setLayout(new VGroupLayout()); setLayout(new VGroupLayout());
setResizable(false); setResizable(false);
setTitle(get("m.abort_title")); setTitle(get("m.abort_title"));
@@ -30,7 +30,7 @@ import static com.threerings.getdown.Log.log;
* Displays an interface with which the user can configure their proxy * Displays an interface with which the user can configure their proxy
* settings. * settings.
*/ */
public class ProxyPanel extends JPanel public final class ProxyPanel extends JPanel
implements ActionListener implements ActionListener
{ {
public ProxyPanel (Getdown getdown, ResourceBundle msgs) public ProxyPanel (Getdown getdown, ResourceBundle msgs)
@@ -10,7 +10,7 @@ import java.util.List;
import static com.threerings.getdown.Log.log; import static com.threerings.getdown.Log.log;
public class RotatingBackgrounds public final class RotatingBackgrounds
{ {
public interface ImageLoader { public interface ImageLoader {
/** Loads and returns the image with the supplied path. */ /** Loads and returns the image with the supplied path. */
@@ -36,7 +36,7 @@ import static com.threerings.getdown.Log.log;
/** /**
* Displays download and patching status. * Displays download and patching status.
*/ */
public class StatusPanel extends JComponent public final class StatusPanel extends JComponent
implements ImageObserver implements ImageObserver
{ {
public StatusPanel (ResourceBundle msgs) public StatusPanel (ResourceBundle msgs)