diff --git a/app/src/main/java/lightcontainer/protocol/ProtocolReader.java b/app/src/main/java/lightcontainer/protocol/ProtocolReader.java index 472dc0a..1d45c83 100644 --- a/app/src/main/java/lightcontainer/protocol/ProtocolReader.java +++ b/app/src/main/java/lightcontainer/protocol/ProtocolReader.java @@ -21,8 +21,8 @@ public abstract class ProtocolReader { if (ruleMatcher.matches()) { String[] groups = new String[ruleMatcher.groupCount()]; - for (int i= 0; i < groups.length; ++i) - groups[i] = ruleMatcher.group(i); + for (int i = 1; i <= groups.length; ++i) + groups[i - 1] = ruleMatcher.group(i); onExecuted(groups); return true; diff --git a/app/src/main/java/lightcontainer/protocol/rules/HelloRule.java b/app/src/main/java/lightcontainer/protocol/rules/HelloRule.java index 529f8f7..f4b6c8a 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/HelloRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/HelloRule.java @@ -15,7 +15,7 @@ public class HelloRule extends ProtocolReader { String domain = data[0]; String port = data[1]; - System.out.printf("Règle Hello avec domain=%s et port=%s", domain, port); + System.out.printf("Règle Hello avec domain=%s et port=%s\n", domain, port); } }