From 3270e4c05d6c376de59003b6798d196e4b0dd0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Galland?= Date: Sat, 13 Oct 2018 08:21:22 +0200 Subject: [PATCH] [core] Fixing the documentation of `Logging.setLoggingLevel`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Galland --- main/apiplugins/io.sarl.core/src/io/sarl/core/bic.sarl | 4 ++-- .../io.sarl.lang.core/src/io/sarl/lang/core/Skill.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/apiplugins/io.sarl.core/src/io/sarl/core/bic.sarl b/main/apiplugins/io.sarl.core/src/io/sarl/core/bic.sarl index 6620c7253a..658750eb48 100644 --- a/main/apiplugins/io.sarl.core/src/io/sarl/core/bic.sarl +++ b/main/apiplugins/io.sarl.core/src/io/sarl/core/bic.sarl @@ -1021,9 +1021,9 @@ capacity Logging { /** Set the logging level. * - * @param level 0 for no logging, 1 for error, + * @param level 0 or lower for no logging, 1 for error, * 2 for warning, 3 for info, - * 5 for debug. + * 4 or higher for debug. */ def setLogLevel(level : int) diff --git a/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Skill.java b/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Skill.java index 22474beadf..710f09c79b 100644 --- a/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Skill.java +++ b/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Skill.java @@ -83,7 +83,7 @@ protected AgentTrait getCaller() { */ void registerUse() { final int value = this.uses.getAndIncrement(); - if (value <= 0) { + if (value == 0) { install(); } } @@ -92,7 +92,7 @@ void registerUse() { */ void unregisterUse() { final int value = this.uses.decrementAndGet(); - if (value <= 0) { + if (value == 0) { uninstall(UninstallationStage.PRE_DESTROY_EVENT); uninstall(UninstallationStage.POST_DESTROY_EVENT); }