Make fields final. Remove protected-modifier in final class
This commit is contained in:
@@ -679,7 +679,7 @@ public abstract class Getdown
|
||||
|
||||
/** The last percentage at which we checked for another getdown running, or -1 for not
|
||||
* having checked at all. */
|
||||
protected int _lastCheck = -1;
|
||||
private int _lastCheck = -1;
|
||||
};
|
||||
if (!dl.download(resources, _app.maxConcurrentDownloads())) {
|
||||
// if we aborted due to detecting another getdown running, we want to report here
|
||||
|
||||
@@ -18,6 +18,7 @@ import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -70,7 +71,7 @@ public class GetdownApp
|
||||
File logFile = new File(envc.appDir, "launcher.log");
|
||||
try {
|
||||
PrintStream logOut = new PrintStream(
|
||||
new BufferedOutputStream(new FileOutputStream(logFile)), true);
|
||||
new BufferedOutputStream(Files.newOutputStream(logFile.toPath())), true);
|
||||
System.setOut(logOut);
|
||||
System.setErr(logOut);
|
||||
} catch (IOException ioe) {
|
||||
@@ -244,7 +245,7 @@ public class GetdownApp
|
||||
});
|
||||
}
|
||||
|
||||
protected JFrame _frame;
|
||||
private JFrame _frame;
|
||||
};
|
||||
Getdown.run(getdown);
|
||||
return getdown;
|
||||
|
||||
@@ -156,7 +156,7 @@ public final class ProxyPanel extends JPanel implements ActionListener
|
||||
}
|
||||
|
||||
/** Used to look up localized messages. */
|
||||
protected String get (String key)
|
||||
private String get(String key)
|
||||
{
|
||||
// if this string is tainted, we don't translate it, instead we
|
||||
// simply remove the taint character and return it to the caller
|
||||
@@ -188,18 +188,18 @@ public final class ProxyPanel extends JPanel implements ActionListener
|
||||
}
|
||||
}
|
||||
|
||||
protected static Dimension clampWidth (Dimension dim, int minWidth) {
|
||||
private static Dimension clampWidth(Dimension dim, int minWidth) {
|
||||
dim.width = Math.max(dim.width, minWidth);
|
||||
return dim;
|
||||
}
|
||||
|
||||
protected final Getdown _getdown;
|
||||
protected final ResourceBundle _msgs;
|
||||
protected final boolean _updateAuth;
|
||||
private final Getdown _getdown;
|
||||
private final ResourceBundle _msgs;
|
||||
private final boolean _updateAuth;
|
||||
|
||||
protected final JTextField _host;
|
||||
protected final JTextField _port;
|
||||
protected final JCheckBox _useAuth;
|
||||
protected final JTextField _username;
|
||||
protected final JPasswordField _password;
|
||||
private final JTextField _host;
|
||||
private final JTextField _port;
|
||||
private final JCheckBox _useAuth;
|
||||
private final JTextField _username;
|
||||
private final JPasswordField _password;
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ public final class StatusPanel extends JComponent
|
||||
protected RotatingBackgrounds _bg;
|
||||
protected Dimension _psize;
|
||||
|
||||
protected ResourceBundle _msgs;
|
||||
protected final ResourceBundle _msgs;
|
||||
|
||||
protected int _progress = -1;
|
||||
protected String _status;
|
||||
@@ -383,9 +383,9 @@ public final class StatusPanel extends JComponent
|
||||
protected Label _rlabel, _newrlab;
|
||||
|
||||
protected UpdateInterface _ifc;
|
||||
protected Timer _timer;
|
||||
protected final Timer _timer;
|
||||
|
||||
protected long[] _remain = new long[4];
|
||||
protected final long[] _remain = new long[4];
|
||||
protected int _ridx;
|
||||
protected Throttle _rthrottle = new Throttle(1, 1000L);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user