From 9165af4751dd19832dc88931e9c69a18ed07dbc2 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 19 Jun 2015 10:37:21 +0200 Subject: [PATCH] By omitting curly braces, your code won't run faster. Your colleague will run slower. --- arduino-core/src/processing/app/BaseNoGui.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 85d951dd4..b39b306cd 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -513,12 +513,15 @@ public class BaseNoGui { // - calls Sketch.prepare() that calls Sketch.ensureExistence() // - calls Sketch.build(verbose=false) that calls Sketch.ensureExistence(), set progressListener and calls Compiler.build() // - calls Sketch.upload() (see later...) - if (!data.getFolder().exists()) showError(_("No sketch"), _("Can't find the sketch in the specified path"), null); + if (!data.getFolder().exists()) { + showError(_("No sketch"), _("Can't find the sketch in the specified path"), null); + } String suggestedClassName = Compiler.build(data, tempBuildFolder.getAbsolutePath(), tempBuildFolder, null, parser.isDoVerboseBuild(), false); - if (suggestedClassName == null) showError(_("Error while verifying"), _("An error occurred while verifying the sketch"), null); + if (suggestedClassName == null) { + showError(_("Error while verifying"), _("An error occurred while verifying the sketch"), null); + } showMessage(_("Done compiling"), _("Done compiling")); - // - chiama Sketch.upload() ... to be continued ... Uploader uploader = Compiler.getUploaderByPreferences(parser.isNoUploadPort()); if (uploader.requiresAuthorization() && !PreferencesData.has(uploader.getAuthorizationKey())) showError("...", "...", null); try {