Skip to content

Commit ec2e9a6

Browse files
committed
Added all missing @OverRide annotations
1 parent 46dfd76 commit ec2e9a6

24 files changed

+65
-0
lines changed

arduino-core/src/cc/arduino/Compiler.java

+1
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ private String boardOptions(TargetBoard board) {
516516
* out from the compiler. The errors are parsed for their contents
517517
* and line number, which is then reported back to Editor.
518518
*/
519+
@Override
519520
public void message(String s) {
520521
int i;
521522

arduino-core/src/cc/arduino/MyStreamPumper.java

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public MyStreamPumper(final InputStream is, final MessageConsumer messageConsume
6464
* Copies data from the input stream to the output stream. Terminates as
6565
* soon as the input stream is closed or an error occurs.
6666
*/
67+
@Override
6768
public void run() {
6869
synchronized (this) {
6970
// Just in case this object is reused in the future

arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public GPGDetachedSignatureVerifier(String keyId) {
4949
this.keyId = keyId;
5050
}
5151

52+
@Override
5253
protected boolean verify(File signedFile, File signature, File publicKey) throws IOException {
5354
FileInputStream signatureInputStream = null;
5455
FileInputStream signedFileInputStream = null;

arduino-core/src/cc/arduino/contributions/packages/ContributedPlatform.java

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public abstract class ContributedPlatform extends DownloadableContribution {
4444

4545
public abstract String getArchitecture();
4646

47+
@Override
4748
public abstract String getChecksum();
4849

4950
public abstract List<ContributedToolReference> getToolsDependencies();

arduino-core/src/cc/arduino/net/CustomProxySelector.java

+1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ private void setAuthenticator(String username, String password) {
162162
}
163163
Authenticator.setDefault(
164164
new Authenticator() {
165+
@Override
165166
public PasswordAuthentication getPasswordAuthentication() {
166167
return new PasswordAuthentication(username, actualPassword.toCharArray());
167168
}

arduino-core/src/cc/arduino/packages/Uploader.java

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public String getFailureMessage() {
152152
return error;
153153
}
154154

155+
@Override
155156
public void message(String s) {
156157
// selectively suppress a bunch of avrdude output for AVR109/Caterina that should already be quelled but isn't
157158
if (!verbose && StringUtils.stringContainsOneOf(s, STRINGS_TO_SUPPRESS)) {

arduino-core/src/cc/arduino/packages/discoverers/SerialDiscovery.java

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public List<BoardPort> listDiscoveredBoards() {
5252
return getSerialBoardPorts(false);
5353
}
5454

55+
@Override
5556
public List<BoardPort> listDiscoveredBoards(boolean complete) {
5657
return getSerialBoardPorts(complete);
5758
}

arduino-core/src/cc/arduino/packages/ssh/NoInteractionUserInfo.java

+6
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,32 @@ public NoInteractionUserInfo(String password) {
3939
this.password = password;
4040
}
4141

42+
@Override
4243
public String getPassword() {
4344
return password;
4445
}
4546

47+
@Override
4648
public boolean promptYesNo(String str) {
4749
return true;
4850
}
4951

52+
@Override
5053
public String getPassphrase() {
5154
return password;
5255
}
5356

57+
@Override
5458
public boolean promptPassphrase(String message) {
5559
return true;
5660
}
5761

62+
@Override
5863
public boolean promptPassword(String message) {
5964
return true;
6065
}
6166

67+
@Override
6268
public void showMessage(String message) {
6369
}
6470

arduino-core/src/cc/arduino/packages/ssh/SSHConfigFileSetup.java

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public SSHConfigFileSetup(SSHClientSetupChainRing nextChainRing) {
4343
this.nextChainRing = nextChainRing;
4444
}
4545

46+
@Override
4647
public Session setup(BoardPort port, JSch jSch) throws JSchException, IOException {
4748
String ipAddress = port.getAddress();
4849
String hostname = port.getBoardName().contains(".local") ? port.getBoardName() : port.getBoardName() + ".local";

arduino-core/src/cc/arduino/packages/uploaders/GenericNetworkUploader.java

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public GenericNetworkUploader(BoardPort port) {
4646
this.port = port;
4747
}
4848

49+
@Override
4950
public boolean requiresAuthorization() {
5051
return this.port.getPrefs().get("auth_upload").contentEquals("yes");
5152
}
@@ -55,6 +56,7 @@ public String getAuthorizationKey() {
5556
return "runtime.pwd." + this.port.getAddress();
5657
}
5758

59+
@Override
5860
public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List<String> warningsAccumulator) throws Exception {
5961
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
6062
PreferencesMap prefs = PreferencesData.getMap();

arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public SSHUploader(BoardPort port) {
6363
this.port = port;
6464
}
6565

66+
@Override
6667
public boolean requiresAuthorization() {
6768
return true;
6869
}

arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public SerialUploader(boolean noUploadPort)
6161
super(noUploadPort);
6262
}
6363

64+
@Override
6465
public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List<String> warningsAccumulator) throws Exception {
6566
// FIXME: Preferences should be reorganized
6667
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
@@ -347,6 +348,7 @@ private boolean uploadUsingProgrammer(String buildPath, String className) throws
347348
}
348349
}
349350

351+
@Override
350352
public boolean burnBootloader() throws Exception {
351353
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
352354

arduino-core/src/processing/app/Serial.java

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public void dispose() throws IOException {
148148
}
149149
}
150150

151+
@Override
151152
public synchronized void serialEvent(SerialPortEvent serialEvent) {
152153
if (serialEvent.isRXCHAR()) {
153154
try {

arduino-core/src/processing/app/SketchFile.java

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public boolean isModified() {
242242
return false;
243243
}
244244

245+
@Override
245246
public boolean equals(Object o) {
246247
return (o instanceof SketchFile) && file.equals(((SketchFile) o).file);
247248
}

arduino-core/src/processing/app/debug/MessageSiphon.java

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public MessageSiphon(InputStream stream, MessageConsumer consumer, int lineTimeo
6363
}
6464

6565

66+
@Override
6667
public void run() {
6768
try {
6869
// process data until we hit EOF; this will happily block

arduino-core/src/processing/app/debug/RunnerException.java

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public RunnerException(Exception e) {
7575
* Override getMessage() in Throwable, so that I can set
7676
* the message text outside the constructor.
7777
*/
78+
@Override
7879
public String getMessage() {
7980
return message;
8081
}
@@ -151,6 +152,7 @@ static public final String massage(String msg) {
151152
*/
152153

153154

155+
@Override
154156
public void printStackTrace() {
155157
if (showStackTrace) {
156158
super.printStackTrace();

arduino-core/src/processing/app/debug/Sizer.java

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public long[] computeSize() throws RunnerException {
9696
return new long[] { textSize, dataSize, eepromSize };
9797
}
9898

99+
@Override
99100
public void message(String s) {
100101
if (firstLine == null)
101102
firstLine = s;

arduino-core/src/processing/app/helpers/BasicUserNotifier.java

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class BasicUserNotifier extends UserNotifier {
99
* This is an error that can't be recovered. Use showWarning()
1010
* for errors that allow P5 to continue running.
1111
*/
12+
@Override
1213
public void showError(String title, String message, Throwable e, int exit_code) {
1314
if (title == null) title = tr("Error");
1415

@@ -18,6 +19,7 @@ public void showError(String title, String message, Throwable e, int exit_code)
1819
System.exit(exit_code);
1920
}
2021

22+
@Override
2123
public void showMessage(String title, String message) {
2224
if (title == null) title = tr("Message");
2325

@@ -27,6 +29,7 @@ public void showMessage(String title, String message) {
2729
/**
2830
* Non-fatal error message with optional stack trace side dish.
2931
*/
32+
@Override
3033
public void showWarning(String title, String message, Exception e) {
3134
if (title == null) title = tr("Warning");
3235

arduino-core/src/processing/app/helpers/filefilters/OnlyDirs.java

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
*/
3333
public class OnlyDirs implements FilenameFilter {
3434

35+
@Override
3536
public boolean accept(File dir, String name) {
3637
if (name.charAt(0) == '.')
3738
return false;

arduino-core/src/processing/app/helpers/filefilters/OnlyFilesWithExtension.java

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public OnlyFilesWithExtension(String... ext) {
3232
this.extensions = ext;
3333
}
3434

35+
@Override
3536
public boolean accept(File dir, String name) {
3637
for (String ext : extensions) {
3738
if (name.endsWith(ext)) {

arduino-core/src/processing/app/linux/Platform.java

+5
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,20 @@ public class Platform extends processing.app.Platform {
3636

3737
// TODO Need to be smarter here since KDE people ain't gonna like that GTK.
3838
// It may even throw a weird exception at 'em for their trouble.
39+
@Override
3940
public void setLookAndFeel() throws Exception {
4041
GTKLookAndFeelFixer.installGtkPopupBugWorkaround();
4142
}
4243

4344

45+
@Override
4446
public File getDefaultSketchbookFolder() throws Exception {
4547
File home = new File(System.getProperty("user.home"));
4648
return new File(home, "Arduino");
4749
}
4850

4951

52+
@Override
5053
public void openURL(String url) throws Exception {
5154
if (openFolderAvailable()) {
5255
String launcher = PreferencesData.get("launcher");
@@ -57,6 +60,7 @@ public void openURL(String url) throws Exception {
5760
}
5861

5962

63+
@Override
6064
public boolean openFolderAvailable() {
6165
if (PreferencesData.get("launcher") != null) {
6266
return true;
@@ -91,6 +95,7 @@ public boolean openFolderAvailable() {
9195
}
9296

9397

98+
@Override
9499
public void openFolder(File file) throws Exception {
95100
if (openFolderAvailable()) {
96101
String launcher = PreferencesData.get("launcher");

arduino-core/src/processing/app/macosx/Platform.java

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class Platform extends processing.app.Platform {
4949

5050
private String osArch;
5151

52+
@Override
5253
public void setLookAndFeel() throws Exception {
5354
}
5455

@@ -58,6 +59,7 @@ public Platform() {
5859
Toolkit.getDefaultToolkit();
5960
}
6061

62+
@Override
6163
public void init() throws Exception {
6264
super.init();
6365

@@ -76,11 +78,13 @@ private void discoverRealOsArch() throws IOException {
7678
}
7779

7880

81+
@Override
7982
public File getSettingsFolder() throws Exception {
8083
return new File(getLibraryFolder(), "Arduino15");
8184
}
8285

8386

87+
@Override
8488
public File getDefaultSketchbookFolder() throws Exception {
8589
return new File(getDocumentsFolder(), "Arduino");
8690
/*
@@ -98,6 +102,7 @@ public File getDefaultSketchbookFolder() throws Exception {
98102
}
99103

100104

105+
@Override
101106
public void openURL(String url) throws Exception {
102107
Desktop desktop = Desktop.getDesktop();
103108
if (url.startsWith("http") || url.startsWith("file:")) {
@@ -108,11 +113,13 @@ public void openURL(String url) throws Exception {
108113
}
109114

110115

116+
@Override
111117
public boolean openFolderAvailable() {
112118
return true;
113119
}
114120

115121

122+
@Override
116123
public void openFolder(File file) throws Exception {
117124
//openURL(file.getAbsolutePath()); // handles char replacement, etc
118125
PApplet.open(file.getAbsolutePath());

arduino-core/src/processing/app/windows/Platform.java

+10
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class Platform extends processing.app.Platform {
4141
private File settingsFolder;
4242
private File defaultSketchbookFolder;
4343

44+
@Override
4445
public void init() throws Exception {
4546
super.init();
4647

@@ -108,15 +109,18 @@ protected void checkPath() {
108109
}
109110
}
110111

112+
@Override
111113
public File getSettingsFolder() {
112114
return settingsFolder;
113115
}
114116

115117

118+
@Override
116119
public File getDefaultSketchbookFolder() throws Exception {
117120
return defaultSketchbookFolder;
118121
}
119122

123+
@Override
120124
public void openURL(String url) throws Exception {
121125
// this is not guaranteed to work, because who knows if the
122126
// path will always be c:\progra~1 et al. also if the user has
@@ -148,11 +152,13 @@ public void openURL(String url) throws Exception {
148152
}
149153

150154

155+
@Override
151156
public boolean openFolderAvailable() {
152157
return true;
153158
}
154159

155160

161+
@Override
156162
public void openFolder(File file) throws Exception {
157163
String folder = file.getAbsolutePath();
158164

@@ -180,12 +186,14 @@ public void fixPrefsFilePermissions(File prefsFile) throws IOException {
180186
//noop
181187
}
182188

189+
@Override
183190
public List<File> postInstallScripts(File folder) {
184191
List<File> scripts = new LinkedList<>();
185192
scripts.add(new File(folder, "post_install.bat"));
186193
return scripts;
187194
}
188195

196+
@Override
189197
public List<File> preUninstallScripts(File folder) {
190198
List<File> scripts = new LinkedList<>();
191199
scripts.add(new File(folder, "pre_uninstall.bat"));
@@ -195,9 +203,11 @@ public List<File> preUninstallScripts(File folder) {
195203
public void symlink(File something, File somewhere) throws IOException, InterruptedException {
196204
}
197205

206+
@Override
198207
public void link(File something, File somewhere) throws IOException, InterruptedException {
199208
}
200209

210+
@Override
201211
public void chmod(File file, int mode) throws IOException, InterruptedException {
202212
}
203213

0 commit comments

Comments
 (0)