Skip to content

Commit 9165af4

Browse files
author
Federico Fissore
committed
By omitting curly braces, your code won't run faster. Your colleague will run slower.
1 parent cd56786 commit 9165af4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,15 @@ static public void init(String[] args) throws Exception {
513513
// - calls Sketch.prepare() that calls Sketch.ensureExistence()
514514
// - calls Sketch.build(verbose=false) that calls Sketch.ensureExistence(), set progressListener and calls Compiler.build()
515515
// - calls Sketch.upload() (see later...)
516-
if (!data.getFolder().exists()) showError(_("No sketch"), _("Can't find the sketch in the specified path"), null);
516+
if (!data.getFolder().exists()) {
517+
showError(_("No sketch"), _("Can't find the sketch in the specified path"), null);
518+
}
517519
String suggestedClassName = Compiler.build(data, tempBuildFolder.getAbsolutePath(), tempBuildFolder, null, parser.isDoVerboseBuild(), false);
518-
if (suggestedClassName == null) showError(_("Error while verifying"), _("An error occurred while verifying the sketch"), null);
520+
if (suggestedClassName == null) {
521+
showError(_("Error while verifying"), _("An error occurred while verifying the sketch"), null);
522+
}
519523
showMessage(_("Done compiling"), _("Done compiling"));
520524

521-
// - chiama Sketch.upload() ... to be continued ...
522525
Uploader uploader = Compiler.getUploaderByPreferences(parser.isNoUploadPort());
523526
if (uploader.requiresAuthorization() && !PreferencesData.has(uploader.getAuthorizationKey())) showError("...", "...", null);
524527
try {

0 commit comments

Comments
 (0)