Date: Tue, 8 Oct 2019 14:19:28 +0800
Subject: [PATCH 12/30] #496 Pipeline pattern (#967)
* #496 Add pipeline module to parent pom :sparkles:
* #496: Add main application class and test for pipeline
* #496: Checkstyle format and add log messages on pipeline stages :art:
* #496: Fill readme sections of pipeline :sparkles:
* #496: Javadocs and checkstyle formatting :art:
* #496: Follow PMD checks and add more explanation as block comment on App.java
* #496: Apply requested PR changes by iluwatar :art:
---
pipeline/README.md | 37 +++++++++++
pipeline/pom.xml | 47 +++++++++++++
.../main/java/com.iluwatar.pipeline/App.java | 66 +++++++++++++++++++
.../ConvertToCharArrayHandler.java | 45 +++++++++++++
.../java/com.iluwatar.pipeline/Handler.java | 32 +++++++++
.../java/com.iluwatar.pipeline/Pipeline.java | 46 +++++++++++++
.../RemoveAlphabetsHandler.java | 54 +++++++++++++++
.../RemoveDigitsHandler.java | 54 +++++++++++++++
.../java/com.iluwatar.pipeline/AppTest.java | 37 +++++++++++
.../com.iluwatar.pipeline/PipelineTest.java | 45 +++++++++++++
pom.xml | 1 +
11 files changed, 464 insertions(+)
create mode 100644 pipeline/README.md
create mode 100644 pipeline/pom.xml
create mode 100644 pipeline/src/main/java/com.iluwatar.pipeline/App.java
create mode 100644 pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java
create mode 100644 pipeline/src/main/java/com.iluwatar.pipeline/Handler.java
create mode 100644 pipeline/src/main/java/com.iluwatar.pipeline/Pipeline.java
create mode 100644 pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java
create mode 100644 pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java
create mode 100644 pipeline/src/test/java/com.iluwatar.pipeline/AppTest.java
create mode 100644 pipeline/src/test/java/com.iluwatar.pipeline/PipelineTest.java
diff --git a/pipeline/README.md b/pipeline/README.md
new file mode 100644
index 000000000000..e990affd62c7
--- /dev/null
+++ b/pipeline/README.md
@@ -0,0 +1,37 @@
+---
+layout: pattern
+title: Pipeline
+folder: pipeline
+permalink: /patterns/pipeline/
+categories: Behavioral
+tags:
+ - Java
+ - Functional
+ - Difficulty-Intermediate
+---
+
+## Intent
+Allows processing of data in a series of stages by giving in an initial input and passing the processed output to be used by the next stages.
+
+## Applicability
+Use the Pipeline pattern when you want to
+
+* execute individual stages that yields a final value
+* add readability to complex sequence of operations by providing a fluent builder as an interface
+* improve testability of code since stages will most likely be doing a single thing, complying to the [Single Responsibility Principle (SRP)](https://java-design-patterns.com/principles/#single-responsibility-principle)
+
+## Typical Use Case
+
+* implement stages and execute them in an ordered manner
+
+## Real world examples
+
+* [java.util.Stream](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html)
+* [Maven Build Lifecycle](http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html)
+* [Functional Java](https://github.com/functionaljava/functionaljava)
+
+## Credits
+
+* [The Pipeline Pattern — for fun and profit](https://medium.com/@aaronweatherall/the-pipeline-pattern-for-fun-and-profit-9b5f43a98130)
+* [The Pipeline design pattern (in Java)](https://medium.com/@deepakbapat/the-pipeline-design-pattern-in-java-831d9ce2fe21)
+* [Pipelines | Microsoft Docs](https://docs.microsoft.com/en-us/previous-versions/msp-n-p/ff963548(v=pandp.10))
\ No newline at end of file
diff --git a/pipeline/pom.xml b/pipeline/pom.xml
new file mode 100644
index 000000000000..7ad60d5620e4
--- /dev/null
+++ b/pipeline/pom.xml
@@ -0,0 +1,47 @@
+
+
+
+ 4.0.0
+
+ com.iluwatar
+ java-design-patterns
+ 1.22.0-SNAPSHOT
+
+ pipeline
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/App.java b/pipeline/src/main/java/com.iluwatar.pipeline/App.java
new file mode 100644
index 000000000000..7efa2ecca003
--- /dev/null
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/App.java
@@ -0,0 +1,66 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+/**
+ * The Pipeline pattern uses ordered stages to process a sequence of input values.
+ * Each implemented task is represented by a stage of the pipeline. You can think of
+ * pipelines as similar to assembly lines in a factory, where each item in the assembly
+ * line is constructed in stages. The partially assembled item is passed from one assembly
+ * stage to another. The outputs of the assembly line occur in the same order as that of the
+ * inputs.
+ *
+ * Classes used in this example are suffixed with "Handlers", and synonymously refers to the
+ * "stage".
+ */
+public class App {
+ /**
+ * Specify the initial input type for the first stage handler and the expected output type
+ * of the last stage handler as type parameters for Pipeline. Use the fluent builder by
+ * calling addHandler to add more stage handlers on the pipeline.
+ */
+ public static void main(String[] args) {
+ /*
+ Suppose we wanted to pass through a String to a series of filtering stages and convert it
+ as a char array on the last stage.
+
+ - Stage handler 1 (pipe): Removing the alphabets, accepts a String input and returns the
+ processed String output. This will be used by the next handler as its input.
+
+ - Stage handler 2 (pipe): Removing the digits, accepts a String input and returns the
+ processed String output. This shall also be used by the last handler we have.
+
+ - Stage handler 3 (pipe): Converting the String input to a char array handler. We would
+ be returning a different type in here since that is what's specified by the requirement.
+ This means that at any stages along the pipeline, the handler can return any type of data
+ as long as it fulfills the requirements for the next handler's input.
+
+ Suppose we wanted to add another handler after ConvertToCharArrayHandler. That handler
+ then is expected to receive an input of char[] array since that is the type being returned
+ by the previous handler, ConvertToCharArrayHandler.
+ */
+ new Pipeline<>(new RemoveAlphabetsHandler())
+ .addHandler(new RemoveDigitsHandler())
+ .addHandler(new ConvertToCharArrayHandler());
+ }
+}
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java b/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java
new file mode 100644
index 000000000000..b69241914980
--- /dev/null
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java
@@ -0,0 +1,45 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+
+/**
+ * Stage handler that converts an input String to its char[] array counterpart.
+ */
+class ConvertToCharArrayHandler implements Handler {
+
+ private final Logger logger = LoggerFactory.getLogger(ConvertToCharArrayHandler.class);
+
+ @Override
+ public char[] process(String input) {
+ char[] characters = input.toCharArray();
+ logger.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
+ ConvertToCharArrayHandler.class, input, String.class, Arrays.toString(characters), Character[].class));
+
+ return characters;
+ }
+}
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/Handler.java b/pipeline/src/main/java/com.iluwatar.pipeline/Handler.java
new file mode 100644
index 000000000000..7d2bc0db7f59
--- /dev/null
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/Handler.java
@@ -0,0 +1,32 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+/**
+ * Forms a contract to all stage handlers to accept a certain type of input and return a processed output.
+ * @param the input type of the handler
+ * @param the processed output type of the handler
+ */
+interface Handler {
+ O process(I input);
+}
\ No newline at end of file
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/Pipeline.java b/pipeline/src/main/java/com.iluwatar.pipeline/Pipeline.java
new file mode 100644
index 000000000000..8e231bbc4d09
--- /dev/null
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/Pipeline.java
@@ -0,0 +1,46 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+/**
+ * Main Pipeline class that initially sets the current handler. Processed output
+ * of the initial handler is then passed as the input to the next stage handlers.
+ * @param the type of the input for the first stage handler
+ * @param the final stage handler's output type
+ */
+class Pipeline {
+
+ private final Handler currentHandler;
+
+ Pipeline(Handler currentHandler) {
+ this.currentHandler = currentHandler;
+ }
+
+ Pipeline addHandler(Handler newHandler) {
+ return new Pipeline<>(input -> newHandler.process(currentHandler.process(input)));
+ }
+
+ O execute(I input) {
+ return currentHandler.process(input);
+ }
+}
\ No newline at end of file
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java
new file mode 100644
index 000000000000..2085052742fa
--- /dev/null
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java
@@ -0,0 +1,54 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Stage handler that returns a new instance of String without the alphabet characters of the input string.
+ */
+class RemoveAlphabetsHandler implements Handler {
+
+ private final Logger logger = LoggerFactory.getLogger(RemoveAlphabetsHandler.class);
+
+ @Override
+ public String process(String input) {
+ StringBuilder inputWithoutAlphabets = new StringBuilder();
+
+ for (int index = 0; index < input.length(); index++) {
+ char currentCharacter = input.charAt(index);
+ if (Character.isAlphabetic(currentCharacter)) {
+ continue;
+ }
+
+ inputWithoutAlphabets.append(currentCharacter);
+ }
+
+ String inputWithoutAlphabetsStr = inputWithoutAlphabets.toString();
+ logger.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
+ RemoveAlphabetsHandler.class, input, String.class, inputWithoutAlphabetsStr, String.class));
+
+ return inputWithoutAlphabetsStr;
+ }
+}
\ No newline at end of file
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java
new file mode 100644
index 000000000000..e0c0aa6a87b2
--- /dev/null
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java
@@ -0,0 +1,54 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Stage handler that returns a new instance of String without the digit characters of the input string.
+ */
+class RemoveDigitsHandler implements Handler {
+
+ private final Logger logger = LoggerFactory.getLogger(RemoveDigitsHandler.class);
+
+ @Override
+ public String process(String input) {
+ StringBuilder inputWithoutDigits = new StringBuilder();
+
+ for (int index = 0; index < input.length(); index++) {
+ char currentCharacter = input.charAt(index);
+ if (Character.isDigit(currentCharacter)) {
+ continue;
+ }
+
+ inputWithoutDigits.append(currentCharacter);
+ }
+
+ String inputWithoutDigitsStr = inputWithoutDigits.toString();
+ logger.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
+ RemoveDigitsHandler.class, input, String.class, inputWithoutDigitsStr, String.class));
+
+ return inputWithoutDigitsStr;
+ }
+}
\ No newline at end of file
diff --git a/pipeline/src/test/java/com.iluwatar.pipeline/AppTest.java b/pipeline/src/test/java/com.iluwatar.pipeline/AppTest.java
new file mode 100644
index 000000000000..79524575c13c
--- /dev/null
+++ b/pipeline/src/test/java/com.iluwatar.pipeline/AppTest.java
@@ -0,0 +1,37 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * Application Test
+ */
+public class AppTest {
+
+ @Test
+ public void test() {
+ String[] args = {};
+ App.main(args);
+ }
+}
diff --git a/pipeline/src/test/java/com.iluwatar.pipeline/PipelineTest.java b/pipeline/src/test/java/com.iluwatar.pipeline/PipelineTest.java
new file mode 100644
index 000000000000..1a2676e25d05
--- /dev/null
+++ b/pipeline/src/test/java/com.iluwatar.pipeline/PipelineTest.java
@@ -0,0 +1,45 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package com.iluwatar.pipeline;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+
+/**
+ * Test for {@link Pipeline}
+ */
+public class PipelineTest {
+
+ @Test
+ public void testAddHandlersToPipeline() {
+ Pipeline filters = new Pipeline<>(new RemoveAlphabetsHandler())
+ .addHandler(new RemoveDigitsHandler())
+ .addHandler(new ConvertToCharArrayHandler());
+
+ assertArrayEquals(
+ new char[] {'#', '!', '(', '&', '%', '#', '!'},
+ filters.execute("#H!E(L&L0O%THE3R#34E!")
+ );
+ }
+}
diff --git a/pom.xml b/pom.xml
index 33219175ec9d..39cfee91c241 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,6 +97,7 @@
property
intercepting-filter
producer-consumer
+ pipeline
poison-pill
reader-writer-lock
lazy-loading
From 41b8d8047965f247c9a3dcf7aeb19046599c8583 Mon Sep 17 00:00:00 2001
From: erikgajdos1997 <56270468+erikgajdos1997@users.noreply.github.com>
Date: Tue, 8 Oct 2019 17:08:56 +0200
Subject: [PATCH 13/30] Close #969 (#972)
---
repository/src/main/resources/logback.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/repository/src/main/resources/logback.xml b/repository/src/main/resources/logback.xml
index 56b6a59bb6cf..81b998ad9021 100644
--- a/repository/src/main/resources/logback.xml
+++ b/repository/src/main/resources/logback.xml
@@ -42,11 +42,11 @@
-
+
-
+
From 90ea4506caa653711f69fabb99ee7ac26c4ecce7 Mon Sep 17 00:00:00 2001
From: Azureyjt
Date: Tue, 8 Oct 2019 23:29:59 +0800
Subject: [PATCH 14/30] Leader Election Pattern (#923)
* Fix issue #761: ThreadSafeDoubleCheckLocking.java: Instantiating by Reflection call will be successful if you do that firstly
* Create leader election module
* Create Interface of Instance and MessageManager
* Create implementations with token ring algorithm
* Change package structure.
Create basic message system.
* Implement heartbeat and heartbeat invoking message system
* Implement election message handler
* Add leader message handler
* Add main entry point
* Add comments
* Update README.md
* Fix checkstyle issue
* Add Unit Tests
* Add Unit Tests
* Add bully leader selection
* Change System.out to log print.
Add MIT license in each file.
* Add More java doc comments
* Add unit test
* Add unit tests
---
leader-election/README.md | 31 ++++
leader-election/pom.xml | 43 +++++
.../leaderelection/AbstractInstance.java | 148 +++++++++++++++++
.../AbstractMessageManager.java | 73 +++++++++
.../com/iluwatar/leaderelection/Instance.java | 49 ++++++
.../com/iluwatar/leaderelection/Message.java | 76 +++++++++
.../leaderelection/MessageManager.java | 60 +++++++
.../iluwatar/leaderelection/MessageType.java | 62 +++++++
.../leaderelection/bully/BullyApp.java | 77 +++++++++
.../leaderelection/bully/BullyInstance.java | 121 ++++++++++++++
.../bully/BullyMessageManager.java | 117 ++++++++++++++
.../iluwatar/leaderelection/ring/RingApp.java | 77 +++++++++
.../leaderelection/ring/RingInstance.java | 133 +++++++++++++++
.../ring/RingMessageManager.java | 96 +++++++++++
.../iluwatar/leaderelection/MessageTest.java | 48 ++++++
.../leaderelection/bully/BullyAppTest.java | 39 +++++
.../bully/BullyMessageManagerTest.java | 151 ++++++++++++++++++
.../bully/BullyinstanceTest.java | 78 +++++++++
.../leaderelection/ring/RingAppTest.java | 39 +++++
.../leaderelection/ring/RingInstanceTest.java | 76 +++++++++
.../ring/RingMessageManagerTest.java | 123 ++++++++++++++
pom.xml | 2 +
22 files changed, 1719 insertions(+)
create mode 100644 leader-election/README.md
create mode 100644 leader-election/pom.xml
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/AbstractInstance.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/AbstractMessageManager.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/Instance.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/Message.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/MessageManager.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/MessageType.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyApp.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyInstance.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyMessageManager.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingApp.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingInstance.java
create mode 100644 leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingMessageManager.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/MessageTest.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyAppTest.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyMessageManagerTest.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyinstanceTest.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingAppTest.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingInstanceTest.java
create mode 100644 leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingMessageManagerTest.java
diff --git a/leader-election/README.md b/leader-election/README.md
new file mode 100644
index 000000000000..36c2670dffa0
--- /dev/null
+++ b/leader-election/README.md
@@ -0,0 +1,31 @@
+---
+layout: pattern
+title: Leader Election
+folder: leader-election
+permalink: /patterns/leader-election/
+categories: Other
+tags:
+ - Java
+ - Difficulty-Beginner
+---
+
+## Intent
+Leader Election pattern is commonly used in cloud system design. It can help to ensure that task instances selec the leader instance correctly and do not conflict with each other, cause contention for shared resources, or inadvertently interfere with the work that other task instances are performing.
+
+## Applicability
+Use this pattern when
+
+* the tasks in a distributed application, such as a cloud-hosted solution, require careful coordination and there is no natural leader.
+
+Do not use this pattern when
+
+* there is a natural leader or dedicated process that can always act as the leader. For example, it may be possible to implement a singleton process that coordinates the task instances. If this process fails or becomes unhealthy, the system can shut it down and restart it.
+* the coordination between tasks can be easily achieved by using a more lightweight mechanism. For example, if several task instances simply require coordinated access to a shared resource, a preferable solution might be to use optimistic or pessimistic locking to control access to that resource.
+
+## Real world examples
+
+* [Raft Leader Election](https://github.com/ronenhamias/raft-leader-election)
+
+## Credits
+
+* [ Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications](https://docs.microsoft.com/en-us/previous-versions/msp-n-p/dn568104(v=pandp.10))
diff --git a/leader-election/pom.xml b/leader-election/pom.xml
new file mode 100644
index 000000000000..7c1312d01a1d
--- /dev/null
+++ b/leader-election/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+ 4.0.0
+
+ java-design-patterns
+ com.iluwatar
+ 1.22.0-SNAPSHOT
+
+ leader-election
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
+
+
\ No newline at end of file
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/AbstractInstance.java b/leader-election/src/main/java/com/iluwatar/leaderelection/AbstractInstance.java
new file mode 100644
index 000000000000..5f153870a300
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/AbstractInstance.java
@@ -0,0 +1,148 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * Abstract class of all the instance implementation classes.
+ */
+public abstract class AbstractInstance implements Instance, Runnable {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(AbstractInstance.class);
+
+ protected static final int HEARTBEAT_INTERVAL = 5000;
+
+ protected MessageManager messageManager;
+ protected Queue messageQueue;
+ protected final int localId;
+ protected int leaderId;
+ protected boolean alive;
+
+ /**
+ * Constructor of BullyInstance.
+ */
+ public AbstractInstance(MessageManager messageManager, int localId, int leaderId) {
+ this.messageManager = messageManager;
+ this.messageQueue = new ConcurrentLinkedQueue<>();
+ this.localId = localId;
+ this.leaderId = leaderId;
+ this.alive = true;
+ }
+
+ /**
+ * The instance will execute the message in its message queue periodically once it is alive.
+ */
+ @Override
+ public void run() {
+ while (true) {
+ if (!this.messageQueue.isEmpty()) {
+ this.processMessage(this.messageQueue.remove());
+ }
+ }
+ }
+
+ /**
+ * Once messages are sent to the certain instance, it will firstly be added to the queue and wait to be executed.
+ * @param message Message sent by other instances
+ */
+ @Override
+ public void onMessage(Message message) {
+ messageQueue.offer(message);
+ }
+
+ /**
+ * Check if the instance is alive or not.
+ * @return {@code true} if the instance is alive.
+ */
+ @Override
+ public boolean isAlive() {
+ return alive;
+ }
+
+ /**
+ * Set the health status of the certain instance.
+ * @param alive {@code true} for alive.
+ */
+ @Override
+ public void setAlive(boolean alive) {
+ this.alive = alive;
+ }
+
+ /**
+ * Process the message according to its type.
+ * @param message Message polled from queue.
+ */
+ private void processMessage(Message message) {
+ switch (message.getType()) {
+ case ELECTION:
+ LOGGER.info("Instance " + localId + " - Election Message handling...");
+ handleElectionMessage(message);
+ break;
+ case LEADER:
+ LOGGER.info("Instance " + localId + " - Leader Message handling...");
+ handleLeaderMessage(message);
+ break;
+ case HEARTBEAT:
+ LOGGER.info("Instance " + localId + " - Heartbeat Message handling...");
+ handleHeartbeatMessage(message);
+ break;
+ case ELECTION_INVOKE:
+ LOGGER.info("Instance " + localId + " - Election Invoke Message handling...");
+ handleElectionInvokeMessage();
+ break;
+ case LEADER_INVOKE:
+ LOGGER.info("Instance " + localId + " - Leader Invoke Message handling...");
+ handleLeaderInvokeMessage();
+ break;
+ case HEARTBEAT_INVOKE:
+ LOGGER.info("Instance " + localId + " - Heartbeat Invoke Message handling...");
+ handleHeartbeatInvokeMessage();
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * Abstract methods to handle different types of message. These methods need to be implemented in concrete instance
+ * class to implement corresponding leader-selection pattern.
+ */
+ protected abstract void handleElectionMessage(Message message);
+
+ protected abstract void handleElectionInvokeMessage();
+
+ protected abstract void handleLeaderMessage(Message message);
+
+ protected abstract void handleLeaderInvokeMessage();
+
+ protected abstract void handleHeartbeatMessage(Message message);
+
+ protected abstract void handleHeartbeatInvokeMessage();
+
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/AbstractMessageManager.java b/leader-election/src/main/java/com/iluwatar/leaderelection/AbstractMessageManager.java
new file mode 100644
index 000000000000..4384da25f79d
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/AbstractMessageManager.java
@@ -0,0 +1,73 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * Abstract class of all the message manager classes.
+ */
+public abstract class AbstractMessageManager implements MessageManager {
+
+ /**
+ * Contain all the instances in the system. Key is its ID, and value is the instance itself.
+ */
+ protected Map instanceMap;
+
+ /**
+ * Construtor of AbstractMessageManager
+ */
+ public AbstractMessageManager(Map instanceMap) {
+ this.instanceMap = instanceMap;
+ }
+
+ /**
+ * Find the next instance with smallest ID.
+ * @return The next instance.
+ */
+ protected Instance findNextInstance(int currentId) {
+ Instance result = null;
+ List candidateList = instanceMap.keySet()
+ .stream()
+ .filter((i) -> i > currentId && instanceMap.get(i).isAlive())
+ .sorted()
+ .collect(Collectors.toList());
+ if (candidateList.isEmpty()) {
+ int index = instanceMap.keySet()
+ .stream()
+ .filter((i) -> instanceMap.get(i).isAlive())
+ .sorted()
+ .collect(Collectors.toList())
+ .get(0);
+ result = instanceMap.get(index);
+ } else {
+ int index = candidateList.get(0);
+ result = instanceMap.get(index);
+ }
+ return result;
+ }
+
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/Instance.java b/leader-election/src/main/java/com/iluwatar/leaderelection/Instance.java
new file mode 100644
index 000000000000..abaa62791185
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/Instance.java
@@ -0,0 +1,49 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+/**
+ * Instance interface
+ */
+public interface Instance {
+
+ /**
+ * Check if the instance is alive or not.
+ * @return {@code true} if the instance is alive.
+ */
+ boolean isAlive();
+
+ /**
+ * Set the health status of the certain instance.
+ * @param alive {@code true} for alive.
+ */
+ void setAlive(boolean alive);
+
+ /**
+ * Consume messages from other instances.
+ * @param message Message sent by other instances
+ */
+ void onMessage(Message message);
+
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/Message.java b/leader-election/src/main/java/com/iluwatar/leaderelection/Message.java
new file mode 100644
index 000000000000..7ac79e4bcd46
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/Message.java
@@ -0,0 +1,76 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+import java.util.Objects;
+
+/**
+ * Message used to transport data between instances.
+ */
+public class Message {
+
+ private MessageType type;
+
+ private String content;
+
+ public Message() {}
+
+ public Message(MessageType type, String content) {
+ this.type = type;
+ this.content = content;
+ }
+
+ public MessageType getType() {
+ return type;
+ }
+
+ public void setType(MessageType type) {
+ this.type = type;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Message message = (Message) o;
+ return type == message.type && Objects.equals(content, message.content);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, content);
+ }
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/MessageManager.java b/leader-election/src/main/java/com/iluwatar/leaderelection/MessageManager.java
new file mode 100644
index 000000000000..56e78a00856a
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/MessageManager.java
@@ -0,0 +1,60 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+/**
+ * MessageManager interface
+ */
+public interface MessageManager {
+
+ /**
+ * Send heartbeat message to leader instance to check whether the leader instance is alive.
+ * @param leaderId Instance ID of leader instance.
+ * @return {@code true} if leader instance is alive, or {@code false} if not.
+ */
+ boolean sendHeartbeatMessage(int leaderId);
+
+ /**
+ * Send election message to other instances.
+ * @param currentId Instance ID of which sends this message.
+ * @param content Election message content.
+ * @return {@code true} if the message is accepted by the target instances.
+ */
+ boolean sendElectionMessage(int currentId, String content);
+
+ /**
+ * Send new leader notification message to other instances.
+ * @param currentId Instance ID of which sends this message.
+ * @param leaderId Leader message content.
+ * @return {@code true} if the message is accepted by the target instances.
+ */
+ boolean sendLeaderMessage(int currentId, int leaderId);
+
+ /**
+ * Send heartbeat invoke message. This will invoke heartbeat task in the target instance.
+ * @param currentId Instance ID of which sends this message.
+ */
+ void sendHeartbeatInvokeMessage(int currentId);
+
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/MessageType.java b/leader-election/src/main/java/com/iluwatar/leaderelection/MessageType.java
new file mode 100644
index 000000000000..17f658ec4244
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/MessageType.java
@@ -0,0 +1,62 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+/**
+ * Message Type enum
+ */
+public enum MessageType {
+
+ /**
+ * Start the election. The content of the message stores ID(s) of the candidate instance(s).
+ */
+ ELECTION,
+
+ /**
+ * Nodify the new leader. The content of the message should be the leader ID.
+ */
+ LEADER,
+
+ /**
+ * Check health of current leader instance.
+ */
+ HEARTBEAT,
+
+ /**
+ * Inform target instance to start election.
+ */
+ ELECTION_INVOKE,
+
+ /**
+ * Inform target instance to notify all the other instance that it is the new leader.
+ */
+ LEADER_INVOKE,
+
+ /**
+ * Inform target instance to start heartbeat.
+ */
+ HEARTBEAT_INVOKE
+
+}
+
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyApp.java b/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyApp.java
new file mode 100644
index 000000000000..7355b34456a9
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyApp.java
@@ -0,0 +1,77 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.bully;
+
+import com.iluwatar.leaderelection.Instance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageManager;
+import com.iluwatar.leaderelection.MessageType;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Example of how to use bully leader election. Initially 5 instances is created in the clould
+ * system, and the instance with ID 1 is set as leader. After the system is started stop the
+ * leader instance, and the new leader will be elected.
+ */
+public class BullyApp {
+
+ /**
+ * Program entry point
+ */
+ public static void main(String[] args) {
+
+ Map instanceMap = new HashMap<>();
+ MessageManager messageManager = new BullyMessageManager(instanceMap);
+
+ BullyInstance instance1 = new BullyInstance(messageManager, 1, 1);
+ BullyInstance instance2 = new BullyInstance(messageManager, 2, 1);
+ BullyInstance instance3 = new BullyInstance(messageManager, 3, 1);
+ BullyInstance instance4 = new BullyInstance(messageManager, 4, 1);
+ BullyInstance instance5 = new BullyInstance(messageManager, 5, 1);
+
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ instanceMap.put(4, instance4);
+ instanceMap.put(5, instance5);
+
+ instance4.onMessage(new Message(MessageType.HEARTBEAT_INVOKE, ""));
+
+ Thread thread1 = new Thread(instance1);
+ Thread thread2 = new Thread(instance2);
+ Thread thread3 = new Thread(instance3);
+ Thread thread4 = new Thread(instance4);
+ Thread thread5 = new Thread(instance5);
+
+ thread1.start();
+ thread2.start();
+ thread3.start();
+ thread4.start();
+ thread5.start();
+
+ instance1.setAlive(false);
+ }
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyInstance.java b/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyInstance.java
new file mode 100644
index 000000000000..70a9c60f341a
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyInstance.java
@@ -0,0 +1,121 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.bully;
+
+import com.iluwatar.leaderelection.AbstractInstance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Impelemetation with bully algorithm. Each instance should have a sequential id and is able to
+ * communicate with other instances in the system. Initially the instance with smallest (or largest)
+ * ID is selected to be the leader. All the other instances send heartbeat message to leader periodically
+ * to check its health. If one certain instance finds the server done, it will send an election message
+ * to all the instances of which the ID is larger. If the target instance is alive, it will return an
+ * alive message (in this sample return true) and then send election message with its ID. If not,
+ * the original instance will send leader message to all the other instances.
+ */
+public class BullyInstance extends AbstractInstance {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(BullyInstance.class);
+
+ /**
+ * Constructor of BullyInstance.
+ */
+ public BullyInstance(MessageManager messageManager, int localId, int leaderId) {
+ super(messageManager, localId, leaderId);
+ }
+
+ /**
+ * Process the heartbeat invoke message. After receiving the message, the instance will send a heartbeat
+ * to leader to check its health. If alive, it will inform the next instance to do the heartbeat. If not,
+ * it will start the election process.
+ */
+ @Override
+ protected void handleHeartbeatInvokeMessage() {
+ try {
+ boolean isLeaderAlive = messageManager.sendHeartbeatMessage(leaderId);
+ if (isLeaderAlive) {
+ LOGGER.info("Instance " + localId + "- Leader is alive.");
+ Thread.sleep(HEARTBEAT_INTERVAL);
+ messageManager.sendHeartbeatInvokeMessage(localId);
+ } else {
+ LOGGER.info("Instance " + localId + "- Leader is not alive. Start election.");
+ boolean electionResult = messageManager.sendElectionMessage(localId, String.valueOf(localId));
+ if (electionResult) {
+ LOGGER.info("Instance " + localId + "- Succeed in election. Start leader notification.");
+ messageManager.sendLeaderMessage(localId, localId);
+ }
+ }
+ } catch (InterruptedException e) {
+ LOGGER.info("Instance " + localId + "- Interrupted.");
+ }
+ }
+
+ /**
+ * Process election invoke message. Send election message to all the instances with smaller ID. If any
+ * one of them is alive, do nothing. If no instance alive, send leader message to all the alive instance
+ * and restart heartbeat.
+ */
+ @Override
+ protected void handleElectionInvokeMessage() {
+ if (!isLeader()) {
+ LOGGER.info("Instance " + localId + "- Start election.");
+ boolean electionResult = messageManager.sendElectionMessage(localId, String.valueOf(localId));
+ if (electionResult) {
+ LOGGER.info("Instance " + localId + "- Succeed in election. Start leader notification.");
+ leaderId = localId;
+ messageManager.sendLeaderMessage(localId, localId);
+ messageManager.sendHeartbeatInvokeMessage(localId);
+ }
+ }
+ }
+
+ /**
+ * Process leader message. Update local leader information.
+ */
+ @Override
+ protected void handleLeaderMessage(Message message) {
+ leaderId = Integer.valueOf(message.getContent());
+ LOGGER.info("Instance " + localId + " - Leader update done.");
+ }
+
+ private boolean isLeader() {
+ return localId == leaderId;
+ }
+
+ /**
+ * Not used in Bully instance.
+ */
+ @Override
+ protected void handleLeaderInvokeMessage() {}
+
+ @Override
+ protected void handleHeartbeatMessage(Message message) {}
+
+ @Override
+ protected void handleElectionMessage(Message message) {}
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyMessageManager.java b/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyMessageManager.java
new file mode 100644
index 000000000000..3fcadefba2de
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/bully/BullyMessageManager.java
@@ -0,0 +1,117 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.bully;
+
+import com.iluwatar.leaderelection.AbstractMessageManager;
+import com.iluwatar.leaderelection.Instance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageType;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * Implementation of BullyMessageManager
+ */
+public class BullyMessageManager extends AbstractMessageManager {
+
+ /**
+ * Constructor of BullyMessageManager.
+ */
+ public BullyMessageManager(Map instanceMap) {
+ super(instanceMap);
+ }
+
+ /**
+ * Send heartbeat message to current leader instance to check the health.
+ * @param leaderId leaderID
+ * @return {@code true} if the leader is alive.
+ */
+ @Override
+ public boolean sendHeartbeatMessage(int leaderId) {
+ Instance leaderInstance = instanceMap.get(leaderId);
+ boolean alive = leaderInstance.isAlive();
+ return alive;
+ }
+
+ /**
+ * Send election message to all the instances with smaller ID.
+ * @param currentId Instance ID of which sends this message.
+ * @param content Election message content.
+ * @return {@code true} if no alive instance has smaller ID, so that the election is accepted.
+ */
+ @Override
+ public boolean sendElectionMessage(int currentId, String content) {
+ List candidateList = findElectionCandidateInstanceList(currentId);
+ if (candidateList.isEmpty()) {
+ return true;
+ } else {
+ Message electionMessage = new Message(MessageType.ELECTION_INVOKE, "");
+ candidateList.stream()
+ .forEach((i) -> instanceMap.get(i).onMessage(electionMessage));
+ return false;
+ }
+ }
+
+ /**
+ * Send leader message to all the instances to notify the new leader.
+ * @param currentId Instance ID of which sends this message.
+ * @param leaderId Leader message content.
+ * @return {@code true} if the message is accepted.
+ */
+ @Override
+ public boolean sendLeaderMessage(int currentId, int leaderId) {
+ Message leaderMessage = new Message(MessageType.LEADER, String.valueOf(leaderId));
+ instanceMap.keySet()
+ .stream()
+ .filter((i) -> i != currentId)
+ .forEach((i) -> instanceMap.get(i).onMessage(leaderMessage));
+ return false;
+ }
+
+ /**
+ * Send heartbeat invoke message to the next instance.
+ * @param currentId Instance ID of which sends this message.
+ */
+ @Override
+ public void sendHeartbeatInvokeMessage(int currentId) {
+ Instance nextInstance = this.findNextInstance(currentId);
+ Message heartbeatInvokeMessage = new Message(MessageType.HEARTBEAT_INVOKE, "");
+ nextInstance.onMessage(heartbeatInvokeMessage);
+ }
+
+ /**
+ * Find all the alive instances with smaller ID than current instance.
+ * @param currentId ID of current instance.
+ * @return ID list of all the candidate instance.
+ */
+ private List findElectionCandidateInstanceList(int currentId) {
+ return instanceMap.keySet()
+ .stream()
+ .filter((i) -> i < currentId && instanceMap.get(i).isAlive())
+ .collect(Collectors.toList());
+ }
+
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingApp.java b/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingApp.java
new file mode 100644
index 000000000000..ade5bb70dc29
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingApp.java
@@ -0,0 +1,77 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.ring;
+
+import com.iluwatar.leaderelection.Instance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageManager;
+import com.iluwatar.leaderelection.MessageType;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Example of how to use ring leader election. Initially 5 instances is created in the clould
+ * system, and the instance with ID 1 is set as leader. After the system is started stop the
+ * leader instance, and the new leader will be elected.
+ */
+public class RingApp {
+
+ /**
+ * Program entry point
+ */
+ public static void main(String[] args) {
+
+ Map instanceMap = new HashMap<>();
+ MessageManager messageManager = new RingMessageManager(instanceMap);
+
+ RingInstance instance1 = new RingInstance(messageManager, 1, 1);
+ RingInstance instance2 = new RingInstance(messageManager, 2, 1);
+ RingInstance instance3 = new RingInstance(messageManager, 3, 1);
+ RingInstance instance4 = new RingInstance(messageManager, 4, 1);
+ RingInstance instance5 = new RingInstance(messageManager, 5, 1);
+
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ instanceMap.put(4, instance4);
+ instanceMap.put(5, instance5);
+
+ instance2.onMessage(new Message(MessageType.HEARTBEAT_INVOKE, ""));
+
+ Thread thread1 = new Thread(instance1);
+ Thread thread2 = new Thread(instance2);
+ Thread thread3 = new Thread(instance3);
+ Thread thread4 = new Thread(instance4);
+ Thread thread5 = new Thread(instance5);
+
+ thread1.start();
+ thread2.start();
+ thread3.start();
+ thread4.start();
+ thread5.start();
+
+ instance1.setAlive(false);
+ }
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingInstance.java b/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingInstance.java
new file mode 100644
index 000000000000..e3472e4b4669
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingInstance.java
@@ -0,0 +1,133 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.ring;
+
+import com.iluwatar.leaderelection.AbstractInstance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Implementation with token ring algorithm. The instances in the system are organized as a ring.
+ * Each instance should have a sequential id and the instance with smallest (or largest) id should
+ * be the initial leader. All the other instances send heartbeat message to leader periodically
+ * to check its health. If one certain instance finds the server done, it will send an election
+ * message to the next alive instance in the ring, which contains its own ID. Then the next instance
+ * add its ID into the message and pass it to the next. After all the alive instances' ID are add
+ * to the message, the message is send back to the first instance and it will choose the instance
+ * with smallest ID to be the new leader, and then send a leader message to other instances to
+ * inform the result.
+ */
+public class RingInstance extends AbstractInstance {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(RingInstance.class);
+
+ /**
+ * Constructor of RingInstance.
+ */
+ public RingInstance(MessageManager messageManager, int localId, int leaderId) {
+ super(messageManager, localId, leaderId);
+ }
+
+ /**
+ * Process the heartbeat invoke message. After receiving the message, the instance will send a heartbeat
+ * to leader to check its health. If alive, it will inform the next instance to do the heartbeat. If not,
+ * it will start the election process.
+ */
+ @Override
+ protected void handleHeartbeatInvokeMessage() {
+ try {
+ boolean isLeaderAlive = messageManager.sendHeartbeatMessage(this.leaderId);
+ if (isLeaderAlive) {
+ LOGGER.info("Instance " + localId + "- Leader is alive. Start next heartbeat in 5 second.");
+ Thread.sleep(HEARTBEAT_INTERVAL);
+ messageManager.sendHeartbeatInvokeMessage(this.localId);
+ } else {
+ LOGGER.info("Instance " + localId + "- Leader is not alive. Start election.");
+ messageManager.sendElectionMessage(this.localId, String.valueOf(this.localId));
+ }
+ } catch (InterruptedException e) {
+ LOGGER.info("Instance " + localId + "- Interrupted.");
+ }
+ }
+
+ /**
+ * Process election message. If the local ID is contained in the ID list, the instance will select the
+ * alive instance with smallest ID to be the new leader, and send the leader inform message. If not,
+ * it will add its local ID to the list and send the message to the next instance in the ring.
+ */
+ @Override
+ protected void handleElectionMessage(Message message) {
+ String content = message.getContent();
+ LOGGER.info("Instance " + localId + " - Election Message: " + content);
+ List candidateList =
+ Arrays.stream(content.trim().split(","))
+ .map(Integer::valueOf)
+ .sorted()
+ .collect(Collectors.toList());
+ if (candidateList.contains(localId)) {
+ int newLeaderId = candidateList.get(0);
+ LOGGER.info("Instance " + localId + " - New leader should be " + newLeaderId + ".");
+ messageManager.sendLeaderMessage(localId, newLeaderId);
+ } else {
+ content += "," + localId;
+ messageManager.sendElectionMessage(localId, content);
+ }
+ }
+
+ /**
+ * Process leader Message. The instance will set the leader ID to be the new one and send the message to
+ * the next instance until all the alive instance in the ring is informed.
+ */
+ @Override
+ protected void handleLeaderMessage(Message message) {
+ int newLeaderId = Integer.valueOf(message.getContent());
+ if (this.leaderId != newLeaderId) {
+ LOGGER.info("Instance " + localId + " - Update leaderID");
+ this.leaderId = newLeaderId;
+ messageManager.sendLeaderMessage(localId, newLeaderId);
+ } else {
+ LOGGER.info("Instance " + localId + " - Leader update done. Start heartbeat.");
+ messageManager.sendHeartbeatInvokeMessage(localId);
+ }
+ }
+
+ /**
+ * Not used in Ring instance.
+ */
+ @Override
+ protected void handleLeaderInvokeMessage() {}
+
+ @Override
+ protected void handleHeartbeatMessage(Message message) {}
+
+ @Override
+ protected void handleElectionInvokeMessage() {}
+
+}
diff --git a/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingMessageManager.java b/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingMessageManager.java
new file mode 100644
index 000000000000..257a9f764d97
--- /dev/null
+++ b/leader-election/src/main/java/com/iluwatar/leaderelection/ring/RingMessageManager.java
@@ -0,0 +1,96 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.ring;
+
+import com.iluwatar.leaderelection.AbstractMessageManager;
+import com.iluwatar.leaderelection.Instance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageType;
+
+import java.util.Map;
+
+/**
+ * Implementation of RingMessageManager
+ */
+public class RingMessageManager extends AbstractMessageManager {
+
+ /**
+ * Constructor of RingMessageManager.
+ */
+ public RingMessageManager(Map instanceMap) {
+ super(instanceMap);
+ }
+
+ /**
+ * Send heartbeat message to current leader instance to check the health.
+ * @param leaderId leaderID
+ * @return {@code true} if the leader is alive.
+ */
+ @Override
+ public boolean sendHeartbeatMessage(int leaderId) {
+ Instance leaderInstance = instanceMap.get(leaderId);
+ boolean alive = leaderInstance.isAlive();
+ return alive;
+ }
+
+ /**
+ * Send election message to the next instance.
+ * @param currentId currentID
+ * @param content list contains all the IDs of instances which have received this election message.
+ * @return {@code true} if the election message is accepted by the target instance.
+ */
+ @Override
+ public boolean sendElectionMessage(int currentId, String content) {
+ Instance nextInstance = this.findNextInstance(currentId);
+ Message electionMessage = new Message(MessageType.ELECTION, content);
+ nextInstance.onMessage(electionMessage);
+ return true;
+ }
+
+ /**
+ * Send leader message to the next instance.
+ * @param currentId Instance ID of which sends this message.
+ * @param leaderId Leader message content.
+ * @return {@code true} if the leader message is accepted by the target instance.
+ */
+ @Override
+ public boolean sendLeaderMessage(int currentId, int leaderId) {
+ Instance nextInstance = this.findNextInstance(currentId);
+ Message leaderMessage = new Message(MessageType.LEADER, String.valueOf(leaderId));
+ nextInstance.onMessage(leaderMessage);
+ return true;
+ }
+
+ /**
+ * Send heartbeat invoke message to the next instance.
+ * @param currentId Instance ID of which sends this message.
+ */
+ @Override
+ public void sendHeartbeatInvokeMessage(int currentId) {
+ Instance nextInstance = this.findNextInstance(currentId);
+ Message heartbeatInvokeMessage = new Message(MessageType.HEARTBEAT_INVOKE, "");
+ nextInstance.onMessage(heartbeatInvokeMessage);
+ }
+
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/MessageTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/MessageTest.java
new file mode 100644
index 000000000000..3cd5b93d9fdd
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/MessageTest.java
@@ -0,0 +1,48 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * Message test case.
+ */
+public class MessageTest {
+
+ @Test
+ public void testGetType() {
+ Message message = new Message(MessageType.HEARTBEAT, "");
+ assertEquals(MessageType.HEARTBEAT, message.getType());
+ }
+
+ @Test
+ public void testGetContent() {
+ String content = "test";
+ Message message = new Message(MessageType.HEARTBEAT, content);
+ assertEquals(content, message.getContent());
+ }
+
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyAppTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyAppTest.java
new file mode 100644
index 000000000000..b4b527d5a813
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyAppTest.java
@@ -0,0 +1,39 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.bully;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * BullyApp unit test.
+ */
+public class BullyAppTest {
+
+ @Test
+ public void test() {
+ String[] args = {};
+ BullyApp.main(args);
+ }
+
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyMessageManagerTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyMessageManagerTest.java
new file mode 100644
index 000000000000..3a8e35b54abe
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyMessageManagerTest.java
@@ -0,0 +1,151 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.bully;
+
+import com.iluwatar.leaderelection.*;
+import com.iluwatar.leaderelection.ring.RingInstance;
+import com.iluwatar.leaderelection.ring.RingMessageManager;
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Queue;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * BullyMessageManager unit test.
+ */
+public class BullyMessageManagerTest {
+
+ @Test
+ public void testSendHeartbeatMessage() {
+ Instance instance1 = new BullyInstance(null, 1, 1);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ MessageManager messageManager = new BullyMessageManager(instanceMap);
+ assertTrue(messageManager.sendHeartbeatMessage(1));
+ }
+
+ @Test
+ public void testSendElectionMessageNotAccepted() {
+ try {
+ Instance instance1 = new BullyInstance(null, 1, 1);
+ Instance instance2 = new BullyInstance(null, 1, 2);
+ Instance instance3 = new BullyInstance(null, 1, 3);
+ Instance instance4 = new BullyInstance(null, 1, 4);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ instanceMap.put(4, instance4);
+ instance1.setAlive(false);
+ MessageManager messageManager = new BullyMessageManager(instanceMap);
+ boolean result = messageManager.sendElectionMessage(3, "3");
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ Message message2 = ((Queue) messageQueueField.get(instance2)).poll();
+ int instance4QueueSize = ((Queue) messageQueueField.get(instance4)).size();
+ Message expectedMessage = new Message(MessageType.ELECTION_INVOKE, "");
+ assertEquals(message2, expectedMessage);
+ assertEquals(instance4QueueSize, 0);
+ assertEquals(result, false);
+ } catch (IllegalAccessException | NoSuchFieldException e) {
+ fail("Error to access private field.");
+ }
+ }
+
+ @Test
+ public void testElectionMessageAccepted() {
+ Instance instance1 = new BullyInstance(null, 1, 1);
+ Instance instance2 = new BullyInstance(null, 1, 2);
+ Instance instance3 = new BullyInstance(null, 1, 3);
+ Instance instance4 = new BullyInstance(null, 1, 4);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ instanceMap.put(4, instance4);
+ instance1.setAlive(false);
+ MessageManager messageManager = new BullyMessageManager(instanceMap);
+ boolean result = messageManager.sendElectionMessage(2, "2");
+ assertEquals(result, true);
+ }
+
+ @Test
+ public void testSendLeaderMessage() {
+ try {
+ Instance instance1 = new BullyInstance(null, 1, 1);
+ Instance instance2 = new BullyInstance(null, 1, 2);
+ Instance instance3 = new BullyInstance(null, 1, 3);
+ Instance instance4 = new BullyInstance(null, 1, 4);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ instanceMap.put(4, instance4);
+ instance1.setAlive(false);
+ MessageManager messageManager = new BullyMessageManager(instanceMap);
+ messageManager.sendLeaderMessage(2, 2);
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ Message message3 = ((Queue) messageQueueField.get(instance3)).poll();
+ Message message4 = ((Queue) messageQueueField.get(instance4)).poll();
+ Message expectedMessage = new Message(MessageType.LEADER, "2");
+ assertEquals(message3, expectedMessage);
+ assertEquals(message4, expectedMessage);
+ } catch (IllegalAccessException | NoSuchFieldException e) {
+ fail("Error to access private field.");
+ }
+ }
+
+ @Test
+ public void testSendHeartbeatInvokeMessage() {
+ try {
+ Instance instance1 = new BullyInstance(null, 1, 1);
+ Instance instance2 = new BullyInstance(null, 1, 2);
+ Instance instance3 = new BullyInstance(null, 1, 3);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ MessageManager messageManager = new BullyMessageManager(instanceMap);
+ messageManager.sendHeartbeatInvokeMessage(2);
+ Message message = new Message(MessageType.HEARTBEAT_INVOKE, "");
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ Message messageSent = ((Queue) messageQueueField.get(instance3)).poll();
+ assertEquals(messageSent.getType(), message.getType());
+ assertEquals(messageSent.getContent(), message.getContent());
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ fail("Error to access private field.");
+ }
+ }
+
+
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyinstanceTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyinstanceTest.java
new file mode 100644
index 000000000000..7581a8af1247
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/bully/BullyinstanceTest.java
@@ -0,0 +1,78 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.bully;
+
+import com.iluwatar.leaderelection.AbstractInstance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageType;
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Field;
+import java.util.Queue;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * BullyInstance unit test.
+ */
+public class BullyinstanceTest {
+
+ @Test
+ public void testOnMessage() {
+ try {
+ final BullyInstance bullyInstance = new BullyInstance(null, 1, 1);
+ Message bullyMessage = new Message(MessageType.HEARTBEAT, "");
+ bullyInstance.onMessage(bullyMessage);
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ assertEquals(bullyMessage, ((Queue) messageQueueField.get(bullyInstance)).poll());
+ } catch (IllegalAccessException | NoSuchFieldException e) {
+ fail("fail to access messasge queue.");
+ }
+
+ }
+
+ @Test
+ public void testIsAlive() {
+ try {
+ final BullyInstance bullyInstance = new BullyInstance(null, 1, 1);
+ Class instanceClass = AbstractInstance.class;
+ Field aliveField = instanceClass.getDeclaredField("alive");
+ aliveField.setAccessible(true);
+ aliveField.set(bullyInstance, false);
+ assertFalse(bullyInstance.isAlive());
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ fail("Fail to access field alive.");
+ }
+ }
+
+ @Test
+ public void testSetAlive() {
+ final BullyInstance bullyInstance = new BullyInstance(null, 1, 1);
+ bullyInstance.setAlive(false);
+ assertFalse(bullyInstance.isAlive());
+ }
+
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingAppTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingAppTest.java
new file mode 100644
index 000000000000..c6f50bc799fd
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingAppTest.java
@@ -0,0 +1,39 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.ring;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * RingApp unit test.
+ */
+public class RingAppTest {
+
+ @Test
+ public void test() {
+ String[] args = {};
+ RingApp.main(args);
+ }
+
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingInstanceTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingInstanceTest.java
new file mode 100644
index 000000000000..65c3916cc535
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingInstanceTest.java
@@ -0,0 +1,76 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.ring;
+
+import com.iluwatar.leaderelection.AbstractInstance;
+import com.iluwatar.leaderelection.Message;
+import com.iluwatar.leaderelection.MessageType;
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Field;
+import java.util.Queue;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * RingInstance unit test.
+ */
+public class RingInstanceTest {
+
+ @Test
+ public void testOnMessage() {
+ try {
+ final RingInstance ringInstance = new RingInstance(null, 1, 1);
+ Message ringMessage = new Message(MessageType.HEARTBEAT, "");
+ ringInstance.onMessage(ringMessage);
+ Class ringInstanceClass = AbstractInstance.class;
+ Field messageQueueField = ringInstanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ assertEquals(ringMessage, ((Queue) messageQueueField.get(ringInstance)).poll());
+ } catch (IllegalAccessException | NoSuchFieldException e) {
+ fail("fail to access messasge queue.");
+ }
+ }
+
+ @Test
+ public void testIsAlive() {
+ try {
+ final RingInstance ringInstance = new RingInstance(null, 1, 1);
+ Class ringInstanceClass = AbstractInstance.class;
+ Field aliveField = ringInstanceClass.getDeclaredField("alive");
+ aliveField.setAccessible(true);
+ aliveField.set(ringInstance, false);
+ assertFalse(ringInstance.isAlive());
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ fail("Fail to access field alive.");
+ }
+ }
+
+ @Test
+ public void testSetAlive() {
+ final RingInstance ringInstance = new RingInstance(null, 1, 1);
+ ringInstance.setAlive(false);
+ assertFalse(ringInstance.isAlive());
+ }
+}
diff --git a/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingMessageManagerTest.java b/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingMessageManagerTest.java
new file mode 100644
index 000000000000..64d5af69f5bb
--- /dev/null
+++ b/leader-election/src/test/java/com/iluwatar/leaderelection/ring/RingMessageManagerTest.java
@@ -0,0 +1,123 @@
+/**
+ * The MIT License
+ * Copyright (c) 2014-2016 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package com.iluwatar.leaderelection.ring;
+
+import com.iluwatar.leaderelection.*;
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Queue;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * RingMessageManager unit test.
+ */
+public class RingMessageManagerTest {
+
+ @Test
+ public void testSendHeartbeatMessage() {
+ Instance instance1 = new RingInstance(null, 1, 1);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ MessageManager messageManager = new RingMessageManager(instanceMap);
+ assertTrue(messageManager.sendHeartbeatMessage(1));
+ }
+
+ @Test
+ public void testSendElectionMessage() {
+ try {
+ Instance instance1 = new RingInstance(null, 1, 1);
+ Instance instance2 = new RingInstance(null, 1, 2);
+ Instance instance3 = new RingInstance(null, 1, 3);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ MessageManager messageManager = new RingMessageManager(instanceMap);
+ String messageContent = "2";
+ messageManager.sendElectionMessage(2, messageContent);
+ Message ringMessage = new Message(MessageType.ELECTION, messageContent);
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ Message ringMessageSent = ((Queue) messageQueueField.get(instance3)).poll();
+ assertEquals(ringMessageSent.getType(), ringMessage.getType());
+ assertEquals(ringMessageSent.getContent(), ringMessage.getContent());
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ fail("Error to access private field.");
+ }
+ }
+
+ @Test
+ public void testSendLeaderMessage() {
+ try {
+ Instance instance1 = new RingInstance(null, 1, 1);
+ Instance instance2 = new RingInstance(null, 1, 2);
+ Instance instance3 = new RingInstance(null, 1, 3);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ MessageManager messageManager = new RingMessageManager(instanceMap);
+ String messageContent = "3";
+ messageManager.sendLeaderMessage(2, 3);
+ Message ringMessage = new Message(MessageType.LEADER, messageContent);
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ Message ringMessageSent = ((Queue) messageQueueField.get(instance3)).poll();
+ assertEquals(ringMessageSent, ringMessage);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ fail("Error to access private field.");
+ }
+ }
+
+ @Test
+ public void testSendHeartbeatInvokeMessage() {
+ try {
+ Instance instance1 = new RingInstance(null, 1, 1);
+ Instance instance2 = new RingInstance(null, 1, 2);
+ Instance instance3 = new RingInstance(null, 1, 3);
+ Map instanceMap = new HashMap<>();
+ instanceMap.put(1, instance1);
+ instanceMap.put(2, instance2);
+ instanceMap.put(3, instance3);
+ MessageManager messageManager = new RingMessageManager(instanceMap);
+ messageManager.sendHeartbeatInvokeMessage(2);
+ Message ringMessage = new Message(MessageType.HEARTBEAT_INVOKE, "");
+ Class instanceClass = AbstractInstance.class;
+ Field messageQueueField = instanceClass.getDeclaredField("messageQueue");
+ messageQueueField.setAccessible(true);
+ Message ringMessageSent = ((Queue) messageQueueField.get(instance3)).poll();
+ assertEquals(ringMessageSent.getType(), ringMessage.getType());
+ assertEquals(ringMessageSent.getContent(), ringMessage.getContent());
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ fail("Error to access private field.");
+ }
+ }
+
+}
diff --git a/pom.xml b/pom.xml
index 39cfee91c241..d812d27c4c54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,7 +176,9 @@
commander
typeobjectpattern
bytecode
+ leader-election
data-locality
+
From 795b6be17d270e93ccfc871fa4976f052c33a181 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?=
Date: Fri, 11 Oct 2019 19:28:50 +0300
Subject: [PATCH 15/30] Configure Travis to build on JDK8 and JDK11
---
.travis.yml | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 58edddeb416e..2a82f6051f2c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,8 @@
language: java
-dist: trusty # Xenial build environment won't allow installation of Java 8
+dist: xenial
jdk:
-- oraclejdk8
+- openjdk8
+- openjdk11
env:
global:
@@ -21,12 +22,6 @@ after_success:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
- bash update-ghpages.sh
-# use latest java version available instead of travis default
-addons:
- apt:
- packages:
- - oracle-java8-installer
-
notifications:
email:
- iluwatar@gmail.com
From 71f26c3e59f45d0e62b7137a75705a522d43cdec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?=
Date: Fri, 11 Oct 2019 19:37:28 +0300
Subject: [PATCH 16/30] Fix Travis xvfb
---
.travis.yml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 2a82f6051f2c..84b031fadcc1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,10 +9,9 @@ env:
- GH_REF: github.com/iluwatar/java-design-patterns.git
- secure: LxTDuNS/rBWIvKkaEqr79ImZAe48mCdoYCF41coxNXgNoippo4GIBArknqtv+XvdkiuRZ1yGyj6pn8GU33c/yn+krddTUkVCwTbVatbalW5jhQjDbHYym/JcxaK9ZS/3JTeGcWrBgiPqHEEDhCf26vPZsXoMSeVCEORVKTp1BSg=
- secure: "eoWlW9GyTJY04P8K3pxayXwU9/hmptQg/LfirispQkV9YvmziCfSzXnatnBhNfud98sCzY8BScXnb+OWLTnjLKpId4rtEqb0aJ40Jc32cUKzgzFAUn7cNcDAbUIfyPAGVqyQqfj/11wYSADwWMMOPlW97ExUtoyiH2WenXuRHso="
-
-before_install:
-- export DISPLAY=:99.0
-- sh -e /etc/init.d/xvfb start
+
+services:
+- xvfb
# default install command is just "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V"
install:
From e36bbbb22bad5e24c15ea2d185309033580f2ba8 Mon Sep 17 00:00:00 2001
From: lbroman
Date: Fri, 11 Oct 2019 20:55:48 +0200
Subject: [PATCH 17/30] Maven profiles to support jdk 11 builds. #948 (#975)
* Maven profiles to support jdk 11 builds. #948
Added maven profiles activated by jdk 11, wich will not break java 8 support.
Bumped lombok and datanucleus enhancer as the old versions dont work with 11.
* Fixed PMD issue when building naked-objects
* Fixed the eip modules with xml dependencies.
Previous dependency relaxing commit causes xml libs to go missing from
some modules that actually needed them
---
cqrs/pom.xml | 21 ++++++++++++++++
eip-aggregator/pom.xml | 20 +++++++++++++++
eip-splitter/pom.xml | 21 ++++++++++++++++
eip-wire-tap/pom.xml | 19 +++++++++++++++
naked-objects/dom/exclude-pmd.properties | 24 ++++++++++++++++++
naked-objects/dom/pom.xml | 2 +-
naked-objects/integtests/pom.xml | 14 +++++++++++
pom.xml | 31 +++++++++++++++++++++++-
service-layer/pom.xml | 18 ++++++++++++++
trampoline/pom.xml | 2 +-
10 files changed, 169 insertions(+), 3 deletions(-)
create mode 100644 naked-objects/dom/exclude-pmd.properties
diff --git a/cqrs/pom.xml b/cqrs/pom.xml
index beb195473ced..fc89a93b7c79 100644
--- a/cqrs/pom.xml
+++ b/cqrs/pom.xml
@@ -39,4 +39,25 @@
hibernate-core
+
+
+ jdk11-deps
+
+ [11,)
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ test
+ 2.1.17
+
+
+ javax.xml.bind
+ jaxb-api
+ test
+
+
+
+
diff --git a/eip-aggregator/pom.xml b/eip-aggregator/pom.xml
index f56ae78deb73..39270f02097e 100644
--- a/eip-aggregator/pom.xml
+++ b/eip-aggregator/pom.xml
@@ -70,4 +70,24 @@
+
+
+
+ jdk11-deps
+
+ [11,)
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
+
+
diff --git a/eip-splitter/pom.xml b/eip-splitter/pom.xml
index 2bc3eec8402b..7319f651939c 100644
--- a/eip-splitter/pom.xml
+++ b/eip-splitter/pom.xml
@@ -70,4 +70,25 @@
+
+
+
+ jdk11-deps
+
+ [11,)
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
+
+
+
diff --git a/eip-wire-tap/pom.xml b/eip-wire-tap/pom.xml
index efca8d3c4cfb..a9d30924204a 100644
--- a/eip-wire-tap/pom.xml
+++ b/eip-wire-tap/pom.xml
@@ -70,4 +70,23 @@
+
+
+
+ jdk11-deps
+
+ [11,)
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
+
diff --git a/naked-objects/dom/exclude-pmd.properties b/naked-objects/dom/exclude-pmd.properties
new file mode 100644
index 000000000000..bda3929accc6
--- /dev/null
+++ b/naked-objects/dom/exclude-pmd.properties
@@ -0,0 +1,24 @@
+#
+# The MIT License
+# Copyright (c) 2014-2016 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+
+domainapp.dom.modules.simple.QSimpleObject=UnusedFormalParameter
\ No newline at end of file
diff --git a/naked-objects/dom/pom.xml b/naked-objects/dom/pom.xml
index 69365bd4b00a..039afc373727 100644
--- a/naked-objects/dom/pom.xml
+++ b/naked-objects/dom/pom.xml
@@ -78,7 +78,7 @@
true
- 4.0.1
+ 5.2.1
diff --git a/naked-objects/integtests/pom.xml b/naked-objects/integtests/pom.xml
index c4dd52dcf652..f12f4ae1e368 100644
--- a/naked-objects/integtests/pom.xml
+++ b/naked-objects/integtests/pom.xml
@@ -122,6 +122,20 @@
-->
+
+
+ jdk11-deps
+
+ [11,)
+
+
+
+ javax.annotation
+ javax.annotation-api
+
+
+
+
diff --git a/pom.xml b/pom.xml
index d812d27c4c54..efeee185c788 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,8 @@
2.8.5
3.12.0
1.2.17
- 2.3.0
+ 2.3.1
+ 2.3.2
1.3.1
@@ -314,6 +315,11 @@
javax.annotation-api
${annotation-api.version}
+
+ com.sun.xml.bind
+ jaxb-impl
+ ${jaxb-impl.version}
+
@@ -494,4 +500,27 @@
+
+
+ jdk11-dep-management
+
+ [11,)
+
+
+
+
+ org.javassist
+ javassist
+ 3.25.0-GA
+
+
+ javax.annotation
+ javax.annotation-api
+ 1.3.2
+
+
+
+
+
+
diff --git a/service-layer/pom.xml b/service-layer/pom.xml
index 403a896a4613..4edd950740a8 100644
--- a/service-layer/pom.xml
+++ b/service-layer/pom.xml
@@ -52,4 +52,22 @@
test
+
+
+ jdk11-deps
+
+ [11,)
+
+
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
+
diff --git a/trampoline/pom.xml b/trampoline/pom.xml
index 1e019ef31297..86726a1186bc 100644
--- a/trampoline/pom.xml
+++ b/trampoline/pom.xml
@@ -51,7 +51,7 @@
org.projectlombok
lombok
- 1.16.18
+ 1.18.10
From 6faec9901a2380800aa50af538c8669539997176 Mon Sep 17 00:00:00 2001
From: lbroman
Date: Sat, 12 Oct 2019 07:39:58 +0200
Subject: [PATCH 18/30] Bump java language to 11 (#980)
* Moved java XML and annotations dependencies to project level instead
of as profiles
* Set compiler language level to 11
* Removed jdk8 from travis build
* Kept java level 8 in naked-objects/dom for datanucleus enhancer, for
now.
---
.travis.yml | 1 -
cqrs/pom.xml | 34 ++++++++++++--------------------
eip-aggregator/pom.xml | 28 +++++++++-----------------
eip-splitter/pom.xml | 30 ++++++++++------------------
eip-wire-tap/pom.xml | 28 ++++++++++----------------
naked-objects/dom/pom.xml | 11 +++++++++++
naked-objects/integtests/pom.xml | 20 +++++--------------
pom.xml | 34 ++++++++------------------------
service-layer/pom.xml | 27 +++++++++----------------
9 files changed, 75 insertions(+), 138 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 84b031fadcc1..45323dcfd457 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: java
dist: xenial
jdk:
-- openjdk8
- openjdk11
env:
diff --git a/cqrs/pom.xml b/cqrs/pom.xml
index fc89a93b7c79..9c9458505aba 100644
--- a/cqrs/pom.xml
+++ b/cqrs/pom.xml
@@ -38,26 +38,18 @@
org.hibernate
hibernate-core
+
+ com.sun.xml.bind
+ jaxb-impl
+ test
+ 2.1.17
+
+
+ javax.xml.bind
+ jaxb-api
+ test
+
+
-
-
- jdk11-deps
-
- [11,)
-
-
-
- com.sun.xml.bind
- jaxb-impl
- test
- 2.1.17
-
-
- javax.xml.bind
- jaxb-api
- test
-
-
-
-
+
diff --git a/eip-aggregator/pom.xml b/eip-aggregator/pom.xml
index 39270f02097e..6a5e32845cfc 100644
--- a/eip-aggregator/pom.xml
+++ b/eip-aggregator/pom.xml
@@ -47,6 +47,15 @@
${camel.version}
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
com.github.sbrannen
@@ -71,23 +80,4 @@
-
-
- jdk11-deps
-
- [11,)
-
-
-
- com.sun.xml.bind
- jaxb-impl
-
-
- javax.xml.bind
- jaxb-api
-
-
-
-
-
diff --git a/eip-splitter/pom.xml b/eip-splitter/pom.xml
index 7319f651939c..9769d08034a7 100644
--- a/eip-splitter/pom.xml
+++ b/eip-splitter/pom.xml
@@ -47,6 +47,16 @@
${camel.version}
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
com.github.sbrannen
@@ -71,24 +81,4 @@
-
-
- jdk11-deps
-
- [11,)
-
-
-
- com.sun.xml.bind
- jaxb-impl
-
-
- javax.xml.bind
- jaxb-api
-
-
-
-
-
-
diff --git a/eip-wire-tap/pom.xml b/eip-wire-tap/pom.xml
index a9d30924204a..c96063418c46 100644
--- a/eip-wire-tap/pom.xml
+++ b/eip-wire-tap/pom.xml
@@ -47,6 +47,16 @@
${camel.version}
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
com.github.sbrannen
@@ -71,22 +81,4 @@
-
-
- jdk11-deps
-
- [11,)
-
-
-
- com.sun.xml.bind
- jaxb-impl
-
-
- javax.xml.bind
- jaxb-api
-
-
-
-
diff --git a/naked-objects/dom/pom.xml b/naked-objects/dom/pom.xml
index 039afc373727..e816c76bbd78 100644
--- a/naked-objects/dom/pom.xml
+++ b/naked-objects/dom/pom.xml
@@ -36,6 +36,17 @@
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${compiler.version}
+
+ 8
+ 8
+
+
+
diff --git a/naked-objects/integtests/pom.xml b/naked-objects/integtests/pom.xml
index f12f4ae1e368..7365a71a9acb 100644
--- a/naked-objects/integtests/pom.xml
+++ b/naked-objects/integtests/pom.xml
@@ -90,6 +90,11 @@
hsqldb
+
+ javax.annotation
+ javax.annotation-api
+
+
-
-
- jdk11-deps
-
- [11,)
-
-
-
- javax.annotation
- javax.annotation-api
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index efeee185c788..b3756e1c06fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
1.2.17
2.3.1
2.3.2
- 1.3.1
+ 1.3.2
abstract-factory
@@ -320,6 +320,11 @@
jaxb-impl
${jaxb-impl.version}
+
+ org.javassist
+ javassist
+ 3.25.0-GA
+
@@ -380,8 +385,8 @@
maven-compiler-plugin
${compiler.version}
- 1.8
- 1.8
+ 11
+ 11
@@ -500,27 +505,4 @@
-
-
- jdk11-dep-management
-
- [11,)
-
-
-
-
- org.javassist
- javassist
- 3.25.0-GA
-
-
- javax.annotation
- javax.annotation-api
- 1.3.2
-
-
-
-
-
-
diff --git a/service-layer/pom.xml b/service-layer/pom.xml
index 4edd950740a8..057a701341a7 100644
--- a/service-layer/pom.xml
+++ b/service-layer/pom.xml
@@ -41,6 +41,14 @@
com.h2database
h2
+
+ com.sun.xml.bind
+ jaxb-impl
+
+
+ javax.xml.bind
+ jaxb-api
+
org.junit.jupiter
junit-jupiter-engine
@@ -52,22 +60,5 @@
test
-
-
- jdk11-deps
-
- [11,)
-
-
-
- com.sun.xml.bind
- jaxb-impl
-
-
- javax.xml.bind
- jaxb-api
-
-
-
-
+
From fcc1c0a27cbf92f07d4a2d9164598c883da74416 Mon Sep 17 00:00:00 2001
From: shumyk
Date: Sat, 12 Oct 2019 12:58:48 +0300
Subject: [PATCH 19/30] [mvn] - Remove maven-pmd-plugin from the project (#977)
(#979)
---
exclude-pmd.properties | 27 ---------------------------
pom.xml | 26 --------------------------
2 files changed, 53 deletions(-)
delete mode 100644 exclude-pmd.properties
diff --git a/exclude-pmd.properties b/exclude-pmd.properties
deleted file mode 100644
index 5a4bb138834e..000000000000
--- a/exclude-pmd.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# The MIT License
-# Copyright (c) 2014-2016 Ilkka Seppälä
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-com.iluwatar.servicelayer.common.BaseEntity=UnusedPrivateField
-com.iluwatar.doublechecked.locking.App=EmptyStatementNotInLoop,EmptyWhileStmt
-com.iluwatar.doublechecked.locking.InventoryTest=EmptyStatementNotInLoop,EmptyWhileStmt
-domainapp.dom.modules.simple.QSimpleObject=UnusedFormalParameter
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b3756e1c06fb..9b4672fb3b6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,6 @@
1.0.0
2.0.1
2.8.5
- 3.12.0
1.2.17
2.3.1
2.3.2
@@ -445,26 +444,6 @@
-
- org.apache.maven.plugins
- maven-pmd-plugin
- ${pmd.version}
-
- true
- 5
- true
-
-
-
-
- check
-
-
- exclude-pmd.properties
-
-
-
-
com.mycila
@@ -492,11 +471,6 @@
-
- org.apache.maven.plugins
- maven-pmd-plugin
- ${pmd.version}
-
org.apache.maven.plugins
maven-jxr-plugin
From 9ebbc421dd96b84c50808ca8ac4a520042e73b8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?=
Date: Sat, 12 Oct 2019 20:05:54 +0300
Subject: [PATCH 20/30] Update license headers
---
.sonarcloud.properties | 2 +-
abstract-document/pom.xml | 2 +-
.../abstractdocument/AbstractDocument.java | 8 ++--
.../com/iluwatar/abstractdocument/App.java | 8 ++--
.../iluwatar/abstractdocument/Document.java | 8 ++--
.../iluwatar/abstractdocument/domain/Car.java | 8 ++--
.../abstractdocument/domain/HasModel.java | 8 ++--
.../abstractdocument/domain/HasParts.java | 8 ++--
.../abstractdocument/domain/HasPrice.java | 8 ++--
.../abstractdocument/domain/HasType.java | 8 ++--
.../abstractdocument/domain/Part.java | 8 ++--
.../domain/enums/Property.java | 2 +-
.../AbstractDocumentTest.java | 8 ++--
.../iluwatar/abstractdocument/AppTest.java | 8 ++--
.../iluwatar/abstractdocument/DomainTest.java | 8 ++--
abstract-factory/etc/presentation.html | 2 +-
abstract-factory/pom.xml | 2 +-
.../com/iluwatar/abstractfactory/App.java | 2 +-
.../com/iluwatar/abstractfactory/Army.java | 2 +-
.../com/iluwatar/abstractfactory/Castle.java | 2 +-
.../com/iluwatar/abstractfactory/ElfArmy.java | 2 +-
.../iluwatar/abstractfactory/ElfCastle.java | 2 +-
.../com/iluwatar/abstractfactory/ElfKing.java | 2 +-
.../abstractfactory/ElfKingdomFactory.java | 2 +-
.../com/iluwatar/abstractfactory/King.java | 2 +-
.../abstractfactory/KingdomFactory.java | 2 +-
.../com/iluwatar/abstractfactory/OrcArmy.java | 2 +-
.../iluwatar/abstractfactory/OrcCastle.java | 2 +-
.../com/iluwatar/abstractfactory/OrcKing.java | 2 +-
.../abstractfactory/OrcKingdomFactory.java | 2 +-
.../abstractfactory/AbstractFactoryTest.java | 2 +-
.../com/iluwatar/abstractfactory/AppTest.java | 2 +-
acyclic-visitor/pom.xml | 2 +-
.../acyclicvisitor/AllModemVisitor.java | 2 +-
.../java/com/iluwatar/acyclicvisitor/App.java | 2 +-
.../ConfigureForDosVisitor.java | 2 +-
.../ConfigureForUnixVisitor.java | 2 +-
.../com/iluwatar/acyclicvisitor/Hayes.java | 2 +-
.../iluwatar/acyclicvisitor/HayesVisitor.java | 2 +-
.../com/iluwatar/acyclicvisitor/Modem.java | 2 +-
.../iluwatar/acyclicvisitor/ModemVisitor.java | 2 +-
.../com/iluwatar/acyclicvisitor/Zoom.java | 2 +-
.../iluwatar/acyclicvisitor/ZoomVisitor.java | 2 +-
.../com/iluwatar/acyclicvisitor/AppTest.java | 2 +-
.../ConfigureForDosVisitorTest.java | 2 +-
.../ConfigureForUnixVisitorTest.java | 2 +-
.../iluwatar/acyclicvisitor/HayesTest.java | 2 +-
.../com/iluwatar/acyclicvisitor/ZoomTest.java | 2 +-
adapter/pom.xml | 2 +-
.../main/java/com/iluwatar/adapter/App.java | 2 +-
.../java/com/iluwatar/adapter/Captain.java | 2 +-
.../com/iluwatar/adapter/FishingBoat.java | 2 +-
.../iluwatar/adapter/FishingBoatAdapter.java | 2 +-
.../java/com/iluwatar/adapter/RowingBoat.java | 2 +-
.../iluwatar/adapter/AdapterPatternTest.java | 2 +-
.../java/com/iluwatar/adapter/AppTest.java | 2 +-
.../aggregator-service/pom.xml | 2 +-
.../aggregator/microservices/Aggregator.java | 8 ++--
.../aggregator/microservices/App.java | 8 ++--
.../aggregator/microservices/Product.java | 8 ++--
.../ProductInformationClient.java | 8 ++--
.../ProductInformationClientImpl.java | 8 ++--
.../microservices/ProductInventoryClient.java | 8 ++--
.../ProductInventoryClientImpl.java | 8 ++--
.../src/main/resources/application.properties | 2 +-
.../microservices/AggregatorTest.java | 8 ++--
.../information-microservice/pom.xml | 2 +-
.../microservice/InformationApplication.java | 8 ++--
.../microservice/InformationController.java | 8 ++--
.../src/main/resources/application.properties | 2 +-
.../InformationControllerTest.java | 8 ++--
.../inventory-microservice/pom.xml | 2 +-
.../microservice/InventoryApplication.java | 8 ++--
.../microservice/InventoryController.java | 8 ++--
.../src/main/resources/application.properties | 2 +-
.../microservice/InventoryControllerTest.java | 8 ++--
aggregator-microservices/pom.xml | 2 +-
ambassador/pom.xml | 2 +-
.../java/com/iluwatar/ambassador/App.java | 2 +-
.../java/com/iluwatar/ambassador/Client.java | 2 +-
.../iluwatar/ambassador/RemoteService.java | 2 +-
.../ambassador/RemoteServiceInterface.java | 2 +-
.../ambassador/ServiceAmbassador.java | 2 +-
.../ambassador/util/RandomProvider.java | 2 +-
.../java/com/iluwatar/ambassador/AppTest.java | 2 +-
.../com/iluwatar/ambassador/ClientTest.java | 2 +-
.../ambassador/RemoteServiceTest.java | 2 +-
.../ambassador/ServiceAmbassadorTest.java | 2 +-
api-gateway/api-gateway-service/pom.xml | 2 +-
.../com/iluwatar/api/gateway/ApiGateway.java | 2 +-
.../java/com/iluwatar/api/gateway/App.java | 2 +-
.../iluwatar/api/gateway/DesktopProduct.java | 2 +-
.../com/iluwatar/api/gateway/ImageClient.java | 2 +-
.../iluwatar/api/gateway/ImageClientImpl.java | 2 +-
.../iluwatar/api/gateway/MobileProduct.java | 2 +-
.../com/iluwatar/api/gateway/PriceClient.java | 2 +-
.../iluwatar/api/gateway/PriceClientImpl.java | 2 +-
.../src/main/resources/application.properties | 2 +-
.../iluwatar/api/gateway/ApiGatewayTest.java | 2 +-
api-gateway/image-microservice/pom.xml | 2 +-
.../image/microservice/ImageApplication.java | 2 +-
.../image/microservice/ImageController.java | 2 +-
.../src/main/resources/application.properties | 2 +-
.../microservice/ImageControllerTest.java | 2 +-
api-gateway/pom.xml | 2 +-
api-gateway/price-microservice/pom.xml | 2 +-
.../price/microservice/PriceApplication.java | 2 +-
.../price/microservice/PriceController.java | 2 +-
.../src/main/resources/application.properties | 2 +-
.../microservice/PriceControllerTest.java | 2 +-
async-method-invocation/pom.xml | 2 +-
.../iluwatar/async/method/invocation/App.java | 2 +-
.../method/invocation/AsyncCallback.java | 2 +-
.../method/invocation/AsyncExecutor.java | 2 +-
.../async/method/invocation/AsyncResult.java | 2 +-
.../invocation/ThreadAsyncExecutor.java | 2 +-
.../async/method/invocation/AppTest.java | 2 +-
.../invocation/ThreadAsyncExecutorTest.java | 2 +-
balking/pom.xml | 2 +-
.../main/java/com/iluwatar/balking/App.java | 8 ++--
.../com/iluwatar/balking/DelayProvider.java | 2 +-
.../com/iluwatar/balking/WashingMachine.java | 8 ++--
.../iluwatar/balking/WashingMachineState.java | 8 ++--
.../java/com/iluwatar/balking/AppTest.java | 9 ++---
.../iluwatar/balking/WashingMachineTest.java | 8 ++--
bridge/pom.xml | 2 +-
.../main/java/com/iluwatar/bridge/App.java | 2 +-
.../java/com/iluwatar/bridge/Enchantment.java | 2 +-
.../iluwatar/bridge/FlyingEnchantment.java | 2 +-
.../main/java/com/iluwatar/bridge/Hammer.java | 2 +-
.../bridge/SoulEatingEnchantment.java | 2 +-
.../main/java/com/iluwatar/bridge/Sword.java | 2 +-
.../main/java/com/iluwatar/bridge/Weapon.java | 2 +-
.../java/com/iluwatar/bridge/AppTest.java | 2 +-
.../java/com/iluwatar/bridge/HammerTest.java | 2 +-
.../java/com/iluwatar/bridge/SwordTest.java | 2 +-
.../java/com/iluwatar/bridge/WeaponTest.java | 2 +-
builder/pom.xml | 2 +-
.../main/java/com/iluwatar/builder/App.java | 2 +-
.../main/java/com/iluwatar/builder/Armor.java | 2 +-
.../java/com/iluwatar/builder/HairColor.java | 2 +-
.../java/com/iluwatar/builder/HairType.java | 2 +-
.../main/java/com/iluwatar/builder/Hero.java | 2 +-
.../java/com/iluwatar/builder/Profession.java | 2 +-
.../java/com/iluwatar/builder/Weapon.java | 2 +-
.../java/com/iluwatar/builder/AppTest.java | 2 +-
.../java/com/iluwatar/builder/HeroTest.java | 2 +-
business-delegate/pom.xml | 2 +-
.../com/iluwatar/business/delegate/App.java | 2 +-
.../business/delegate/BusinessDelegate.java | 2 +-
.../business/delegate/BusinessLookup.java | 2 +-
.../business/delegate/BusinessService.java | 2 +-
.../iluwatar/business/delegate/Client.java | 2 +-
.../business/delegate/EjbService.java | 2 +-
.../business/delegate/JmsService.java | 2 +-
.../business/delegate/ServiceType.java | 2 +-
.../iluwatar/business/delegate/AppTest.java | 2 +-
.../delegate/BusinessDelegateTest.java | 2 +-
bytecode/pom.xml | 2 +-
.../main/java/com/iluwatar/bytecode/App.java | 2 +-
.../com/iluwatar/bytecode/Instruction.java | 2 +-
.../com/iluwatar/bytecode/VirtualMachine.java | 2 +-
.../java/com/iluwatar/bytecode/Wizard.java | 2 +-
.../util/InstructionConverterUtil.java | 2 +-
.../java/com/iluwatar/bytecode/AppTest.java | 2 +-
.../iluwatar/bytecode/VirtualMachineTest.java | 2 +-
.../util/InstructionConverterUtilTest.java | 2 +-
caching/pom.xml | 2 +-
.../main/java/com/iluwatar/caching/App.java | 2 +-
.../java/com/iluwatar/caching/AppManager.java | 2 +-
.../java/com/iluwatar/caching/CacheStore.java | 2 +-
.../com/iluwatar/caching/CachingPolicy.java | 2 +-
.../java/com/iluwatar/caching/DbManager.java | 2 +-
.../java/com/iluwatar/caching/LruCache.java | 2 +-
.../com/iluwatar/caching/UserAccount.java | 2 +-
.../caching/constants/CachingConstants.java | 2 +-
.../java/com/iluwatar/caching/AppTest.java | 2 +-
.../com/iluwatar/caching/CachingTest.java | 2 +-
callback/pom.xml | 2 +-
.../main/java/com/iluwatar/callback/App.java | 2 +-
.../java/com/iluwatar/callback/Callback.java | 2 +-
.../com/iluwatar/callback/LambdasApp.java | 2 +-
.../com/iluwatar/callback/SimpleTask.java | 2 +-
.../main/java/com/iluwatar/callback/Task.java | 2 +-
.../java/com/iluwatar/callback/AppTest.java | 2 +-
.../com/iluwatar/callback/CallbackTest.java | 2 +-
chain/pom.xml | 2 +-
.../src/main/java/com/iluwatar/chain/App.java | 2 +-
.../java/com/iluwatar/chain/OrcCommander.java | 2 +-
.../main/java/com/iluwatar/chain/OrcKing.java | 2 +-
.../java/com/iluwatar/chain/OrcOfficer.java | 2 +-
.../java/com/iluwatar/chain/OrcSoldier.java | 2 +-
.../main/java/com/iluwatar/chain/Request.java | 2 +-
.../com/iluwatar/chain/RequestHandler.java | 2 +-
.../java/com/iluwatar/chain/RequestType.java | 2 +-
.../test/java/com/iluwatar/chain/AppTest.java | 2 +-
.../java/com/iluwatar/chain/OrcKingTest.java | 2 +-
checkstyle-suppressions.xml | 2 +-
checkstyle.xml | 2 +-
collection-pipeline/pom.xml | 2 +-
.../com/iluwatar/collectionpipeline/App.java | 2 +-
.../com/iluwatar/collectionpipeline/Car.java | 2 +-
.../collectionpipeline/CarFactory.java | 2 +-
.../iluwatar/collectionpipeline/Category.java | 2 +-
.../FunctionalProgramming.java | 2 +-
.../ImperativeProgramming.java | 2 +-
.../iluwatar/collectionpipeline/Person.java | 2 +-
.../iluwatar/collectionpipeline/AppTest.java | 2 +-
command/etc/presentation.html | 2 +-
command/pom.xml | 2 +-
.../main/java/com/iluwatar/command/App.java | 2 +-
.../java/com/iluwatar/command/Command.java | 2 +-
.../java/com/iluwatar/command/Goblin.java | 2 +-
.../iluwatar/command/InvisibilitySpell.java | 2 +-
.../com/iluwatar/command/ShrinkSpell.java | 2 +-
.../main/java/com/iluwatar/command/Size.java | 2 +-
.../java/com/iluwatar/command/Target.java | 2 +-
.../java/com/iluwatar/command/Visibility.java | 2 +-
.../java/com/iluwatar/command/Wizard.java | 2 +-
.../java/com/iluwatar/command/AppTest.java | 2 +-
.../com/iluwatar/command/CommandTest.java | 2 +-
commander/pom.xml | 2 +-
commander/properties/log4j.properties | 2 +-
.../commander/AppEmployeeDbFailCases.java | 3 +-
.../commander/AppMessagingFailCases.java | 3 +-
.../commander/AppPaymentFailCases.java | 3 +-
.../iluwatar/commander/AppQueueFailCases.java | 3 +-
.../commander/AppShippingFailCases.java | 3 +-
.../com/iluwatar/commander/Commander.java | 3 +-
.../java/com/iluwatar/commander/Database.java | 3 +-
.../java/com/iluwatar/commander/Order.java | 3 +-
.../java/com/iluwatar/commander/Retry.java | 3 +-
.../java/com/iluwatar/commander/Service.java | 3 +-
.../java/com/iluwatar/commander/User.java | 3 +-
.../employeehandle/EmployeeDatabase.java | 3 +-
.../employeehandle/EmployeeHandle.java | 3 +-
.../DatabaseUnavailableException.java | 3 +-
.../exceptions/IsEmptyException.java | 3 +-
.../exceptions/ItemUnavailableException.java | 3 +-
.../PaymentDetailsErrorException.java | 3 +-
.../ShippingNotPossibleException.java | 3 +-
.../messagingservice/MessagingDatabase.java | 3 +-
.../messagingservice/MessagingService.java | 3 +-
.../paymentservice/PaymentDatabase.java | 3 +-
.../paymentservice/PaymentService.java | 3 +-
.../com/iluwatar/commander/queue/Queue.java | 3 +-
.../commander/queue/QueueDatabase.java | 3 +-
.../iluwatar/commander/queue/QueueTask.java | 3 +-
.../shippingservice/ShippingDatabase.java | 3 +-
.../shippingservice/ShippingService.java | 3 +-
.../com/iluwatar/commander/RetryTest.java | 3 +-
composite/pom.xml | 2 +-
.../main/java/com/iluwatar/composite/App.java | 2 +-
.../java/com/iluwatar/composite/Letter.java | 2 +-
.../iluwatar/composite/LetterComposite.java | 2 +-
.../com/iluwatar/composite/Messenger.java | 2 +-
.../java/com/iluwatar/composite/Sentence.java | 2 +-
.../java/com/iluwatar/composite/Word.java | 2 +-
.../java/com/iluwatar/composite/AppTest.java | 2 +-
.../com/iluwatar/composite/MessengerTest.java | 2 +-
converter/pom.xml | 2 +-
.../main/java/com/iluwatar/converter/App.java | 8 ++--
.../com/iluwatar/converter/Converter.java | 9 ++---
.../java/com/iluwatar/converter/User.java | 9 ++---
.../com/iluwatar/converter/UserConverter.java | 9 ++---
.../java/com/iluwatar/converter/UserDto.java | 9 ++---
.../java/com/iluwatar/converter/AppTest.java | 2 +-
.../com/iluwatar/converter/ConverterTest.java | 2 +-
cqrs/pom.xml | 39 ++++++++++++-------
.../main/java/com/iluwatar/cqrs/app/App.java | 2 +-
.../cqrs/commandes/CommandServiceImpl.java | 2 +-
.../cqrs/commandes/ICommandService.java | 2 +-
.../iluwatar/cqrs/constants/AppConstants.java | 2 +-
.../iluwatar/cqrs/domain/model/Author.java | 2 +-
.../com/iluwatar/cqrs/domain/model/Book.java | 2 +-
.../java/com/iluwatar/cqrs/dto/Author.java | 2 +-
.../main/java/com/iluwatar/cqrs/dto/Book.java | 2 +-
.../iluwatar/cqrs/queries/IQueryService.java | 2 +-
.../cqrs/queries/QueryServiceImpl.java | 2 +-
.../com/iluwatar/cqrs/util/HibernateUtil.java | 2 +-
cqrs/src/main/resources/hibernate.cfg.xml | 2 +-
cqrs/src/main/resources/logback.xml | 2 +-
.../com/iluwatar/cqrs/IntegrationTest.java | 2 +-
cqrs/src/test/resources/hibernate.cfg.xml | 2 +-
cqrs/src/test/resources/logback.xml | 2 +-
dao/pom.xml | 2 +-
dao/src/main/java/com/iluwatar/dao/App.java | 3 +-
.../com/iluwatar/dao/CustomException.java | 2 +-
.../main/java/com/iluwatar/dao/Customer.java | 3 +-
.../java/com/iluwatar/dao/CustomerDao.java | 3 +-
.../com/iluwatar/dao/CustomerSchemaSql.java | 2 +-
.../java/com/iluwatar/dao/DbCustomerDao.java | 3 +-
.../com/iluwatar/dao/InMemoryCustomerDao.java | 3 +-
dao/src/main/resources/log4j.xml | 2 +-
.../test/java/com/iluwatar/dao/AppTest.java | 3 +-
.../java/com/iluwatar/dao/CustomerTest.java | 3 +-
.../com/iluwatar/dao/DbCustomerDaoTest.java | 2 +-
.../iluwatar/dao/InMemoryCustomerDaoTest.java | 3 +-
data-bus/pom.xml | 2 +-
.../iluwatar/databus/AbstractDataType.java | 2 +-
.../main/java/com/iluwatar/databus/App.java | 9 ++---
.../java/com/iluwatar/databus/DataBus.java | 9 ++---
.../java/com/iluwatar/databus/DataType.java | 2 +-
.../java/com/iluwatar/databus/Member.java | 2 +-
.../iluwatar/databus/data/MessageData.java | 9 ++---
.../iluwatar/databus/data/StartingData.java | 9 ++---
.../iluwatar/databus/data/StoppingData.java | 9 ++---
.../members/MessageCollectorMember.java | 9 ++---
.../databus/members/StatusMember.java | 9 ++---
.../com/iluwatar/databus/DataBusTest.java | 2 +-
.../members/MessageCollectorMemberTest.java | 2 +-
.../databus/members/StatusMemberTest.java | 2 +-
data-locality/pom.xml | 2 +-
.../iluwatar/data/locality/Application.java | 2 +-
.../data/locality/game/GameEntity.java | 2 +-
.../locality/game/component/AiComponent.java | 2 +-
.../locality/game/component/Component.java | 2 +-
.../game/component/PhysicsComponent.java | 2 +-
.../game/component/RenderComponent.java | 2 +-
.../component/manager/AiComponentManager.java | 2 +-
.../manager/PhysicsComponentManager.java | 2 +-
.../manager/RenderComponentManager.java | 2 +-
.../data/locality/ApplicationTest.java | 8 ++--
data-mapper/pom.xml | 2 +-
.../java/com/iluwatar/datamapper/App.java | 28 +++++++------
.../datamapper/DataMapperException.java | 28 +++++++------
.../java/com/iluwatar/datamapper/Student.java | 28 +++++++------
.../datamapper/StudentDataMapper.java | 28 +++++++------
.../datamapper/StudentDataMapperImpl.java | 28 +++++++------
data-mapper/src/main/resources/log4j.xml | 2 +-
.../java/com/iluwatar/datamapper/AppTest.java | 28 +++++++------
.../iluwatar/datamapper/DataMapperTest.java | 28 +++++++------
.../com/iluwatar/datamapper/StudentTest.java | 28 +++++++------
data-transfer-object/pom.xml | 2 +-
.../datatransfer/CustomerClientApp.java | 16 ++++----
.../iluwatar/datatransfer/CustomerDto.java | 16 ++++----
.../datatransfer/CustomerResource.java | 16 ++++----
.../datatransfer/CustomerResourceTest.java | 16 ++++----
decorator/pom.xml | 2 +-
.../main/java/com/iluwatar/decorator/App.java | 2 +-
.../com/iluwatar/decorator/ClubbedTroll.java | 2 +-
.../com/iluwatar/decorator/SimpleTroll.java | 2 +-
.../java/com/iluwatar/decorator/Troll.java | 2 +-
.../java/com/iluwatar/decorator/AppTest.java | 2 +-
.../iluwatar/decorator/ClubbedTrollTest.java | 2 +-
.../iluwatar/decorator/SimpleTrollTest.java | 2 +-
delegation/pom.xml | 3 +-
.../com/iluwatar/delegation/simple/App.java | 2 +-
.../iluwatar/delegation/simple/Printer.java | 2 +-
.../delegation/simple/PrinterController.java | 2 +-
.../simple/printers/CanonPrinter.java | 2 +-
.../simple/printers/EpsonPrinter.java | 2 +-
.../delegation/simple/printers/HpPrinter.java | 2 +-
.../iluwatar/delegation/simple/AppTest.java | 2 +-
.../delegation/simple/DelegateTest.java | 2 +-
dependency-injection/pom.xml | 2 +-
.../injection/AdvancedSorceress.java | 2 +-
.../dependency/injection/AdvancedWizard.java | 2 +-
.../iluwatar/dependency/injection/App.java | 8 ++--
.../dependency/injection/GuiceWizard.java | 2 +-
.../dependency/injection/OldTobyTobacco.java | 2 +-
.../injection/RivendellTobacco.java | 2 +-
.../injection/SecondBreakfastTobacco.java | 2 +-
.../dependency/injection/SimpleWizard.java | 2 +-
.../dependency/injection/Tobacco.java | 2 +-
.../dependency/injection/TobaccoModule.java | 2 +-
.../iluwatar/dependency/injection/Wizard.java | 2 +-
.../injection/AdvancedSorceressTest.java | 8 ++--
.../injection/AdvancedWizardTest.java | 2 +-
.../dependency/injection/AppTest.java | 2 +-
.../dependency/injection/GuiceWizardTest.java | 2 +-
.../injection/SimpleWizardTest.java | 2 +-
.../injection/utils/InMemoryAppender.java | 2 +-
dirty-flag/pom.xml | 2 +-
.../main/java/com/iluwatar/dirtyflag/App.java | 8 ++--
.../com/iluwatar/dirtyflag/DataFetcher.java | 2 +-
.../java/com/iluwatar/dirtyflag/World.java | 2 +-
dirty-flag/src/main/resources/world.txt | 2 +-
.../src/test/java/org/dirty/flag/AppTest.java | 2 +-
.../java/org/dirty/flag/DirtyFlagTest.java | 2 +-
double-checked-locking/pom.xml | 2 +-
.../iluwatar/doublechecked/locking/App.java | 2 +-
.../doublechecked/locking/Inventory.java | 2 +-
.../iluwatar/doublechecked/locking/Item.java | 2 +-
.../src/main/resources/logback.xml | 2 +-
.../doublechecked/locking/AppTest.java | 2 +-
.../doublechecked/locking/InventoryTest.java | 2 +-
double-dispatch/pom.xml | 2 +-
.../java/com/iluwatar/doubledispatch/App.java | 2 +-
.../doubledispatch/FlamingAsteroid.java | 2 +-
.../iluwatar/doubledispatch/GameObject.java | 2 +-
.../iluwatar/doubledispatch/Meteoroid.java | 2 +-
.../iluwatar/doubledispatch/Rectangle.java | 2 +-
.../doubledispatch/SpaceStationIss.java | 2 +-
.../doubledispatch/SpaceStationMir.java | 2 +-
.../constants/AppConstants.java | 2 +-
.../com/iluwatar/doubledispatch/AppTest.java | 2 +-
.../doubledispatch/CollisionTest.java | 2 +-
.../doubledispatch/FlamingAsteroidTest.java | 2 +-
.../doubledispatch/MeteoroidTest.java | 2 +-
.../doubledispatch/RectangleTest.java | 2 +-
.../doubledispatch/SpaceStationIssTest.java | 2 +-
.../doubledispatch/SpaceStationMirTest.java | 2 +-
eip-aggregator/pom.xml | 7 +++-
.../java/com/iluwatar/eip/aggregator/App.java | 2 +-
.../aggregator/routes/AggregatorRoute.java | 2 +-
.../routes/MessageAggregationStrategy.java | 2 +-
.../src/main/resources/application.properties | 2 +-
.../com/iluwatar/eip/aggregator/AppTest.java | 2 +-
.../routes/AggregatorRouteTest.java | 2 +-
.../MessageAggregationStrategyTest.java | 2 +-
.../resources/application-test.properties | 2 +-
eip-message-channel/pom.xml | 2 +-
.../com/iluwatar/eip/message/channel/App.java | 2 +-
.../iluwatar/eip/message/channel/AppTest.java | 2 +-
eip-publish-subscribe/pom.xml | 2 +-
.../iluwatar/eip/publish/subscribe/App.java | 2 +-
.../src/main/resources/logback.xml | 2 +-
.../eip/publish/subscribe/AppTest.java | 2 +-
eip-splitter/pom.xml | 7 +++-
.../java/com/iluwatar/eip/splitter/App.java | 2 +-
.../eip/splitter/routes/SplitterRoute.java | 2 +-
.../src/main/resources/application.properties | 2 +-
.../com/iluwatar/eip/splitter/AppTest.java | 2 +-
.../splitter/routes/SplitterRouteTest.java | 2 +-
.../resources/application-test.properties | 2 +-
eip-wire-tap/pom.xml | 7 +++-
.../java/com/iluwatar/eip/wiretap/App.java | 2 +-
.../eip/wiretap/routes/WireTapRoute.java | 2 +-
.../src/main/resources/application.properties | 2 +-
.../com/iluwatar/eip/wiretap/AppTest.java | 2 +-
.../eip/wiretap/routes/WireTapRouteTest.java | 2 +-
.../resources/application-test.properties | 2 +-
event-aggregator/pom.xml | 2 +-
.../com/iluwatar/event/aggregator/App.java | 2 +-
.../com/iluwatar/event/aggregator/Event.java | 2 +-
.../event/aggregator/EventEmitter.java | 2 +-
.../event/aggregator/EventObserver.java | 2 +-
.../event/aggregator/KingJoffrey.java | 2 +-
.../iluwatar/event/aggregator/KingsHand.java | 2 +-
.../event/aggregator/LordBaelish.java | 2 +-
.../iluwatar/event/aggregator/LordVarys.java | 2 +-
.../com/iluwatar/event/aggregator/Scout.java | 2 +-
.../iluwatar/event/aggregator/Weekday.java | 2 +-
.../iluwatar/event/aggregator/AppTest.java | 2 +-
.../event/aggregator/EventEmitterTest.java | 2 +-
.../iluwatar/event/aggregator/EventTest.java | 2 +-
.../event/aggregator/KingJoffreyTest.java | 2 +-
.../event/aggregator/KingsHandTest.java | 2 +-
.../event/aggregator/LordBaelishTest.java | 2 +-
.../event/aggregator/LordVarysTest.java | 2 +-
.../iluwatar/event/aggregator/ScoutTest.java | 2 +-
.../event/aggregator/WeekdayTest.java | 2 +-
event-asynchronous/pom.xml | 2 +-
.../com/iluwatar/event/asynchronous/App.java | 28 +++++++------
.../iluwatar/event/asynchronous/Event.java | 28 +++++++------
.../EventDoesNotExistException.java | 28 +++++++------
.../event/asynchronous/EventManager.java | 28 +++++++------
.../iluwatar/event/asynchronous/IEvent.java | 28 +++++++------
.../InvalidOperationException.java | 28 +++++++------
.../LongRunningEventException.java | 28 +++++++------
.../MaxNumOfEventsAllowedException.java | 28 +++++++------
.../asynchronous/ThreadCompleteListener.java | 28 +++++++------
.../src/main/resources/config.properties | 2 +-
.../iluwatar/event/asynchronous/AppTest.java | 28 +++++++------
.../asynchronous/EventAsynchronousTest.java | 28 +++++++------
event-driven-architecture/pom.xml | 2 +-
.../src/main/java/com/iluwatar/eda/App.java | 2 +-
.../com/iluwatar/eda/event/AbstractEvent.java | 2 +-
.../iluwatar/eda/event/UserCreatedEvent.java | 2 +-
.../iluwatar/eda/event/UserUpdatedEvent.java | 2 +-
.../com/iluwatar/eda/framework/Event.java | 2 +-
.../eda/framework/EventDispatcher.java | 2 +-
.../com/iluwatar/eda/framework/Handler.java | 2 +-
.../eda/handler/UserCreatedEventHandler.java | 2 +-
.../eda/handler/UserUpdatedEventHandler.java | 2 +-
.../java/com/iluwatar/eda/model/User.java | 2 +-
.../test/java/com/iluwatar/eda/AppTest.java | 2 +-
.../eda/event/UserCreatedEventTest.java | 2 +-
.../eda/framework/EventDispatcherTest.java | 2 +-
event-queue/pom.xml | 2 +-
.../java/com/iluwatar/event/queue/App.java | 3 +-
.../java/com/iluwatar/event/queue/Audio.java | 3 +-
.../com/iluwatar/event/queue/PlayMessage.java | 3 +-
.../com/iluwatar/event/queue/AudioTest.java | 3 +-
event-sourcing/pom.xml | 2 +-
.../com/iluwatar/event/sourcing/app/App.java | 2 +-
.../event/sourcing/domain/Account.java | 2 +-
.../sourcing/event/AccountCreateEvent.java | 2 +-
.../event/sourcing/event/DomainEvent.java | 2 +-
.../sourcing/event/MoneyDepositEvent.java | 2 +-
.../sourcing/event/MoneyTransferEvent.java | 2 +-
.../processor/DomainEventProcessor.java | 2 +-
.../sourcing/processor/JsonFileJournal.java | 2 +-
.../sourcing/state/AccountAggregate.java | 2 +-
.../src/test/java/IntegrationTest.java | 3 +-
execute-around/pom.xml | 2 +-
.../java/com/iluwatar/execute/around/App.java | 2 +-
.../execute/around/FileWriterAction.java | 2 +-
.../execute/around/SimpleFileWriter.java | 2 +-
.../com/iluwatar/execute/around/AppTest.java | 2 +-
.../execute/around/SimpleFileWriterTest.java | 2 +-
extension-objects/pom.xml | 2 +-
extension-objects/src/main/java/App.java | 2 +-
.../CommanderExtension.java | 2 +-
.../abstractextensions/SergeantExtension.java | 2 +-
.../abstractextensions/SoldierExtension.java | 2 +-
.../abstractextensions/UnitExtension.java | 2 +-
.../java/concreteextensions/Commander.java | 2 +-
.../java/concreteextensions/Sergeant.java | 2 +-
.../main/java/concreteextensions/Soldier.java | 2 +-
.../src/main/java/units/CommanderUnit.java | 2 +-
.../src/main/java/units/SergeantUnit.java | 2 +-
.../src/main/java/units/SoldierUnit.java | 2 +-
.../src/main/java/units/Unit.java | 2 +-
extension-objects/src/test/java/AppTest.java | 3 +-
.../concreteextensions/CommanderTest.java | 2 +-
.../java/concreteextensions/SergeantTest.java | 2 +-
.../java/concreteextensions/SoldierTest.java | 2 +-
.../test/java/units/CommanderUnitTest.java | 2 +-
.../src/test/java/units/SergeantUnitTest.java | 2 +-
.../src/test/java/units/SoldierUnitTest.java | 2 +-
.../src/test/java/units/UnitTest.java | 2 +-
facade/pom.xml | 2 +-
.../main/java/com/iluwatar/facade/App.java | 2 +-
.../iluwatar/facade/DwarvenCartOperator.java | 2 +-
.../iluwatar/facade/DwarvenGoldDigger.java | 2 +-
.../facade/DwarvenGoldmineFacade.java | 2 +-
.../iluwatar/facade/DwarvenMineWorker.java | 2 +-
.../iluwatar/facade/DwarvenTunnelDigger.java | 2 +-
.../java/com/iluwatar/facade/AppTest.java | 2 +-
.../facade/DwarvenGoldmineFacadeTest.java | 2 +-
factory-kit/pom.xml | 2 +-
.../java/com/iluwatar/factorykit/App.java | 2 +-
.../java/com/iluwatar/factorykit/Axe.java | 2 +-
.../java/com/iluwatar/factorykit/Bow.java | 2 +-
.../java/com/iluwatar/factorykit/Builder.java | 2 +-
.../java/com/iluwatar/factorykit/Spear.java | 2 +-
.../java/com/iluwatar/factorykit/Sword.java | 2 +-
.../java/com/iluwatar/factorykit/Weapon.java | 2 +-
.../iluwatar/factorykit/WeaponFactory.java | 2 +-
.../com/iluwatar/factorykit/WeaponType.java | 2 +-
.../com/iluwatar/factorykit/app/AppTest.java | 2 +-
.../factorykit/factorykit/FactoryKitTest.java | 4 +-
factory-method/etc/presentation.html | 2 +-
factory-method/pom.xml | 2 +-
.../java/com/iluwatar/factory/method/App.java | 2 +-
.../iluwatar/factory/method/Blacksmith.java | 2 +-
.../factory/method/ElfBlacksmith.java | 2 +-
.../iluwatar/factory/method/ElfWeapon.java | 2 +-
.../factory/method/OrcBlacksmith.java | 2 +-
.../iluwatar/factory/method/OrcWeapon.java | 2 +-
.../com/iluwatar/factory/method/Weapon.java | 2 +-
.../iluwatar/factory/method/WeaponType.java | 2 +-
.../com/iluwatar/factory/method/AppTest.java | 2 +-
.../factory/method/FactoryMethodTest.java | 2 +-
feature-toggle/pom.xml | 3 +-
.../java/com/iluwatar/featuretoggle/App.java | 9 ++---
.../featuretoggle/pattern/Service.java | 8 ++--
.../PropertiesFeatureToggleVersion.java | 8 ++--
.../TieredFeatureToggleVersion.java | 8 ++--
.../com/iluwatar/featuretoggle/user/User.java | 8 ++--
.../featuretoggle/user/UserGroup.java | 8 ++--
.../PropertiesFeatureToggleVersionTest.java | 9 ++---
.../TieredFeatureToggleVersionTest.java | 8 ++--
.../featuretoggle/user/UserGroupTest.java | 8 ++--
fluentinterface/pom.xml | 2 +-
.../com/iluwatar/fluentinterface/app/App.java | 2 +-
.../fluentiterable/FluentIterable.java | 2 +-
.../lazy/DecoratingIterator.java | 2 +-
.../lazy/LazyFluentIterable.java | 2 +-
.../simple/SimpleFluentIterable.java | 2 +-
.../iluwatar/fluentinterface/app/AppTest.java | 2 +-
.../fluentiterable/FluentIterableTest.java | 2 +-
.../lazy/LazyFluentIterableTest.java | 2 +-
.../simple/SimpleFluentIterableTest.java | 2 +-
flux/pom.xml | 2 +-
.../java/com/iluwatar/flux/action/Action.java | 2 +-
.../com/iluwatar/flux/action/ActionType.java | 2 +-
.../com/iluwatar/flux/action/Content.java | 2 +-
.../iluwatar/flux/action/ContentAction.java | 2 +-
.../com/iluwatar/flux/action/MenuAction.java | 2 +-
.../com/iluwatar/flux/action/MenuItem.java | 2 +-
.../main/java/com/iluwatar/flux/app/App.java | 2 +-
.../iluwatar/flux/dispatcher/Dispatcher.java | 2 +-
.../com/iluwatar/flux/store/ContentStore.java | 2 +-
.../com/iluwatar/flux/store/MenuStore.java | 2 +-
.../java/com/iluwatar/flux/store/Store.java | 2 +-
.../com/iluwatar/flux/view/ContentView.java | 2 +-
.../java/com/iluwatar/flux/view/MenuView.java | 2 +-
.../java/com/iluwatar/flux/view/View.java | 2 +-
.../com/iluwatar/flux/action/ContentTest.java | 2 +-
.../iluwatar/flux/action/MenuItemTest.java | 2 +-
.../java/com/iluwatar/flux/app/AppTest.java | 2 +-
.../flux/dispatcher/DispatcherTest.java | 2 +-
.../iluwatar/flux/store/ContentStoreTest.java | 2 +-
.../iluwatar/flux/store/MenuStoreTest.java | 2 +-
.../iluwatar/flux/view/ContentViewTest.java | 2 +-
.../com/iluwatar/flux/view/MenuViewTest.java | 2 +-
flyweight/pom.xml | 2 +-
.../com/iluwatar/flyweight/AlchemistShop.java | 2 +-
.../main/java/com/iluwatar/flyweight/App.java | 2 +-
.../com/iluwatar/flyweight/HealingPotion.java | 2 +-
.../iluwatar/flyweight/HolyWaterPotion.java | 2 +-
.../flyweight/InvisibilityPotion.java | 2 +-
.../com/iluwatar/flyweight/PoisonPotion.java | 2 +-
.../java/com/iluwatar/flyweight/Potion.java | 2 +-
.../com/iluwatar/flyweight/PotionFactory.java | 2 +-
.../com/iluwatar/flyweight/PotionType.java | 2 +-
.../iluwatar/flyweight/StrengthPotion.java | 2 +-
.../iluwatar/flyweight/AlchemistShopTest.java | 2 +-
.../java/com/iluwatar/flyweight/AppTest.java | 2 +-
front-controller/pom.xml | 2 +-
.../com/iluwatar/front/controller/App.java | 2 +-
.../controller/ApplicationException.java | 2 +-
.../front/controller/ArcherCommand.java | 2 +-
.../iluwatar/front/controller/ArcherView.java | 2 +-
.../front/controller/CatapultCommand.java | 2 +-
.../front/controller/CatapultView.java | 2 +-
.../iluwatar/front/controller/Command.java | 2 +-
.../iluwatar/front/controller/ErrorView.java | 2 +-
.../front/controller/FrontController.java | 2 +-
.../front/controller/UnknownCommand.java | 2 +-
.../com/iluwatar/front/controller/View.java | 2 +-
.../iluwatar/front/controller/AppTest.java | 2 +-
.../controller/ApplicationExceptionTest.java | 2 +-
.../front/controller/CommandTest.java | 2 +-
.../front/controller/FrontControllerTest.java | 2 +-
.../iluwatar/front/controller/ViewTest.java | 2 +-
.../controller/utils/InMemoryAppender.java | 2 +-
guarded-suspension/pom.xml | 2 +-
.../com/iluwatar/guarded/suspension/App.java | 2 +-
.../guarded/suspension/GuardedQueue.java | 8 ++--
.../guarded/suspension/GuardedQueueTest.java | 8 ++--
half-sync-half-async/pom.xml | 2 +-
.../com/iluwatar/halfsynchalfasync/App.java | 2 +-
.../iluwatar/halfsynchalfasync/AsyncTask.java | 2 +-
.../AsynchronousService.java | 2 +-
.../iluwatar/halfsynchalfasync/AppTest.java | 2 +-
.../AsynchronousServiceTest.java | 2 +-
hexagonal/etc/ports_and_adapters.xml | 2 +-
hexagonal/etc/presentation.html | 2 +-
hexagonal/pom.xml | 2 +-
.../main/java/com/iluwatar/hexagonal/App.java | 2 +-
.../administration/ConsoleAdministration.java | 2 +-
.../ConsoleAdministrationSrv.java | 2 +-
.../ConsoleAdministrationSrvImpl.java | 2 +-
.../hexagonal/banking/InMemoryBank.java | 2 +-
.../iluwatar/hexagonal/banking/MongoBank.java | 2 +-
.../hexagonal/banking/WireTransfers.java | 2 +-
.../database/InMemoryTicketRepository.java | 2 +-
.../database/LotteryTicketRepository.java | 2 +-
.../database/MongoTicketRepository.java | 2 +-
.../domain/LotteryAdministration.java | 2 +-
.../hexagonal/domain/LotteryConstants.java | 2 +-
.../hexagonal/domain/LotteryNumbers.java | 2 +-
.../hexagonal/domain/LotteryService.java | 2 +-
.../hexagonal/domain/LotteryTicket.java | 2 +-
.../domain/LotteryTicketCheckResult.java | 2 +-
.../hexagonal/domain/LotteryTicketId.java | 2 +-
.../hexagonal/domain/LotteryUtils.java | 2 +-
.../hexagonal/domain/PlayerDetails.java | 2 +-
.../hexagonal/eventlog/LotteryEventLog.java | 2 +-
.../hexagonal/eventlog/MongoEventLog.java | 2 +-
.../hexagonal/eventlog/StdOutEventLog.java | 2 +-
.../hexagonal/module/LotteryModule.java | 2 +-
.../module/LotteryTestingModule.java | 2 +-
.../MongoConnectionPropertiesLoader.java | 2 +-
.../hexagonal/sampledata/SampleData.java | 2 +-
.../hexagonal/service/ConsoleLottery.java | 2 +-
.../service/LotteryConsoleService.java | 2 +-
.../service/LotteryConsoleServiceImpl.java | 2 +-
.../java/com/iluwatar/hexagonal/AppTest.java | 2 +-
.../hexagonal/banking/InMemoryBankTest.java | 2 +-
.../hexagonal/banking/MongoBankTest.java | 2 +-
.../InMemoryTicketRepositoryTest.java | 2 +-
.../database/MongoTicketRepositoryTest.java | 2 +-
.../hexagonal/domain/LotteryNumbersTest.java | 2 +-
.../hexagonal/domain/LotteryTest.java | 2 +-
.../domain/LotteryTicketCheckResultTest.java | 2 +-
.../hexagonal/domain/LotteryTicketIdTest.java | 2 +-
.../hexagonal/domain/LotteryTicketTest.java | 2 +-
.../hexagonal/domain/PlayerDetailsTest.java | 2 +-
.../hexagonal/eventlog/MongoEventLogTest.java | 2 +-
.../hexagonal/test/LotteryTestUtils.java | 2 +-
intercepting-filter/pom.xml | 2 +-
.../intercepting/filter/AbstractFilter.java | 2 +-
.../intercepting/filter/AddressFilter.java | 2 +-
.../com/iluwatar/intercepting/filter/App.java | 2 +-
.../iluwatar/intercepting/filter/Client.java | 2 +-
.../intercepting/filter/ContactFilter.java | 2 +-
.../intercepting/filter/DepositFilter.java | 2 +-
.../iluwatar/intercepting/filter/Filter.java | 2 +-
.../intercepting/filter/FilterChain.java | 2 +-
.../intercepting/filter/FilterManager.java | 2 +-
.../intercepting/filter/NameFilter.java | 2 +-
.../iluwatar/intercepting/filter/Order.java | 2 +-
.../intercepting/filter/OrderFilter.java | 2 +-
.../iluwatar/intercepting/filter/Target.java | 2 +-
.../iluwatar/intercepting/filter/AppTest.java | 2 +-
.../filter/FilterManagerTest.java | 2 +-
.../intercepting/filter/FilterTest.java | 2 +-
.../intercepting/filter/OrderTest.java | 2 +-
interpreter/pom.xml | 2 +-
.../java/com/iluwatar/interpreter/App.java | 2 +-
.../com/iluwatar/interpreter/Expression.java | 2 +-
.../iluwatar/interpreter/MinusExpression.java | 2 +-
.../interpreter/MultiplyExpression.java | 2 +-
.../interpreter/NumberExpression.java | 2 +-
.../iluwatar/interpreter/PlusExpression.java | 2 +-
.../com/iluwatar/interpreter/AppTest.java | 2 +-
.../iluwatar/interpreter/ExpressionTest.java | 2 +-
.../interpreter/MinusExpressionTest.java | 2 +-
.../interpreter/MultiplyExpressionTest.java | 2 +-
.../interpreter/NumberExpressionTest.java | 2 +-
.../interpreter/PlusExpressionTest.java | 2 +-
iterator/pom.xml | 2 +-
.../main/java/com/iluwatar/iterator/App.java | 28 +++++++------
.../java/com/iluwatar/iterator/Iterator.java | 28 +++++++------
.../iluwatar/iterator/bst/BstIterator.java | 28 +++++++------
.../com/iluwatar/iterator/bst/TreeNode.java | 28 +++++++------
.../java/com/iluwatar/iterator/list/Item.java | 2 +-
.../com/iluwatar/iterator/list/ItemType.java | 2 +-
.../iluwatar/iterator/list/TreasureChest.java | 28 +++++++------
.../list/TreasureChestItemIterator.java | 28 +++++++------
.../java/com/iluwatar/iterator/AppTest.java | 35 +++++++++--------
.../iterator/bst/BstIteratorTest.java | 28 +++++++------
.../iterator/list/TreasureChestTest.java | 28 +++++++------
layers/pom.xml | 2 +-
.../main/java/com/iluwatar/layers/App.java | 2 +-
.../main/java/com/iluwatar/layers/Cake.java | 2 +-
.../iluwatar/layers/CakeBakingException.java | 2 +-
.../iluwatar/layers/CakeBakingService.java | 2 +-
.../layers/CakeBakingServiceImpl.java | 2 +-
.../java/com/iluwatar/layers/CakeDao.java | 2 +-
.../java/com/iluwatar/layers/CakeInfo.java | 2 +-
.../java/com/iluwatar/layers/CakeLayer.java | 2 +-
.../com/iluwatar/layers/CakeLayerDao.java | 2 +-
.../com/iluwatar/layers/CakeLayerInfo.java | 2 +-
.../java/com/iluwatar/layers/CakeTopping.java | 2 +-
.../com/iluwatar/layers/CakeToppingDao.java | 2 +-
.../com/iluwatar/layers/CakeToppingInfo.java | 2 +-
.../com/iluwatar/layers/CakeViewImpl.java | 2 +-
.../main/java/com/iluwatar/layers/View.java | 2 +-
.../main/resources/META-INF/persistence.xml | 2 +-
.../src/main/resources/applicationContext.xml | 2 +-
layers/src/main/resources/logback.xml | 2 +-
.../java/com/iluwatar/layers/AppTest.java | 2 +-
.../layers/CakeBakingExceptionTest.java | 2 +-
.../layers/CakeBakingServiceImplTest.java | 2 +-
.../java/com/iluwatar/layers/CakeTest.java | 2 +-
.../com/iluwatar/layers/CakeViewImplTest.java | 2 +-
lazy-loading/pom.xml | 2 +-
.../java/com/iluwatar/lazy/loading/App.java | 2 +-
.../java/com/iluwatar/lazy/loading/Heavy.java | 2 +-
.../iluwatar/lazy/loading/HolderNaive.java | 2 +-
.../lazy/loading/HolderThreadSafe.java | 2 +-
.../iluwatar/lazy/loading/Java8Holder.java | 2 +-
.../lazy/loading/AbstractHolderTest.java | 2 +-
.../com/iluwatar/lazy/loading/AppTest.java | 2 +-
.../lazy/loading/HolderNaiveTest.java | 2 +-
.../lazy/loading/HolderThreadSafeTest.java | 2 +-
.../lazy/loading/Java8HolderTest.java | 2 +-
leader-election/pom.xml | 4 +-
.../leaderelection/AbstractInstance.java | 9 ++---
.../AbstractMessageManager.java | 9 ++---
.../com/iluwatar/leaderelection/Instance.java | 3 +-
.../com/iluwatar/leaderelection/Message.java | 3 +-
.../leaderelection/MessageManager.java | 3 +-
.../iluwatar/leaderelection/MessageType.java | 3 +-
.../leaderelection/bully/BullyApp.java | 9 ++---
.../leaderelection/bully/BullyInstance.java | 9 ++---
.../bully/BullyMessageManager.java | 9 ++---
.../iluwatar/leaderelection/ring/RingApp.java | 3 +-
.../leaderelection/ring/RingInstance.java | 3 +-
.../ring/RingMessageManager.java | 3 +-
.../iluwatar/leaderelection/MessageTest.java | 9 ++---
.../leaderelection/bully/BullyAppTest.java | 9 ++---
.../bully/BullyMessageManagerTest.java | 9 ++---
.../bully/BullyinstanceTest.java | 9 ++---
.../leaderelection/ring/RingAppTest.java | 9 ++---
.../leaderelection/ring/RingInstanceTest.java | 9 ++---
.../ring/RingMessageManagerTest.java | 9 ++---
marker/pom.xml | 7 +++-
marker/src/main/java/App.java | 2 +-
marker/src/main/java/Guard.java | 2 +-
marker/src/main/java/Permission.java | 2 +-
marker/src/main/java/Thief.java | 2 +-
marker/src/test/java/AppTest.java | 3 +-
marker/src/test/java/GuardTest.java | 3 +-
marker/src/test/java/ThiefTest.java | 3 +-
master-worker-pattern/pom.xml | 2 +-
.../java/com/iluwatar/masterworker/App.java | 3 +-
.../com/iluwatar/masterworker/ArrayInput.java | 3 +-
.../iluwatar/masterworker/ArrayResult.java | 3 +-
.../masterworker/ArrayUtilityMethods.java | 3 +-
.../java/com/iluwatar/masterworker/Input.java | 3 +-
.../com/iluwatar/masterworker/Result.java | 3 +-
.../system/ArrayTransposeMasterWorker.java | 3 +-
.../masterworker/system/MasterWorker.java | 3 +-
.../systemmaster/ArrayTransposeMaster.java | 3 +-
.../system/systemmaster/Master.java | 3 +-
.../systemworkers/ArrayTransposeWorker.java | 3 +-
.../system/systemworkers/Worker.java | 3 +-
.../iluwatar/masterworker/ArrayInputTest.java | 3 +-
.../masterworker/ArrayUtilityMethodsTest.java | 2 +-
.../ArrayTransposeMasterWorkerTest.java | 3 +-
.../ArrayTransposeWorkerTest.java | 3 +-
mediator/pom.xml | 2 +-
.../java/com/iluwatar/mediator/Action.java | 2 +-
.../main/java/com/iluwatar/mediator/App.java | 2 +-
.../java/com/iluwatar/mediator/Hobbit.java | 2 +-
.../java/com/iluwatar/mediator/Hunter.java | 2 +-
.../java/com/iluwatar/mediator/Party.java | 2 +-
.../java/com/iluwatar/mediator/PartyImpl.java | 2 +-
.../com/iluwatar/mediator/PartyMember.java | 2 +-
.../iluwatar/mediator/PartyMemberBase.java | 2 +-
.../java/com/iluwatar/mediator/Rogue.java | 2 +-
.../java/com/iluwatar/mediator/Wizard.java | 2 +-
.../java/com/iluwatar/mediator/AppTest.java | 2 +-
.../com/iluwatar/mediator/PartyImplTest.java | 2 +-
.../iluwatar/mediator/PartyMemberTest.java | 2 +-
memento/pom.xml | 2 +-
.../main/java/com/iluwatar/memento/App.java | 2 +-
.../main/java/com/iluwatar/memento/Star.java | 2 +-
.../com/iluwatar/memento/StarMemento.java | 2 +-
.../java/com/iluwatar/memento/StarType.java | 2 +-
.../java/com/iluwatar/memento/AppTest.java | 2 +-
.../java/com/iluwatar/memento/StarTest.java | 2 +-
model-view-controller/pom.xml | 2 +-
.../iluwatar/model/view/controller/App.java | 2 +-
.../model/view/controller/Fatigue.java | 2 +-
.../view/controller/GiantController.java | 2 +-
.../model/view/controller/GiantModel.java | 2 +-
.../model/view/controller/GiantView.java | 2 +-
.../model/view/controller/Health.java | 2 +-
.../model/view/controller/Nourishment.java | 2 +-
.../model/view/controller/AppTest.java | 2 +-
.../view/controller/GiantControllerTest.java | 2 +-
.../model/view/controller/GiantModelTest.java | 2 +-
.../model/view/controller/GiantViewTest.java | 2 +-
model-view-presenter/etc/data/test.txt | 2 +-
model-view-presenter/pom.xml | 2 +-
.../iluwatar/model/view/presenter/App.java | 2 +-
.../model/view/presenter/FileLoader.java | 2 +-
.../view/presenter/FileSelectorJFrame.java | 2 +-
.../view/presenter/FileSelectorPresenter.java | 2 +-
.../view/presenter/FileSelectorStub.java | 2 +-
.../view/presenter/FileSelectorView.java | 2 +-
.../model/view/presenter/AppTest.java | 2 +-
.../model/view/presenter/FileLoaderTest.java | 2 +-
.../presenter/FileSelectorPresenterTest.java | 2 +-
module/pom.xml | 2 +-
.../main/java/com/iluwatar/module/App.java | 28 +++++++------
.../iluwatar/module/ConsoleLoggerModule.java | 28 +++++++------
.../com/iluwatar/module/FileLoggerModule.java | 28 +++++++------
module/src/main/resources/log4j.xml | 2 +-
.../java/com/iluwatar/module/AppTest.java | 28 +++++++------
.../iluwatar/module/FileLoggerModuleTest.java | 28 +++++++------
monad/pom.xml | 2 +-
.../src/main/java/com/iluwatar/monad/App.java | 2 +-
.../src/main/java/com/iluwatar/monad/Sex.java | 2 +-
.../main/java/com/iluwatar/monad/User.java | 2 +-
.../java/com/iluwatar/monad/Validator.java | 2 +-
.../test/java/com/iluwatar/monad/AppTest.java | 2 +-
.../java/com/iluwatar/monad/MonadTest.java | 2 +-
monostate/pom.xml | 2 +-
.../main/java/com/iluwatar/monostate/App.java | 2 +-
.../com/iluwatar/monostate/LoadBalancer.java | 2 +-
.../java/com/iluwatar/monostate/Request.java | 2 +-
.../java/com/iluwatar/monostate/Server.java | 2 +-
.../java/com/iluwatar/monostate/AppTest.java | 2 +-
.../iluwatar/monostate/LoadBalancerTest.java | 2 +-
multiton/pom.xml | 2 +-
.../main/java/com/iluwatar/multiton/App.java | 2 +-
.../java/com/iluwatar/multiton/Nazgul.java | 2 +-
.../com/iluwatar/multiton/NazgulEnum.java | 2 +-
.../com/iluwatar/multiton/NazgulName.java | 2 +-
.../java/com/iluwatar/multiton/AppTest.java | 2 +-
.../com/iluwatar/multiton/NazgulEnumTest.java | 2 +-
.../com/iluwatar/multiton/NazgulTest.java | 2 +-
mute-idiom/pom.xml | 39 ++++++++++++-------
.../src/main/java/com/iluwatar/mute/App.java | 3 +-
.../com/iluwatar/mute/CheckedRunnable.java | 3 +-
.../src/main/java/com/iluwatar/mute/Mute.java | 2 +-
.../main/java/com/iluwatar/mute/Resource.java | 3 +-
.../test/java/com/iluwatar/mute/AppTest.java | 3 +-
.../test/java/com/iluwatar/mute/MuteTest.java | 3 +-
mutex/pom.xml | 2 +-
.../src/main/java/com/iluwatar/mutex/App.java | 2 +-
.../src/main/java/com/iluwatar/mutex/Jar.java | 2 +-
.../main/java/com/iluwatar/mutex/Lock.java | 2 +-
.../main/java/com/iluwatar/mutex/Mutex.java | 2 +-
.../main/java/com/iluwatar/mutex/Thief.java | 2 +-
.../test/java/com/iluwatar/mutex/AppTest.java | 2 +-
.../test/java/com/iluwatar/mutex/JarTest.java | 2 +-
.../java/com/iluwatar/mutex/MutexTest.java | 2 +-
naked-objects/dom/exclude-pmd.properties | 2 +-
naked-objects/dom/pom.xml | 34 +++++++++++-----
.../src/main/java/META-INF/persistence.xml | 38 ++++++++++--------
.../dom/app/homepage/HomePageService.java | 30 ++++++++------
.../dom/app/homepage/HomePageViewModel.java | 30 ++++++++------
.../dom/modules/simple/SimpleObject.java | 30 ++++++++------
.../dom/modules/simple/SimpleObjects.java | 30 ++++++++------
.../dom/modules/simple/SimpleObjectTest.java | 28 ++++++++-----
.../dom/modules/simple/SimpleObjectsTest.java | 28 ++++++++-----
naked-objects/fixture/pom.xml | 34 +++++++++++-----
.../fixture/DomainAppFixturesProvider.java | 34 +++++++++-------
.../modules/simple/SimpleObjectCreate.java | 31 +++++++++------
.../modules/simple/SimpleObjectsTearDown.java | 31 +++++++++------
.../scenarios/RecreateSimpleObjects.java | 31 +++++++++------
naked-objects/integtests/pom.xml | 34 +++++++++++-----
.../bootstrap/SimpleAppSystemInitializer.java | 30 ++++++++------
.../specglue/BootstrappingGlue.java | 28 ++++++++-----
.../specglue/CatalogOfFixturesGlue.java | 28 ++++++++-----
.../modules/simple/SimpleObjectGlue.java | 28 ++++++++-----
.../domainapp/integtests/specs/RunSpecs.java | 28 ++++++++-----
.../integtests/tests/SimpleAppIntegTest.java | 34 +++++++++-------
.../modules/simple/SimpleObjectIntegTest.java | 34 +++++++++-------
.../simple/SimpleObjectsIntegTest.java | 34 +++++++++-------
naked-objects/pom.xml | 34 +++++++++++-----
.../webapp/ide/intellij/launch/README.txt | 2 +-
.../intellij/launch/SimpleApp_PROTOTYPE.xml | 2 +-
.../launch/SimpleApp__enhance_only_.xml | 2 +-
naked-objects/webapp/pom.xml | 34 +++++++++++-----
.../domainapp/webapp/SimpleApplication.java | 34 +++++++++-------
.../resources/domainapp/webapp/welcome.html | 38 ++++++++++--------
.../src/main/webapp/WEB-INF/isis.properties | 38 ++++++++++--------
.../main/webapp/WEB-INF/persistor.properties | 38 ++++++++++--------
.../WEB-INF/persistor_datanucleus.properties | 38 ++++++++++--------
.../WEB-INF/viewer_restfulobjects.properties | 38 ++++++++++--------
.../webapp/WEB-INF/viewer_wicket.properties | 38 ++++++++++--------
.../webapp/src/main/webapp/WEB-INF/web.xml | 38 ++++++++++--------
.../webapp/src/main/webapp/about/index.html | 2 +-
.../src/main/webapp/css/application.css | 35 +++++++++--------
.../src/main/webapp/scripts/application.js | 2 +-
null-object/pom.xml | 2 +-
.../java/com/iluwatar/nullobject/App.java | 2 +-
.../java/com/iluwatar/nullobject/Node.java | 2 +-
.../com/iluwatar/nullobject/NodeImpl.java | 2 +-
.../com/iluwatar/nullobject/NullNode.java | 2 +-
.../java/com/iluwatar/nullobject/AppTest.java | 2 +-
.../com/iluwatar/nullobject/NullNodeTest.java | 2 +-
.../com/iluwatar/nullobject/TreeTest.java | 2 +-
object-mother/pom.xml | 2 +-
.../java/com/iluwatar/objectmother/King.java | 2 +-
.../java/com/iluwatar/objectmother/Queen.java | 2 +-
.../com/iluwatar/objectmother/Royalty.java | 2 +-
.../objectmother/RoyaltyObjectMother.java | 2 +-
.../test/RoyaltyObjectMotherTest.java | 2 +-
object-pool/pom.xml | 2 +-
.../java/com/iluwatar/object/pool/App.java | 2 +-
.../com/iluwatar/object/pool/ObjectPool.java | 2 +-
.../com/iluwatar/object/pool/Oliphaunt.java | 2 +-
.../iluwatar/object/pool/OliphauntPool.java | 2 +-
.../com/iluwatar/object/pool/AppTest.java | 2 +-
.../object/pool/OliphauntPoolTest.java | 2 +-
observer/pom.xml | 2 +-
.../main/java/com/iluwatar/observer/App.java | 2 +-
.../java/com/iluwatar/observer/Hobbits.java | 2 +-
.../main/java/com/iluwatar/observer/Orcs.java | 2 +-
.../java/com/iluwatar/observer/Weather.java | 2 +-
.../iluwatar/observer/WeatherObserver.java | 2 +-
.../com/iluwatar/observer/WeatherType.java | 2 +-
.../iluwatar/observer/generic/GHobbits.java | 2 +-
.../com/iluwatar/observer/generic/GOrcs.java | 2 +-
.../iluwatar/observer/generic/GWeather.java | 2 +-
.../iluwatar/observer/generic/Observable.java | 2 +-
.../iluwatar/observer/generic/Observer.java | 2 +-
.../com/iluwatar/observer/generic/Race.java | 2 +-
.../java/com/iluwatar/observer/AppTest.java | 2 +-
.../com/iluwatar/observer/HobbitsTest.java | 2 +-
.../java/com/iluwatar/observer/OrcsTest.java | 2 +-
.../observer/WeatherObserverTest.java | 2 +-
.../com/iluwatar/observer/WeatherTest.java | 2 +-
.../observer/generic/GHobbitsTest.java | 2 +-
.../observer/generic/GWeatherTest.java | 2 +-
.../observer/generic/ObserverTest.java | 2 +-
.../iluwatar/observer/generic/OrcsTest.java | 2 +-
.../observer/utils/InMemoryAppender.java | 2 +-
page-object/pom.xml | 2 +-
page-object/sample-application/pom.xml | 2 +-
.../java/com/iluwatar/pageobject/App.java | 2 +-
.../main/resources/sample-ui/album-list.html | 2 +-
.../main/resources/sample-ui/album-page.html | 2 +-
.../resources/sample-ui/css/album-list.css | 2 +-
.../main/resources/sample-ui/css/style.css | 2 +-
.../src/main/resources/sample-ui/login.html | 2 +-
.../java/com/iluwatar/pageobject/App.java | 2 +-
.../main/resources/sample-ui/album-list.html | 2 +-
.../main/resources/sample-ui/album-page.html | 2 +-
.../resources/sample-ui/css/album-list.css | 2 +-
.../main/resources/sample-ui/css/style.css | 2 +-
.../src/main/resources/sample-ui/login.html | 2 +-
.../pageobject/AlbumListPageTest.java | 8 ++--
.../iluwatar/pageobject/AlbumPageTest.java | 8 ++--
.../iluwatar/pageobject/LoginPageTest.java | 8 ++--
.../pageobject/pages/AlbumListPage.java | 8 ++--
.../iluwatar/pageobject/pages/AlbumPage.java | 8 ++--
.../iluwatar/pageobject/pages/LoginPage.java | 8 ++--
.../com/iluwatar/pageobject/pages/Page.java | 8 ++--
page-object/test-automation/pom.xml | 2 +-
.../iluwatar/pageobject/AlbumListPage.java | 8 ++--
.../com/iluwatar/pageobject/AlbumPage.java | 8 ++--
.../com/iluwatar/pageobject/LoginPage.java | 8 ++--
.../java/com/iluwatar/pageobject/Page.java | 8 ++--
.../pageobject/AlbumListPageTest.java | 8 ++--
.../iluwatar/pageobject/AlbumPageTest.java | 8 ++--
.../iluwatar/pageobject/LoginPageTest.java | 8 ++--
partial-response/pom.xml | 2 +-
.../com/iluwatar/partialresponse/App.java | 16 ++++----
.../partialresponse/FieldJsonMapper.java | 16 ++++----
.../com/iluwatar/partialresponse/Video.java | 16 ++++----
.../partialresponse/VideoResource.java | 16 ++++----
.../com/iluwatar/partialresponse/AppTest.java | 16 ++++----
.../partialresponse/FieldJsonMapperTest.java | 16 ++++----
.../partialresponse/VideoResourceTest.java | 16 ++++----
pipeline/pom.xml | 2 +-
.../main/java/com.iluwatar.pipeline/App.java | 2 +-
.../ConvertToCharArrayHandler.java | 8 ++--
.../java/com.iluwatar.pipeline/Handler.java | 2 +-
.../java/com.iluwatar.pipeline/Pipeline.java | 2 +-
.../RemoveAlphabetsHandler.java | 2 +-
.../RemoveDigitsHandler.java | 2 +-
.../java/com.iluwatar.pipeline/AppTest.java | 8 ++--
.../com.iluwatar.pipeline/PipelineTest.java | 8 ++--
poison-pill/pom.xml | 2 +-
.../java/com/iluwatar/poison/pill/App.java | 2 +-
.../com/iluwatar/poison/pill/Consumer.java | 2 +-
.../com/iluwatar/poison/pill/Message.java | 2 +-
.../iluwatar/poison/pill/MessageQueue.java | 2 +-
.../iluwatar/poison/pill/MqPublishPoint.java | 2 +-
.../poison/pill/MqSubscribePoint.java | 2 +-
.../com/iluwatar/poison/pill/Producer.java | 2 +-
.../iluwatar/poison/pill/SimpleMessage.java | 2 +-
.../poison/pill/SimpleMessageQueue.java | 2 +-
.../com/iluwatar/poison/pill/AppTest.java | 2 +-
.../iluwatar/poison/pill/ConsumerTest.java | 2 +-
.../poison/pill/PoisonMessageTest.java | 2 +-
.../iluwatar/poison/pill/ProducerTest.java | 2 +-
.../poison/pill/SimpleMessageTest.java | 2 +-
pom.xml | 9 ++++-
priority-queue/pom.xml | 2 +-
.../iluwatar/priority/queue/Application.java | 8 ++--
.../com/iluwatar/priority/queue/Message.java | 2 +-
.../priority/queue/PriorityMessageQueue.java | 8 ++--
.../iluwatar/priority/queue/QueueManager.java | 8 ++--
.../com/iluwatar/priority/queue/Worker.java | 8 ++--
.../queue/PriorityMessageQueueTest.java | 2 +-
.../priority/queue/QueueManagerTest.java | 2 +-
private-class-data/pom.xml | 2 +-
.../com/iluwatar/privateclassdata/App.java | 2 +-
.../privateclassdata/ImmutableStew.java | 2 +-
.../com/iluwatar/privateclassdata/Stew.java | 2 +-
.../iluwatar/privateclassdata/StewData.java | 2 +-
.../iluwatar/privateclassdata/AppTest.java | 2 +-
.../privateclassdata/ImmutableStewTest.java | 2 +-
.../iluwatar/privateclassdata/StewTest.java | 2 +-
.../utils/InMemoryAppender.java | 2 +-
producer-consumer/pom.xml | 2 +-
.../com/iluwatar/producer/consumer/App.java | 2 +-
.../iluwatar/producer/consumer/Consumer.java | 2 +-
.../com/iluwatar/producer/consumer/Item.java | 2 +-
.../iluwatar/producer/consumer/ItemQueue.java | 2 +-
.../iluwatar/producer/consumer/Producer.java | 2 +-
.../iluwatar/producer/consumer/AppTest.java | 2 +-
.../producer/consumer/ConsumerTest.java | 2 +-
.../producer/consumer/ProducerTest.java | 2 +-
promise/pom.xml | 2 +-
.../main/java/com/iluwatar/promise/App.java | 2 +-
.../java/com/iluwatar/promise/Promise.java | 2 +-
.../com/iluwatar/promise/PromiseSupport.java | 2 +-
.../java/com/iluwatar/promise/Utility.java | 2 +-
.../java/com/iluwatar/promise/AppTest.java | 2 +-
.../com/iluwatar/promise/PromiseTest.java | 2 +-
property/pom.xml | 2 +-
.../main/java/com/iluwatar/property/App.java | 2 +-
.../java/com/iluwatar/property/Character.java | 2 +-
.../java/com/iluwatar/property/Prototype.java | 2 +-
.../java/com/iluwatar/property/Stats.java | 2 +-
.../java/com/iluwatar/property/AppTest.java | 2 +-
.../com/iluwatar/property/CharacterTest.java | 2 +-
prototype/pom.xml | 2 +-
.../main/java/com/iluwatar/prototype/App.java | 2 +-
.../java/com/iluwatar/prototype/Beast.java | 2 +-
.../java/com/iluwatar/prototype/ElfBeast.java | 2 +-
.../java/com/iluwatar/prototype/ElfMage.java | 2 +-
.../com/iluwatar/prototype/ElfWarlord.java | 2 +-
.../com/iluwatar/prototype/HeroFactory.java | 2 +-
.../iluwatar/prototype/HeroFactoryImpl.java | 2 +-
.../java/com/iluwatar/prototype/Mage.java | 2 +-
.../java/com/iluwatar/prototype/OrcBeast.java | 2 +-
.../java/com/iluwatar/prototype/OrcMage.java | 2 +-
.../com/iluwatar/prototype/OrcWarlord.java | 2 +-
.../com/iluwatar/prototype/Prototype.java | 2 +-
.../java/com/iluwatar/prototype/Warlord.java | 2 +-
.../java/com/iluwatar/prototype/AppTest.java | 2 +-
.../prototype/HeroFactoryImplTest.java | 2 +-
.../com/iluwatar/prototype/PrototypeTest.java | 2 +-
proxy/etc/presentation.html | 2 +-
proxy/etc/proxy-concept.xml | 2 +-
proxy/pom.xml | 2 +-
.../src/main/java/com/iluwatar/proxy/App.java | 2 +-
.../java/com/iluwatar/proxy/IvoryTower.java | 2 +-
.../main/java/com/iluwatar/proxy/Wizard.java | 2 +-
.../java/com/iluwatar/proxy/WizardTower.java | 2 +-
.../com/iluwatar/proxy/WizardTowerProxy.java | 2 +-
.../test/java/com/iluwatar/proxy/AppTest.java | 2 +-
.../com/iluwatar/proxy/IvoryTowerTest.java | 2 +-
.../java/com/iluwatar/proxy/WizardTest.java | 2 +-
.../iluwatar/proxy/WizardTowerProxyTest.java | 2 +-
.../proxy/utils/InMemoryAppender.java | 2 +-
queue-load-leveling/pom.xml | 2 +-
.../com/iluwatar/queue/load/leveling/App.java | 3 +-
.../iluwatar/queue/load/leveling/Message.java | 2 +-
.../queue/load/leveling/MessageQueue.java | 2 +-
.../queue/load/leveling/ServiceExecutor.java | 3 +-
.../iluwatar/queue/load/leveling/Task.java | 2 +-
.../queue/load/leveling/TaskGenerator.java | 2 +-
.../iluwatar/queue/load/leveling/AppTest.java | 2 +-
.../queue/load/leveling/MessageQueueTest.java | 2 +-
.../queue/load/leveling/MessageTest.java | 2 +-
.../load/leveling/TaskGenSrvExeTest.java | 2 +-
reactor/pom.xml | 2 +-
.../java/com/iluwatar/reactor/app/App.java | 2 +-
.../com/iluwatar/reactor/app/AppClient.java | 2 +-
.../iluwatar/reactor/app/LoggingHandler.java | 2 +-
.../reactor/framework/AbstractNioChannel.java | 2 +-
.../reactor/framework/ChannelHandler.java | 2 +-
.../reactor/framework/Dispatcher.java | 2 +-
.../reactor/framework/NioDatagramChannel.java | 2 +-
.../reactor/framework/NioReactor.java | 2 +-
.../framework/NioServerSocketChannel.java | 2 +-
.../framework/SameThreadDispatcher.java | 2 +-
.../framework/ThreadPoolDispatcher.java | 2 +-
.../com/iluwatar/reactor/app/ReactorTest.java | 2 +-
reader-writer-lock/pom.xml | 3 +-
.../com/iluwatar/reader/writer/lock/App.java | 3 +-
.../iluwatar/reader/writer/lock/Reader.java | 2 +-
.../reader/writer/lock/ReaderWriterLock.java | 2 +-
.../iluwatar/reader/writer/lock/Writer.java | 2 +-
.../iluwatar/reader/writer/lock/AppTest.java | 2 +-
.../writer/lock/ReaderAndWriterTest.java | 3 +-
.../reader/writer/lock/ReaderTest.java | 2 +-
.../reader/writer/lock/WriterTest.java | 2 +-
.../writer/lock/utils/InMemoryAppender.java | 2 +-
repository/pom.xml | 2 +-
.../java/com/iluwatar/repository/App.java | 2 +-
.../com/iluwatar/repository/AppConfig.java | 2 +-
.../java/com/iluwatar/repository/Person.java | 2 +-
.../iluwatar/repository/PersonRepository.java | 2 +-
.../repository/PersonSpecifications.java | 2 +-
.../main/resources/META-INF/persistence.xml | 2 +-
.../src/main/resources/applicationContext.xml | 2 +-
repository/src/main/resources/logback.xml | 2 +-
.../AnnotationBasedRepositoryTest.java | 2 +-
.../iluwatar/repository/AppConfigTest.java | 2 +-
.../java/com/iluwatar/repository/AppTest.java | 2 +-
.../iluwatar/repository/RepositoryTest.java | 2 +-
.../pom.xml | 2 +-
.../acquisition/is/initialization/App.java | 2 +-
.../is/initialization/SlidingDoor.java | 2 +-
.../is/initialization/TreasureChest.java | 2 +-
.../is/initialization/AppTest.java | 2 +-
.../is/initialization/ClosableTest.java | 2 +-
retry/pom.xml | 4 +-
.../src/main/java/com/iluwatar/retry/App.java | 22 +++++------
.../com/iluwatar/retry/BusinessException.java | 22 +++++------
.../com/iluwatar/retry/BusinessOperation.java | 22 +++++------
.../retry/CustomerNotFoundException.java | 22 +++++------
.../retry/DatabaseNotAvailableException.java | 22 +++++------
.../java/com/iluwatar/retry/FindCustomer.java | 22 +++++------
.../main/java/com/iluwatar/retry/Retry.java | 22 +++++------
.../retry/RetryExponentialBackoff.java | 16 ++++----
.../com/iluwatar/retry/FindCustomerTest.java | 22 +++++------
.../retry/RetryExponentialBackoffTest.java | 16 ++++----
.../java/com/iluwatar/retry/RetryTest.java | 22 +++++------
semaphore/pom.xml | 2 +-
.../main/java/com/iluwatar/semaphore/App.java | 2 +-
.../java/com/iluwatar/semaphore/Customer.java | 2 +-
.../java/com/iluwatar/semaphore/Fruit.java | 2 +-
.../com/iluwatar/semaphore/FruitBowl.java | 2 +-
.../com/iluwatar/semaphore/FruitShop.java | 2 +-
.../java/com/iluwatar/semaphore/Lock.java | 2 +-
.../com/iluwatar/semaphore/Semaphore.java | 2 +-
.../java/com/iluwatar/semaphore/AppTest.java | 2 +-
.../com/iluwatar/semaphore/FruitBowlTest.java | 2 +-
.../com/iluwatar/semaphore/SemaphoreTest.java | 2 +-
servant/pom.xml | 2 +-
servant/src/etc/servant.xml | 2 +-
.../main/java/com/iluwatar/servant/App.java | 2 +-
.../main/java/com/iluwatar/servant/King.java | 2 +-
.../main/java/com/iluwatar/servant/Queen.java | 2 +-
.../java/com/iluwatar/servant/Royalty.java | 2 +-
.../java/com/iluwatar/servant/Servant.java | 2 +-
.../java/com/iluwatar/servant/AppTest.java | 2 +-
.../java/com/iluwatar/servant/KingTest.java | 2 +-
.../java/com/iluwatar/servant/QueenTest.java | 2 +-
.../com/iluwatar/servant/ServantTest.java | 2 +-
serverless/pom.xml | 7 +++-
serverless/serverless.yml | 2 +-
.../baas/api/AbstractDynamoDbHandler.java | 2 +-
.../baas/api/FindPersonApiHandler.java | 2 +-
.../baas/api/SavePersonApiHandler.java | 2 +-
.../serverless/baas/model/Address.java | 2 +-
.../serverless/baas/model/Person.java | 2 +-
.../serverless/faas/ApiGatewayResponse.java | 2 +-
.../iluwatar/serverless/faas/LambdaInfo.java | 2 +-
.../faas/api/LambdaInfoApiHandler.java | 2 +-
.../src/main/resources/log4j.properties | 2 +-
.../baas/api/FindPersonApiHandlerTest.java | 2 +-
.../baas/api/SavePersonApiHandlerTest.java | 2 +-
.../faas/api/LambdaInfoApiHandlerTest.java | 8 ++--
service-layer/pom.xml | 2 +-
.../com/iluwatar/servicelayer/app/App.java | 2 +-
.../servicelayer/common/BaseEntity.java | 2 +-
.../com/iluwatar/servicelayer/common/Dao.java | 2 +-
.../servicelayer/common/DaoBaseImpl.java | 2 +-
.../servicelayer/hibernate/HibernateUtil.java | 2 +-
.../servicelayer/magic/MagicService.java | 2 +-
.../servicelayer/magic/MagicServiceImpl.java | 2 +-
.../iluwatar/servicelayer/spell/Spell.java | 2 +-
.../iluwatar/servicelayer/spell/SpellDao.java | 2 +-
.../servicelayer/spell/SpellDaoImpl.java | 2 +-
.../servicelayer/spellbook/Spellbook.java | 2 +-
.../servicelayer/spellbook/SpellbookDao.java | 2 +-
.../spellbook/SpellbookDaoImpl.java | 2 +-
.../iluwatar/servicelayer/wizard/Wizard.java | 2 +-
.../servicelayer/wizard/WizardDao.java | 2 +-
.../servicelayer/wizard/WizardDaoImpl.java | 2 +-
service-layer/src/main/resources/logback.xml | 2 +-
.../iluwatar/servicelayer/app/AppTest.java | 2 +-
.../servicelayer/common/BaseDaoTest.java | 2 +-
.../magic/MagicServiceImplTest.java | 2 +-
.../servicelayer/spell/SpellDaoImplTest.java | 2 +-
.../spellbook/SpellbookDaoImplTest.java | 2 +-
.../wizard/WizardDaoImplTest.java | 2 +-
service-locator/pom.xml | 2 +-
.../java/com/iluwatar/servicelocator/App.java | 2 +-
.../iluwatar/servicelocator/InitContext.java | 2 +-
.../com/iluwatar/servicelocator/Service.java | 2 +-
.../iluwatar/servicelocator/ServiceCache.java | 2 +-
.../iluwatar/servicelocator/ServiceImpl.java | 2 +-
.../servicelocator/ServiceLocator.java | 2 +-
.../com/iluwatar/servicelocator/AppTest.java | 2 +-
.../servicelocator/ServiceLocatorTest.java | 2 +-
singleton/pom.xml | 2 +-
.../main/java/com/iluwatar/singleton/App.java | 2 +-
.../iluwatar/singleton/EnumIvoryTower.java | 2 +-
.../InitializingOnDemandHolderIdiom.java | 2 +-
.../com/iluwatar/singleton/IvoryTower.java | 2 +-
.../ThreadSafeDoubleCheckLocking.java | 2 +-
.../ThreadSafeLazyLoadedIvoryTower.java | 28 +++++++------
.../java/com/iluwatar/singleton/AppTest.java | 2 +-
.../singleton/EnumIvoryTowerTest.java | 2 +-
.../InitializingOnDemandHolderIdiomTest.java | 2 +-
.../iluwatar/singleton/IvoryTowerTest.java | 2 +-
.../com/iluwatar/singleton/SingletonTest.java | 2 +-
.../ThreadSafeDoubleCheckLockingTest.java | 2 +-
.../ThreadSafeLazyLoadedIvoryTowerTest.java | 2 +-
spatial-partition/pom.xml | 2 +-
.../com/iluwatar/spatialpartition/App.java | 3 +-
.../com/iluwatar/spatialpartition/Bubble.java | 3 +-
.../com/iluwatar/spatialpartition/Point.java | 3 +-
.../iluwatar/spatialpartition/QuadTree.java | 3 +-
.../com/iluwatar/spatialpartition/Rect.java | 3 +-
.../SpatialPartitionBubbles.java | 3 +-
.../SpatialPartitionGeneric.java | 3 +-
.../iluwatar/spatialpartition/BubbleTest.java | 3 +-
.../spatialpartition/QuadTreeTest.java | 3 +-
.../iluwatar/spatialpartition/RectTest.java | 3 +-
.../SpatialPartitionBubblesTest.java | 3 +-
specification/pom.xml | 2 +-
.../com/iluwatar/specification/app/App.java | 2 +-
.../creature/AbstractCreature.java | 2 +-
.../specification/creature/Creature.java | 2 +-
.../specification/creature/Dragon.java | 2 +-
.../specification/creature/Goblin.java | 2 +-
.../specification/creature/KillerBee.java | 2 +-
.../specification/creature/Octopus.java | 2 +-
.../specification/creature/Shark.java | 2 +-
.../specification/creature/Troll.java | 2 +-
.../specification/property/Color.java | 2 +-
.../specification/property/Movement.java | 2 +-
.../iluwatar/specification/property/Size.java | 2 +-
.../specification/selector/ColorSelector.java | 2 +-
.../selector/MovementSelector.java | 2 +-
.../specification/selector/SizeSelector.java | 2 +-
.../iluwatar/specification/app/AppTest.java | 2 +-
.../specification/creature/CreatureTest.java | 2 +-
.../selector/ColorSelectorTest.java | 2 +-
.../selector/MovementSelectorTest.java | 2 +-
.../selector/SizeSelectorTest.java | 2 +-
state/pom.xml | 2 +-
.../java/com/iluwatar/state/AngryState.java | 2 +-
.../src/main/java/com/iluwatar/state/App.java | 2 +-
.../main/java/com/iluwatar/state/Mammoth.java | 2 +-
.../com/iluwatar/state/PeacefulState.java | 2 +-
.../main/java/com/iluwatar/state/State.java | 2 +-
.../test/java/com/iluwatar/state/AppTest.java | 2 +-
.../java/com/iluwatar/state/MammothTest.java | 2 +-
step-builder/pom.xml | 2 +-
.../java/com/iluwatar/stepbuilder/App.java | 2 +-
.../com/iluwatar/stepbuilder/Character.java | 2 +-
.../stepbuilder/CharacterStepBuilder.java | 2 +-
.../com/iluwatar/stepbuilder/AppTest.java | 2 +-
.../stepbuilder/CharacterStepBuilderTest.java | 2 +-
strategy/pom.xml | 2 +-
.../main/java/com/iluwatar/strategy/App.java | 2 +-
.../com/iluwatar/strategy/DragonSlayer.java | 2 +-
.../strategy/DragonSlayingStrategy.java | 2 +-
.../com/iluwatar/strategy/MeleeStrategy.java | 2 +-
.../iluwatar/strategy/ProjectileStrategy.java | 2 +-
.../com/iluwatar/strategy/SpellStrategy.java | 2 +-
.../java/com/iluwatar/strategy/AppTest.java | 2 +-
.../iluwatar/strategy/DragonSlayerTest.java | 2 +-
.../strategy/DragonSlayingStrategyTest.java | 2 +-
template-method/pom.xml | 2 +-
.../java/com/iluwatar/templatemethod/App.java | 2 +-
.../templatemethod/HalflingThief.java | 2 +-
.../templatemethod/HitAndRunMethod.java | 2 +-
.../templatemethod/StealingMethod.java | 2 +-
.../iluwatar/templatemethod/SubtleMethod.java | 2 +-
.../com/iluwatar/templatemethod/AppTest.java | 2 +-
.../templatemethod/HalflingThiefTest.java | 2 +-
.../templatemethod/HitAndRunMethodTest.java | 2 +-
.../templatemethod/StealingMethodTest.java | 2 +-
.../templatemethod/SubtleMethodTest.java | 2 +-
thread-pool/pom.xml | 2 +-
.../java/com/iluwatar/threadpool/App.java | 2 +-
.../iluwatar/threadpool/CoffeeMakingTask.java | 2 +-
.../threadpool/PotatoPeelingTask.java | 2 +-
.../java/com/iluwatar/threadpool/Task.java | 2 +-
.../java/com/iluwatar/threadpool/Worker.java | 2 +-
.../java/com/iluwatar/threadpool/AppTest.java | 2 +-
.../threadpool/CoffeeMakingTaskTest.java | 2 +-
.../threadpool/PotatoPeelingTaskTest.java | 2 +-
.../com/iluwatar/threadpool/TaskTest.java | 2 +-
.../com/iluwatar/threadpool/WorkerTest.java | 2 +-
throttling/pom.xml | 2 +-
.../java/com/iluwatar/throttling/App.java | 3 +-
.../com/iluwatar/throttling/B2BService.java | 2 +-
.../com/iluwatar/throttling/CallsCount.java | 2 +-
.../java/com/iluwatar/throttling/Tenant.java | 2 +-
.../throttling/timer/ThrottleTimerImpl.java | 2 +-
.../iluwatar/throttling/timer/Throttler.java | 2 +-
.../java/com/iluwatar/throttling/AppTest.java | 2 +-
.../iluwatar/throttling/B2BServiceTest.java | 2 +-
.../com/iluwatar/throttling/TenantTest.java | 2 +-
tls/pom.xml | 3 +-
tls/src/main/java/com/iluwatar/tls/App.java | 3 +-
.../com/iluwatar/tls/DateFormatCallable.java | 3 +-
.../main/java/com/iluwatar/tls/Result.java | 2 +-
.../test/java/com/iluwatar/tls/AppTest.java | 3 +-
.../iluwatar/tls/DateFormatCallableTest.java | 3 +-
...FormatCallableTestIncorrectDateFormat.java | 3 +-
.../DateFormatCallableTestMultiThread.java | 3 +-
tolerant-reader/pom.xml | 2 +-
.../java/com/iluwatar/tolerantreader/App.java | 2 +-
.../iluwatar/tolerantreader/RainbowFish.java | 2 +-
.../tolerantreader/RainbowFishSerializer.java | 2 +-
.../tolerantreader/RainbowFishV2.java | 2 +-
.../com/iluwatar/tolerantreader/AppTest.java | 2 +-
.../RainbowFishSerializerTest.java | 2 +-
.../tolerantreader/RainbowFishTest.java | 2 +-
.../tolerantreader/RainbowFishV2Test.java | 2 +-
trampoline/pom.xml | 2 +-
.../com/iluwatar/trampoline/Trampoline.java | 2 +-
.../iluwatar/trampoline/TrampolineApp.java | 9 ++---
.../trampoline/TrampolineAppTest.java | 2 +-
twin/pom.xml | 2 +-
twin/src/main/java/com/iluwatar/twin/App.java | 2 +-
.../main/java/com/iluwatar/twin/BallItem.java | 3 +-
.../java/com/iluwatar/twin/BallThread.java | 3 +-
.../main/java/com/iluwatar/twin/GameItem.java | 3 +-
.../test/java/com/iluwatar/twin/AppTest.java | 2 +-
.../java/com/iluwatar/twin/BallItemTest.java | 2 +-
.../com/iluwatar/twin/BallThreadTest.java | 2 +-
typeobjectpattern/pom.xml | 2 +-
.../java/com/iluwatar/typeobject/App.java | 3 +-
.../java/com/iluwatar/typeobject/Candy.java | 3 +-
.../com/iluwatar/typeobject/CandyGame.java | 3 +-
.../java/com/iluwatar/typeobject/Cell.java | 3 +-
.../com/iluwatar/typeobject/CellPool.java | 3 +-
.../com/iluwatar/typeobject/JsonParser.java | 3 +-
.../iluwatar/typeobject/CandyGameTest.java | 3 +-
.../com/iluwatar/typeobject/CellPoolTest.java | 3 +-
.../com/iluwatar/typeobject/CellTest.java | 3 +-
unit-of-work/pom.xml | 2 +-
.../java/com/iluwatar/unitofwork/App.java | 16 ++++----
.../com/iluwatar/unitofwork/IUnitOfWork.java | 16 ++++----
.../java/com/iluwatar/unitofwork/Student.java | 16 ++++----
.../iluwatar/unitofwork/StudentDatabase.java | 16 ++++----
.../unitofwork/StudentRepository.java | 16 ++++----
.../java/com/iluwatar/unitofwork/AppTest.java | 16 ++++----
.../unitofwork/StudentRepositoryTest.java | 16 ++++----
update-ghpages.sh | 2 +-
value-object/pom.xml | 2 +-
.../java/com/iluwatar/value/object/App.java | 2 +-
.../com/iluwatar/value/object/HeroStat.java | 2 +-
.../com/iluwatar/value/object/AppTest.java | 2 +-
.../iluwatar/value/object/HeroStatTest.java | 2 +-
visitor/pom.xml | 2 +-
.../main/java/com/iluwatar/visitor/App.java | 2 +-
.../java/com/iluwatar/visitor/Commander.java | 2 +-
.../iluwatar/visitor/CommanderVisitor.java | 2 +-
.../java/com/iluwatar/visitor/Sergeant.java | 2 +-
.../com/iluwatar/visitor/SergeantVisitor.java | 2 +-
.../java/com/iluwatar/visitor/Soldier.java | 2 +-
.../com/iluwatar/visitor/SoldierVisitor.java | 2 +-
.../main/java/com/iluwatar/visitor/Unit.java | 2 +-
.../com/iluwatar/visitor/UnitVisitor.java | 2 +-
.../java/com/iluwatar/visitor/AppTest.java | 2 +-
.../com/iluwatar/visitor/CommanderTest.java | 2 +-
.../visitor/CommanderVisitorTest.java | 2 +-
.../com/iluwatar/visitor/SergeantTest.java | 2 +-
.../iluwatar/visitor/SergeantVisitorTest.java | 2 +-
.../com/iluwatar/visitor/SoldierTest.java | 2 +-
.../iluwatar/visitor/SoldierVisitorTest.java | 2 +-
.../java/com/iluwatar/visitor/UnitTest.java | 2 +-
.../com/iluwatar/visitor/VisitorTest.java | 2 +-
1421 files changed, 3147 insertions(+), 2877 deletions(-)
diff --git a/.sonarcloud.properties b/.sonarcloud.properties
index 1bd690065c42..c6b26bf5df8b 100644
--- a/.sonarcloud.properties
+++ b/.sonarcloud.properties
@@ -1,6 +1,6 @@
#
# The MIT License
-# Copyright (c) 2014 Ilkka Seppälä
+# Copyright © 2014-2019 Ilkka Seppälä
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
diff --git a/abstract-document/pom.xml b/abstract-document/pom.xml
index c3f783184d33..ec1bd16dc633 100644
--- a/abstract-document/pom.xml
+++ b/abstract-document/pom.xml
@@ -2,7 +2,7 @@
+
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/app/App.java b/cqrs/src/main/java/com/iluwatar/cqrs/app/App.java
index 0f766e5c727f..7f79116268a0 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/app/App.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/app/App.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/commandes/CommandServiceImpl.java b/cqrs/src/main/java/com/iluwatar/cqrs/commandes/CommandServiceImpl.java
index a15f8a45716d..dd7914d7eb3e 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/commandes/CommandServiceImpl.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/commandes/CommandServiceImpl.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/commandes/ICommandService.java b/cqrs/src/main/java/com/iluwatar/cqrs/commandes/ICommandService.java
index 1da3f6c42392..acaef10726ba 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/commandes/ICommandService.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/commandes/ICommandService.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/constants/AppConstants.java b/cqrs/src/main/java/com/iluwatar/cqrs/constants/AppConstants.java
index 07a8b96190b3..52de88d34adc 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/constants/AppConstants.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/constants/AppConstants.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Author.java b/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Author.java
index 9825de9f7b25..179be3da32c2 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Author.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Author.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Book.java b/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Book.java
index 8a11fcdd4166..14e141412a54 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Book.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/domain/model/Book.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/dto/Author.java b/cqrs/src/main/java/com/iluwatar/cqrs/dto/Author.java
index c5473354dd59..1715e1718fc9 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/dto/Author.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/dto/Author.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/dto/Book.java b/cqrs/src/main/java/com/iluwatar/cqrs/dto/Book.java
index f121a2ca7c2c..720e5655d96a 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/dto/Book.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/dto/Book.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/queries/IQueryService.java b/cqrs/src/main/java/com/iluwatar/cqrs/queries/IQueryService.java
index 9c0252b0aeab..e5f040b7a47d 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/queries/IQueryService.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/queries/IQueryService.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/queries/QueryServiceImpl.java b/cqrs/src/main/java/com/iluwatar/cqrs/queries/QueryServiceImpl.java
index 86eb4dd2f351..b6a8c6275ea6 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/queries/QueryServiceImpl.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/queries/QueryServiceImpl.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/java/com/iluwatar/cqrs/util/HibernateUtil.java b/cqrs/src/main/java/com/iluwatar/cqrs/util/HibernateUtil.java
index a5b59e20dc27..1a762537575d 100644
--- a/cqrs/src/main/java/com/iluwatar/cqrs/util/HibernateUtil.java
+++ b/cqrs/src/main/java/com/iluwatar/cqrs/util/HibernateUtil.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/cqrs/src/main/resources/hibernate.cfg.xml b/cqrs/src/main/resources/hibernate.cfg.xml
index 4ea1421667e1..019cd3917c84 100644
--- a/cqrs/src/main/resources/hibernate.cfg.xml
+++ b/cqrs/src/main/resources/hibernate.cfg.xml
@@ -2,7 +2,7 @@
-
diff --git a/delegation/src/main/java/com/iluwatar/delegation/simple/App.java b/delegation/src/main/java/com/iluwatar/delegation/simple/App.java
index 83e00fd1fb1c..4f8a363abc93 100644
--- a/delegation/src/main/java/com/iluwatar/delegation/simple/App.java
+++ b/delegation/src/main/java/com/iluwatar/delegation/simple/App.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/main/java/com/iluwatar/delegation/simple/Printer.java b/delegation/src/main/java/com/iluwatar/delegation/simple/Printer.java
index ee4d54938a86..64739467847c 100644
--- a/delegation/src/main/java/com/iluwatar/delegation/simple/Printer.java
+++ b/delegation/src/main/java/com/iluwatar/delegation/simple/Printer.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/main/java/com/iluwatar/delegation/simple/PrinterController.java b/delegation/src/main/java/com/iluwatar/delegation/simple/PrinterController.java
index c54f611ee213..a0ceed8dbc1d 100644
--- a/delegation/src/main/java/com/iluwatar/delegation/simple/PrinterController.java
+++ b/delegation/src/main/java/com/iluwatar/delegation/simple/PrinterController.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/main/java/com/iluwatar/delegation/simple/printers/CanonPrinter.java b/delegation/src/main/java/com/iluwatar/delegation/simple/printers/CanonPrinter.java
index 8f024122f15f..5c1785d9119a 100644
--- a/delegation/src/main/java/com/iluwatar/delegation/simple/printers/CanonPrinter.java
+++ b/delegation/src/main/java/com/iluwatar/delegation/simple/printers/CanonPrinter.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/main/java/com/iluwatar/delegation/simple/printers/EpsonPrinter.java b/delegation/src/main/java/com/iluwatar/delegation/simple/printers/EpsonPrinter.java
index fb763d21a862..3d12e0b63358 100644
--- a/delegation/src/main/java/com/iluwatar/delegation/simple/printers/EpsonPrinter.java
+++ b/delegation/src/main/java/com/iluwatar/delegation/simple/printers/EpsonPrinter.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/main/java/com/iluwatar/delegation/simple/printers/HpPrinter.java b/delegation/src/main/java/com/iluwatar/delegation/simple/printers/HpPrinter.java
index d80bb7aa7c9f..47d1057d2918 100644
--- a/delegation/src/main/java/com/iluwatar/delegation/simple/printers/HpPrinter.java
+++ b/delegation/src/main/java/com/iluwatar/delegation/simple/printers/HpPrinter.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/test/java/com/iluwatar/delegation/simple/AppTest.java b/delegation/src/test/java/com/iluwatar/delegation/simple/AppTest.java
index ffdc96b807bd..1a62f34d6269 100644
--- a/delegation/src/test/java/com/iluwatar/delegation/simple/AppTest.java
+++ b/delegation/src/test/java/com/iluwatar/delegation/simple/AppTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/delegation/src/test/java/com/iluwatar/delegation/simple/DelegateTest.java b/delegation/src/test/java/com/iluwatar/delegation/simple/DelegateTest.java
index 422da5685ffc..452f9dd76aa0 100644
--- a/delegation/src/test/java/com/iluwatar/delegation/simple/DelegateTest.java
+++ b/delegation/src/test/java/com/iluwatar/delegation/simple/DelegateTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/dependency-injection/pom.xml b/dependency-injection/pom.xml
index 2347cb14f946..fd9584ed2ac8 100644
--- a/dependency-injection/pom.xml
+++ b/dependency-injection/pom.xml
@@ -2,7 +2,7 @@
-
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
index 351936b2cd64..b5271ee0836c 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.featuretoggle;
import com.iluwatar.featuretoggle.pattern.Service;
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
index 284ccf2ab2cb..9b5bcc035b44 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java
index 1ded334ec7d7..4a0fbc4b5b73 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java
index 887c9f663bfe..00277c9e093e 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java
index baf25aa8b7d6..a90c13e7deaf 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java
index cb84ec533274..17d21d705c7e 100644
--- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java
+++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersionTest.java b/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersionTest.java
index 8b85e93496ae..7d87c1f4d601 100644
--- a/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersionTest.java
+++ b/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersionTest.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.featuretoggle.pattern.propertiesversion;
import com.iluwatar.featuretoggle.pattern.Service;
diff --git a/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersionTest.java b/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersionTest.java
index 4755d569e09e..ca374a90462a 100644
--- a/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersionTest.java
+++ b/feature-toggle/src/test/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersionTest.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/feature-toggle/src/test/java/com/iluwatar/featuretoggle/user/UserGroupTest.java b/feature-toggle/src/test/java/com/iluwatar/featuretoggle/user/UserGroupTest.java
index 2771655ddefa..4489b86c9896 100644
--- a/feature-toggle/src/test/java/com/iluwatar/featuretoggle/user/UserGroupTest.java
+++ b/feature-toggle/src/test/java/com/iluwatar/featuretoggle/user/UserGroupTest.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/fluentinterface/pom.xml b/fluentinterface/pom.xml
index 23fc5d806866..1e76ea628f9d 100644
--- a/fluentinterface/pom.xml
+++ b/fluentinterface/pom.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/mute-idiom/src/main/java/com/iluwatar/mute/App.java b/mute-idiom/src/main/java/com/iluwatar/mute/App.java
index c35559dcd97f..f8ac25f5c42c 100644
--- a/mute-idiom/src/main/java/com/iluwatar/mute/App.java
+++ b/mute-idiom/src/main/java/com/iluwatar/mute/App.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.mute;
import org.slf4j.Logger;
diff --git a/mute-idiom/src/main/java/com/iluwatar/mute/CheckedRunnable.java b/mute-idiom/src/main/java/com/iluwatar/mute/CheckedRunnable.java
index 7a37ef03dfe0..9a3feefc1033 100644
--- a/mute-idiom/src/main/java/com/iluwatar/mute/CheckedRunnable.java
+++ b/mute-idiom/src/main/java/com/iluwatar/mute/CheckedRunnable.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.mute;
/**
diff --git a/mute-idiom/src/main/java/com/iluwatar/mute/Mute.java b/mute-idiom/src/main/java/com/iluwatar/mute/Mute.java
index d5d9b802849f..6c2c417017ae 100644
--- a/mute-idiom/src/main/java/com/iluwatar/mute/Mute.java
+++ b/mute-idiom/src/main/java/com/iluwatar/mute/Mute.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/mute-idiom/src/main/java/com/iluwatar/mute/Resource.java b/mute-idiom/src/main/java/com/iluwatar/mute/Resource.java
index 11bb3a6ec875..366f014b4fba 100644
--- a/mute-idiom/src/main/java/com/iluwatar/mute/Resource.java
+++ b/mute-idiom/src/main/java/com/iluwatar/mute/Resource.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.mute;
import java.io.Closeable;
diff --git a/mute-idiom/src/test/java/com/iluwatar/mute/AppTest.java b/mute-idiom/src/test/java/com/iluwatar/mute/AppTest.java
index 31624c99449b..8d2299492197 100644
--- a/mute-idiom/src/test/java/com/iluwatar/mute/AppTest.java
+++ b/mute-idiom/src/test/java/com/iluwatar/mute/AppTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.mute;
import org.junit.jupiter.api.Test;
diff --git a/mute-idiom/src/test/java/com/iluwatar/mute/MuteTest.java b/mute-idiom/src/test/java/com/iluwatar/mute/MuteTest.java
index 07498645e83c..9d946810fee0 100644
--- a/mute-idiom/src/test/java/com/iluwatar/mute/MuteTest.java
+++ b/mute-idiom/src/test/java/com/iluwatar/mute/MuteTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.mute;
import org.junit.jupiter.api.Test;
diff --git a/mutex/pom.xml b/mutex/pom.xml
index 2075fb4a2462..05f9295eead8 100644
--- a/mutex/pom.xml
+++ b/mutex/pom.xml
@@ -2,7 +2,7 @@
+
4.0.0
diff --git a/naked-objects/dom/src/main/java/META-INF/persistence.xml b/naked-objects/dom/src/main/java/META-INF/persistence.xml
index 8824aa1ace92..fd916b0456bd 100644
--- a/naked-objects/dom/src/main/java/META-INF/persistence.xml
+++ b/naked-objects/dom/src/main/java/META-INF/persistence.xml
@@ -1,21 +1,27 @@
-
+
4.0.0
diff --git a/naked-objects/fixture/src/main/java/domainapp/fixture/DomainAppFixturesProvider.java b/naked-objects/fixture/src/main/java/domainapp/fixture/DomainAppFixturesProvider.java
index ccc11f2b8ece..4496d2e32dd2 100644
--- a/naked-objects/fixture/src/main/java/domainapp/fixture/DomainAppFixturesProvider.java
+++ b/naked-objects/fixture/src/main/java/domainapp/fixture/DomainAppFixturesProvider.java
@@ -1,16 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.fixture;
diff --git a/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectCreate.java b/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectCreate.java
index 58b656a9816f..89eadad31f0c 100644
--- a/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectCreate.java
+++ b/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectCreate.java
@@ -1,18 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package domainapp.fixture.modules.simple;
import org.apache.isis.applib.fixturescripts.FixtureScript;
diff --git a/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectsTearDown.java b/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectsTearDown.java
index c0319d95383e..a5092c2ec70e 100644
--- a/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectsTearDown.java
+++ b/naked-objects/fixture/src/main/java/domainapp/fixture/modules/simple/SimpleObjectsTearDown.java
@@ -1,18 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package domainapp.fixture.modules.simple;
import org.apache.isis.applib.fixturescripts.FixtureScript;
diff --git a/naked-objects/fixture/src/main/java/domainapp/fixture/scenarios/RecreateSimpleObjects.java b/naked-objects/fixture/src/main/java/domainapp/fixture/scenarios/RecreateSimpleObjects.java
index be891158a0d7..33e5570a6063 100644
--- a/naked-objects/fixture/src/main/java/domainapp/fixture/scenarios/RecreateSimpleObjects.java
+++ b/naked-objects/fixture/src/main/java/domainapp/fixture/scenarios/RecreateSimpleObjects.java
@@ -1,18 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package domainapp.fixture.scenarios;
import java.util.Arrays;
diff --git a/naked-objects/integtests/pom.xml b/naked-objects/integtests/pom.xml
index 7365a71a9acb..62d25df032c9 100644
--- a/naked-objects/integtests/pom.xml
+++ b/naked-objects/integtests/pom.xml
@@ -1,14 +1,28 @@
-
+
4.0.0
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java b/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java
index 3ac5a1d75f2e..d5f0cd55265a 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java
@@ -1,16 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.bootstrap;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java
index e41399fdd7d8..b53e88af0c0e 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java
@@ -1,16 +1,24 @@
/**
- * O * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.specglue;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/CatalogOfFixturesGlue.java b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/CatalogOfFixturesGlue.java
index 7a75a038139f..acc1485eca51 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/CatalogOfFixturesGlue.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/CatalogOfFixturesGlue.java
@@ -1,16 +1,24 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.specglue;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/modules/simple/SimpleObjectGlue.java b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/modules/simple/SimpleObjectGlue.java
index b7af9f05232d..6c98b008c462 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/modules/simple/SimpleObjectGlue.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/modules/simple/SimpleObjectGlue.java
@@ -1,16 +1,24 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.specglue.modules.simple;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/specs/RunSpecs.java b/naked-objects/integtests/src/test/java/domainapp/integtests/specs/RunSpecs.java
index 8a842a0f3140..8f197985d6b5 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/specs/RunSpecs.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/specs/RunSpecs.java
@@ -1,16 +1,24 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.specs;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java
index 66deaeb84034..0db09fceb69f 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java
@@ -1,20 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.tests;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
index 3d9009bf88af..0fc7c8f0b0e1 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
@@ -1,20 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.tests.modules.simple;
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectsIntegTest.java b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectsIntegTest.java
index 168d4865a574..a150bdb5a726 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectsIntegTest.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectsIntegTest.java
@@ -1,20 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.integtests.tests.modules.simple;
diff --git a/naked-objects/pom.xml b/naked-objects/pom.xml
index 271a07705589..b035c3894058 100644
--- a/naked-objects/pom.xml
+++ b/naked-objects/pom.xml
@@ -1,14 +1,28 @@
-
+
4.0.0
diff --git a/naked-objects/webapp/ide/intellij/launch/README.txt b/naked-objects/webapp/ide/intellij/launch/README.txt
index 6659454efdbe..2977f3068716 100644
--- a/naked-objects/webapp/ide/intellij/launch/README.txt
+++ b/naked-objects/webapp/ide/intellij/launch/README.txt
@@ -1,6 +1,6 @@
====
The MIT License
- Copyright (c) 2014-2016 Ilkka Seppälä
+ Copyright © 2014-2019 Ilkka Seppälä
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/naked-objects/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE.xml b/naked-objects/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE.xml
index 9831f9a1f7bf..c27b5fbdd00a 100644
--- a/naked-objects/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE.xml
+++ b/naked-objects/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE.xml
@@ -1,7 +1,7 @@
+
4.0.0
diff --git a/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java b/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
index 459e4b7de9e0..cf15632faf53 100644
--- a/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
+++ b/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
@@ -1,16 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
package domainapp.webapp;
diff --git a/naked-objects/webapp/src/main/resources/domainapp/webapp/welcome.html b/naked-objects/webapp/src/main/resources/domainapp/webapp/welcome.html
index a87d67384a9f..e81389640efc 100644
--- a/naked-objects/webapp/src/main/resources/domainapp/webapp/welcome.html
+++ b/naked-objects/webapp/src/main/resources/domainapp/webapp/welcome.html
@@ -1,21 +1,27 @@
Apache Isis™ is a platform to let you rapidly develop
diff --git a/naked-objects/webapp/src/main/webapp/WEB-INF/isis.properties b/naked-objects/webapp/src/main/webapp/WEB-INF/isis.properties
index 929d1775a8b9..2ebd42968626 100644
--- a/naked-objects/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/naked-objects/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -1,19 +1,25 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+#
+# The MIT License
+# Copyright © 2014-2019 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
#################################################################################
diff --git a/naked-objects/webapp/src/main/webapp/WEB-INF/persistor.properties b/naked-objects/webapp/src/main/webapp/WEB-INF/persistor.properties
index c73af73c78d4..594b97edec95 100644
--- a/naked-objects/webapp/src/main/webapp/WEB-INF/persistor.properties
+++ b/naked-objects/webapp/src/main/webapp/WEB-INF/persistor.properties
@@ -1,19 +1,25 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+#
+# The MIT License
+# Copyright © 2014-2019 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
diff --git a/naked-objects/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties b/naked-objects/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
index 675ced3bf8c0..572b2e194c95 100644
--- a/naked-objects/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
+++ b/naked-objects/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
@@ -1,19 +1,25 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+#
+# The MIT License
+# Copyright © 2014-2019 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
#
# configuration file for the JDO/DataNucleus objectstore
diff --git a/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_restfulobjects.properties b/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_restfulobjects.properties
index 0a85fb681bc9..34f639a549fd 100644
--- a/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_restfulobjects.properties
+++ b/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_restfulobjects.properties
@@ -1,19 +1,25 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+#
+# The MIT License
+# Copyright © 2014-2019 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
#
# configuration file for the Restful Objects viewer
diff --git a/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties b/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
index ba9eaaffb873..b52c7fa6e42e 100644
--- a/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
+++ b/naked-objects/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
@@ -1,19 +1,25 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
+#
+# The MIT License
+# Copyright © 2014-2019 Ilkka Seppälä
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
#
# configuration file for the Wicket viewer
diff --git a/naked-objects/webapp/src/main/webapp/WEB-INF/web.xml b/naked-objects/webapp/src/main/webapp/WEB-INF/web.xml
index bb6098f0bcfa..6a3ecd65dfdc 100644
--- a/naked-objects/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/naked-objects/webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,21 +1,27 @@
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/src/test/java/com/iluwatar/pageobject/AlbumPageTest.java b/page-object/src/test/java/com/iluwatar/pageobject/AlbumPageTest.java
index 4b567fcad2ed..9f8419be1af7 100644
--- a/page-object/src/test/java/com/iluwatar/pageobject/AlbumPageTest.java
+++ b/page-object/src/test/java/com/iluwatar/pageobject/AlbumPageTest.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/src/test/java/com/iluwatar/pageobject/LoginPageTest.java b/page-object/src/test/java/com/iluwatar/pageobject/LoginPageTest.java
index 59f69552bc22..911ee5769656 100644
--- a/page-object/src/test/java/com/iluwatar/pageobject/LoginPageTest.java
+++ b/page-object/src/test/java/com/iluwatar/pageobject/LoginPageTest.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumListPage.java b/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumListPage.java
index d212b33f301a..20673c8779dd 100644
--- a/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumListPage.java
+++ b/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumListPage.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumPage.java b/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumPage.java
index 7d2318257930..e33ffc4af32a 100644
--- a/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumPage.java
+++ b/page-object/src/test/java/com/iluwatar/pageobject/pages/AlbumPage.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/src/test/java/com/iluwatar/pageobject/pages/LoginPage.java b/page-object/src/test/java/com/iluwatar/pageobject/pages/LoginPage.java
index b648dfdafc36..843a5e1dc433 100644
--- a/page-object/src/test/java/com/iluwatar/pageobject/pages/LoginPage.java
+++ b/page-object/src/test/java/com/iluwatar/pageobject/pages/LoginPage.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/src/test/java/com/iluwatar/pageobject/pages/Page.java b/page-object/src/test/java/com/iluwatar/pageobject/pages/Page.java
index f292588d2951..fbdc1b28c7be 100644
--- a/page-object/src/test/java/com/iluwatar/pageobject/pages/Page.java
+++ b/page-object/src/test/java/com/iluwatar/pageobject/pages/Page.java
@@ -1,17 +1,17 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/page-object/test-automation/pom.xml b/page-object/test-automation/pom.xml
index f657a8dab0b6..5b275084c4cf 100644
--- a/page-object/test-automation/pom.xml
+++ b/page-object/test-automation/pom.xml
@@ -2,7 +2,7 @@
@@ -25,7 +30,7 @@
java-design-patterns
1.22.0-SNAPSHOT
pom
- 2014
+ 2014-2019
UTF-8
5.2.18.Final
diff --git a/priority-queue/pom.xml b/priority-queue/pom.xml
index aaf172ef3953..3e5ac50e81ab 100644
--- a/priority-queue/pom.xml
+++ b/priority-queue/pom.xml
@@ -2,7 +2,7 @@
-
4.0.0
diff --git a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/App.java b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/App.java
index 42335f313f1c..2ee3fa948845 100644
--- a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/App.java
+++ b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/App.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.reader.writer.lock;
import java.util.concurrent.ExecutorService;
diff --git a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Reader.java b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Reader.java
index b0ccecabadaf..3bc46c4524f7 100644
--- a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Reader.java
+++ b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Reader.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java
index f0f5a009040a..d35703801c67 100644
--- a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java
+++ b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/ReaderWriterLock.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Writer.java b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Writer.java
index dc379eef97ba..4aa5ab5a9571 100644
--- a/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Writer.java
+++ b/reader-writer-lock/src/main/java/com/iluwatar/reader/writer/lock/Writer.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/AppTest.java b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/AppTest.java
index fbdf3f846a97..8815e6c8e451 100644
--- a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/AppTest.java
+++ b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/AppTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderAndWriterTest.java b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderAndWriterTest.java
index c8de8c511b55..d190dfb9ef4c 100644
--- a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderAndWriterTest.java
+++ b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderAndWriterTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
package com.iluwatar.reader.writer.lock;
import com.iluwatar.reader.writer.lock.utils.InMemoryAppender;
diff --git a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderTest.java b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderTest.java
index 8fe5912ea3a5..d49a472e05a8 100644
--- a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderTest.java
+++ b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/ReaderTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/WriterTest.java b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/WriterTest.java
index bb01e11b09eb..55a8b7f95685 100644
--- a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/WriterTest.java
+++ b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/WriterTest.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/utils/InMemoryAppender.java b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/utils/InMemoryAppender.java
index b8ad531ce856..c6b8319d2a5d 100644
--- a/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/utils/InMemoryAppender.java
+++ b/reader-writer-lock/src/test/java/com/iluwatar/reader/writer/lock/utils/InMemoryAppender.java
@@ -1,6 +1,6 @@
/**
* The MIT License
- * Copyright (c) 2014-2016 Ilkka Seppälä
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
diff --git a/repository/pom.xml b/repository/pom.xml
index f0340f1260ef..906389282945 100644
--- a/repository/pom.xml
+++ b/repository/pom.xml
@@ -2,7 +2,7 @@
4.0.0
diff --git a/retry/src/main/java/com/iluwatar/retry/App.java b/retry/src/main/java/com/iluwatar/retry/App.java
index 20205bdf3973..76ec43363525 100644
--- a/retry/src/main/java/com/iluwatar/retry/App.java
+++ b/retry/src/main/java/com/iluwatar/retry/App.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import org.slf4j.Logger;
diff --git a/retry/src/main/java/com/iluwatar/retry/BusinessException.java b/retry/src/main/java/com/iluwatar/retry/BusinessException.java
index eefbf2813cbf..d88aa8a105b7 100644
--- a/retry/src/main/java/com/iluwatar/retry/BusinessException.java
+++ b/retry/src/main/java/com/iluwatar/retry/BusinessException.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
/**
diff --git a/retry/src/main/java/com/iluwatar/retry/BusinessOperation.java b/retry/src/main/java/com/iluwatar/retry/BusinessOperation.java
index aefb589c79c3..37846f54d751 100644
--- a/retry/src/main/java/com/iluwatar/retry/BusinessOperation.java
+++ b/retry/src/main/java/com/iluwatar/retry/BusinessOperation.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
/**
diff --git a/retry/src/main/java/com/iluwatar/retry/CustomerNotFoundException.java b/retry/src/main/java/com/iluwatar/retry/CustomerNotFoundException.java
index 596d8584d67b..990229ebed04 100644
--- a/retry/src/main/java/com/iluwatar/retry/CustomerNotFoundException.java
+++ b/retry/src/main/java/com/iluwatar/retry/CustomerNotFoundException.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
/**
diff --git a/retry/src/main/java/com/iluwatar/retry/DatabaseNotAvailableException.java b/retry/src/main/java/com/iluwatar/retry/DatabaseNotAvailableException.java
index 2a93e992d333..be78a9e6fd8b 100644
--- a/retry/src/main/java/com/iluwatar/retry/DatabaseNotAvailableException.java
+++ b/retry/src/main/java/com/iluwatar/retry/DatabaseNotAvailableException.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
/**
diff --git a/retry/src/main/java/com/iluwatar/retry/FindCustomer.java b/retry/src/main/java/com/iluwatar/retry/FindCustomer.java
index 421f450e59f1..83ab9a25c3f4 100644
--- a/retry/src/main/java/com/iluwatar/retry/FindCustomer.java
+++ b/retry/src/main/java/com/iluwatar/retry/FindCustomer.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import java.util.ArrayDeque;
diff --git a/retry/src/main/java/com/iluwatar/retry/Retry.java b/retry/src/main/java/com/iluwatar/retry/Retry.java
index da5c76d5d3ac..d5d16bf30e62 100644
--- a/retry/src/main/java/com/iluwatar/retry/Retry.java
+++ b/retry/src/main/java/com/iluwatar/retry/Retry.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import java.util.ArrayList;
diff --git a/retry/src/main/java/com/iluwatar/retry/RetryExponentialBackoff.java b/retry/src/main/java/com/iluwatar/retry/RetryExponentialBackoff.java
index b24bebbce192..551914dad138 100644
--- a/retry/src/main/java/com/iluwatar/retry/RetryExponentialBackoff.java
+++ b/retry/src/main/java/com/iluwatar/retry/RetryExponentialBackoff.java
@@ -1,7 +1,6 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -10,18 +9,17 @@
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import java.util.ArrayList;
diff --git a/retry/src/test/java/com/iluwatar/retry/FindCustomerTest.java b/retry/src/test/java/com/iluwatar/retry/FindCustomerTest.java
index 5c0cc66ed36b..d1cd87b21772 100644
--- a/retry/src/test/java/com/iluwatar/retry/FindCustomerTest.java
+++ b/retry/src/test/java/com/iluwatar/retry/FindCustomerTest.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import org.junit.jupiter.api.Test;
diff --git a/retry/src/test/java/com/iluwatar/retry/RetryExponentialBackoffTest.java b/retry/src/test/java/com/iluwatar/retry/RetryExponentialBackoffTest.java
index d14b1eef68a6..23fd8add732c 100644
--- a/retry/src/test/java/com/iluwatar/retry/RetryExponentialBackoffTest.java
+++ b/retry/src/test/java/com/iluwatar/retry/RetryExponentialBackoffTest.java
@@ -1,7 +1,6 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -10,18 +9,17 @@
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import org.junit.jupiter.api.Test;
diff --git a/retry/src/test/java/com/iluwatar/retry/RetryTest.java b/retry/src/test/java/com/iluwatar/retry/RetryTest.java
index d435c7e84331..5366b525bc1e 100644
--- a/retry/src/test/java/com/iluwatar/retry/RetryTest.java
+++ b/retry/src/test/java/com/iluwatar/retry/RetryTest.java
@@ -1,27 +1,25 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2014-2016 Ilkka Seppälä
- *
+/**
+ * The MIT License
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*/
-
package com.iluwatar.retry;
import org.junit.jupiter.api.Test;
diff --git a/semaphore/pom.xml b/semaphore/pom.xml
index 3761e5e49a8f..1ae865f02442 100644
--- a/semaphore/pom.xml
+++ b/semaphore/pom.xml
@@ -2,7 +2,7 @@
+ * Copyright © 2014-2019 Ilkka Seppälä
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/service-layer/pom.xml b/service-layer/pom.xml
index 057a701341a7..31fc6f625b68 100644
--- a/service-layer/pom.xml
+++ b/service-layer/pom.xml
@@ -2,7 +2,7 @@
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
- org.jacoco
-
- jacoco-maven-plugin
-
-
- [0.6.2,)
-
-
- prepare-agent
-
-
-
-
-
-
-
-
-
-
org.apache.maven.plugins
maven-compiler-plugin
@@ -410,20 +379,6 @@
-
- org.jacoco
- jacoco-maven-plugin
- ${jacoco.version}
-
-
- prepare-agent
-
- prepare-agent
-
-
-
-
-
@@ -471,6 +426,27 @@
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ prepare-agent
+
+ prepare-agent
+
+
+
+ report
+
+ report
+
+
+
+
+
From cfdfedbd2e2ed4b140c0f82e6322d335a1e4f39d Mon Sep 17 00:00:00 2001
From: Joshua Jimenez
Date: Mon, 14 Oct 2019 04:41:11 +0800
Subject: [PATCH 22/30] #970 single logging framework should be enforced (#982)
* #496 Add pipeline module to parent pom :sparkles:
* #496: Add main application class and test for pipeline
* #496: Checkstyle format and add log messages on pipeline stages :art:
* #496: Fill readme sections of pipeline :sparkles:
* #496: Javadocs and checkstyle formatting :art:
* #496: Follow PMD checks and add more explanation as block comment on App.java
* #496: Apply requested PR changes by iluwatar :art:
* #970: Replace log4j usage on commander pattern to Slf4j API :art:
* #970: Replace log4j usage on dao pattern to Slf4j API :art:
* #970: Replace log4j usage on data mapper pattern to Slf4j API :art:
* #970: Remove log4j dependency on data transfer object pom :fire:
* #970: Replace log4j usage on module pattern to Slf4j API :art:
* #970: Replace log4j usage on serverless pattern to Slf4j API :art:
This also removes the aws log4j dependency
* #970: Remove unnecessary gitignore line for log4j.xml :fire:
* #970: Remove remaining remnants of log4j :fire:
* #970: Replace System.out logging with appropriate logging methods :art:
* #970: Replace System.out method references to Logger::info :art:
---
.gitignore | 1 -
.../iluwatar/collectionpipeline/AppTest.java | 7 ++-
commander/pom.xml | 5 --
commander/properties/log4j.properties | 41 ----------------
.../com/iluwatar/commander/Commander.java | 19 +++----
.../messagingservice/MessagingService.java | 5 +-
.../main/java/com/iluwatar/converter/App.java | 14 ++++--
dao/pom.xml | 49 -------------------
dao/src/main/java/com/iluwatar/dao/App.java | 9 ++--
.../java/com/iluwatar/dao/DbCustomerDao.java | 7 +--
dao/src/main/resources/log4j.xml | 41 ----------------
data-mapper/pom.xml | 4 --
.../java/com/iluwatar/datamapper/App.java | 7 +--
data-mapper/src/main/resources/log4j.xml | 41 ----------------
data-transfer-object/pom.xml | 4 --
.../main/java/com/iluwatar/dirtyflag/App.java | 9 +++-
.../com/iluwatar/dirtyflag/DataFetcher.java | 8 ++-
.../java/com/iluwatar/event/queue/App.java | 7 ++-
.../administration/ConsoleAdministration.java | 2 +-
.../hexagonal/service/ConsoleLottery.java | 2 +-
.../service/LotteryConsoleServiceImpl.java | 2 +-
.../java/com/iluwatar/masterworker/App.java | 8 +--
.../masterworker/ArrayUtilityMethods.java | 10 ++--
module/pom.xml | 4 --
.../iluwatar/module/ConsoleLoggerModule.java | 7 +--
.../com/iluwatar/module/FileLoggerModule.java | 7 +--
module/src/main/resources/log4j.xml | 41 ----------------
.../iluwatar/module/FileLoggerModuleTest.java | 5 +-
naked-objects/dom/exclude-pmd.properties | 24 ---------
naked-objects/dom/pom.xml | 1 -
.../bootstrap/SimpleAppSystemInitializer.java | 1 -
.../specglue/BootstrappingGlue.java | 1 -
.../integtests/tests/SimpleAppIntegTest.java | 1 -
naked-objects/webapp/pom.xml | 20 --------
.../domainapp/webapp/SimpleApplication.java | 5 +-
.../ConvertToCharArrayHandler.java | 4 +-
.../RemoveAlphabetsHandler.java | 4 +-
.../RemoveDigitsHandler.java | 4 +-
pom.xml | 7 ---
serverless/pom.xml | 5 --
.../baas/api/FindPersonApiHandler.java | 11 +++--
.../baas/api/SavePersonApiHandler.java | 5 +-
.../faas/api/LambdaInfoApiHandler.java | 7 ++-
.../src/main/resources/log4j.properties | 29 -----------
.../com/iluwatar/spatialpartition/App.java | 14 ++++--
.../com/iluwatar/spatialpartition/Bubble.java | 6 ++-
tls/src/main/java/com/iluwatar/tls/App.java | 15 ++++--
.../com/iluwatar/tls/DateFormatCallable.java | 9 +++-
.../java/com/iluwatar/typeobject/App.java | 17 ++++---
.../com/iluwatar/typeobject/CandyGame.java | 17 ++++---
50 files changed, 163 insertions(+), 410 deletions(-)
delete mode 100644 commander/properties/log4j.properties
delete mode 100644 dao/src/main/resources/log4j.xml
delete mode 100644 data-mapper/src/main/resources/log4j.xml
delete mode 100644 module/src/main/resources/log4j.xml
delete mode 100644 naked-objects/dom/exclude-pmd.properties
delete mode 100644 serverless/src/main/resources/log4j.properties
diff --git a/.gitignore b/.gitignore
index fd0bb7810faf..ada1e7d10ce5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,5 +16,4 @@ datanucleus.log
/bin/
/bin/
*.log
-data-mapper/src/main/resources/log4j.xml
event-sourcing/Journal.json
diff --git a/collection-pipeline/src/test/java/com/iluwatar/collectionpipeline/AppTest.java b/collection-pipeline/src/test/java/com/iluwatar/collectionpipeline/AppTest.java
index 83756985fe06..938cce195a27 100644
--- a/collection-pipeline/src/test/java/com/iluwatar/collectionpipeline/AppTest.java
+++ b/collection-pipeline/src/test/java/com/iluwatar/collectionpipeline/AppTest.java
@@ -30,12 +30,15 @@
import java.util.Map;
import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Tests that Collection Pipeline methods work as expected.
*/
public class AppTest {
-
+ private static final Logger LOGGER = LoggerFactory.getLogger(AppTest.class);
+
private List cars = CarFactory.createCars();
@Test
@@ -61,7 +64,7 @@ public void testGetGroupingOfCarsByCategory() {
new Car("Jeep", "Comanche", 1990, Category.JEEP)));
Map> modelsFunctional = FunctionalProgramming.getGroupingOfCarsByCategory(cars);
Map> modelsImperative = ImperativeProgramming.getGroupingOfCarsByCategory(cars);
- System.out.println("Category " + modelsFunctional);
+ LOGGER.info("Category " + modelsFunctional);
assertEquals(modelsExpected, modelsFunctional);
assertEquals(modelsExpected, modelsImperative);
}
diff --git a/commander/pom.xml b/commander/pom.xml
index 4db6b12e7e06..fbe45337707e 100644
--- a/commander/pom.xml
+++ b/commander/pom.xml
@@ -36,10 +36,5 @@
junit-jupiter-engine
test
-
- log4j
- log4j
- 1.2.17
-
diff --git a/commander/properties/log4j.properties b/commander/properties/log4j.properties
deleted file mode 100644
index 6569015544ba..000000000000
--- a/commander/properties/log4j.properties
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# The MIT License
-# Copyright © 2014-2019 Ilkka Seppälä
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-#Define root logger options
-log4j.rootLogger=TRACE, file, console
-
-#Define console appender
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-logrj.appender.console.Target=System.out
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd} %d{HH:mm:ss} %5p[%t] %m%n
-
-#Define rolling file appender
-log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.File=/log/logFile.log
-log4j.appender.file.Append=true
-log4j.appender.file.ImmediateFlush=true
-log4j.appender.file.MaxFileSize=10MB
-log4j.appender.file.MaxBackupIndex=5
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d %d{HH:mm:ss} %5p[%t] %m%n
diff --git a/commander/src/main/java/com/iluwatar/commander/Commander.java b/commander/src/main/java/com/iluwatar/commander/Commander.java
index 8729ea75aeef..dee12df1cee8 100644
--- a/commander/src/main/java/com/iluwatar/commander/Commander.java
+++ b/commander/src/main/java/com/iluwatar/commander/Commander.java
@@ -23,7 +23,6 @@
package com.iluwatar.commander;
import java.util.ArrayList;
-import org.apache.log4j.Logger;
import com.iluwatar.commander.employeehandle.EmployeeHandle;
import com.iluwatar.commander.exceptions.DatabaseUnavailableException;
import com.iluwatar.commander.exceptions.ItemUnavailableException;
@@ -37,6 +36,8 @@
import com.iluwatar.commander.queue.QueueTask;
import com.iluwatar.commander.queue.QueueTask.TaskType;
import com.iluwatar.commander.shippingservice.ShippingService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*Commander pattern is used to handle all issues that can come up while making a
@@ -86,7 +87,7 @@ public class Commander {
private final long messageTime;
private final long employeeTime;
private boolean finalSiteMsgShown;
- static final Logger LOG = Logger.getLogger(Commander.class);
+ static final Logger LOG = LoggerFactory.getLogger(Commander.class);
//we could also have another db where it stores all orders
Commander(EmployeeHandle empDb, PaymentService pService, ShippingService sService,
@@ -125,27 +126,27 @@ private void sendShippingRequest(Order order) throws Exception {
String transactionId = shippingService.receiveRequest(order.item, order.user.address);
//could save this transaction id in a db too
LOG.info("Order " + order.id + ": Shipping placed successfully, transaction id: " + transactionId);
- System.out.println("Order has been placed and will be shipped to you. Please wait while we make your"
+ LOG.info("Order has been placed and will be shipped to you. Please wait while we make your"
+ " payment... ");
sendPaymentRequest(order);
return;
};
Retry.HandleErrorIssue handleError = (o,err) -> {
if (ShippingNotPossibleException.class.isAssignableFrom(err.getClass())) {
- System.out.println("Shipping is currently not possible to your address. We are working on the problem "
+ LOG.info("Shipping is currently not possible to your address. We are working on the problem "
+ "and will get back to you asap.");
finalSiteMsgShown = true;
LOG.info("Order " + order.id + ": Shipping not possible to address, trying to add problem to employee db..");
employeeHandleIssue(o);
} else if (ItemUnavailableException.class.isAssignableFrom(err.getClass())) {
- System.out.println("This item is currently unavailable. We will inform you as soon as the item becomes "
+ LOG.info("This item is currently unavailable. We will inform you as soon as the item becomes "
+ "available again.");
finalSiteMsgShown = true;
LOG.info("Order " + order.id + ": Item " + order.item + " unavailable, trying to add problem to employee "
+ "handle..");
employeeHandleIssue(o);
} else {
- System.out.println("Sorry, there was a problem in creating your order. Please try later.");
+ LOG.info("Sorry, there was a problem in creating your order. Please try later.");
LOG.error("Order " + order.id + ": Shipping service unavailable, order not placed..");
finalSiteMsgShown = true;
}
@@ -183,7 +184,7 @@ public void run() {
order.paid = PaymentStatus.Done;
LOG.info("Order " + order.id + ": Payment successful, transaction Id: " + transactionId);
if (!finalSiteMsgShown) {
- System.out.println("Payment made successfully, thank you for shopping with us!!");
+ LOG.info("Payment made successfully, thank you for shopping with us!!");
finalSiteMsgShown = true;
}
sendSuccessMessage(order);
@@ -193,7 +194,7 @@ public void run() {
Retry.HandleErrorIssue handleError = (o,err) -> {
if (PaymentDetailsErrorException.class.isAssignableFrom(err.getClass())) {
if (!finalSiteMsgShown) {
- System.out.println("There was an error in payment. Your account/card details may have been incorrect. "
+ LOG.info("There was an error in payment. Your account/card details may have been incorrect. "
+ "Meanwhile, your order has been converted to COD and will be shipped.");
finalSiteMsgShown = true;
}
@@ -204,7 +205,7 @@ public void run() {
try {
if (o.messageSent.equals(MessageSent.NoneSent)) {
if (!finalSiteMsgShown) {
- System.out.println("There was an error in payment. We are on it, and will get back to you "
+ LOG.info("There was an error in payment. We are on it, and will get back to you "
+ "asap. Don't worry, your order has been placed and will be shipped.");
finalSiteMsgShown = true;
}
diff --git a/commander/src/main/java/com/iluwatar/commander/messagingservice/MessagingService.java b/commander/src/main/java/com/iluwatar/commander/messagingservice/MessagingService.java
index 27c1eee3f1f2..5023cfa1faa2 100644
--- a/commander/src/main/java/com/iluwatar/commander/messagingservice/MessagingService.java
+++ b/commander/src/main/java/com/iluwatar/commander/messagingservice/MessagingService.java
@@ -24,6 +24,8 @@
import com.iluwatar.commander.Service;
import com.iluwatar.commander.exceptions.DatabaseUnavailableException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The MessagingService is used to send messages to user regarding their order and
@@ -32,6 +34,7 @@
*/
public class MessagingService extends Service {
+ private static final Logger LOGGER = LoggerFactory.getLogger(MessagingService.class);
enum MessageToSend {
PaymentFail, PaymentTrying, PaymentSuccessful
@@ -74,7 +77,7 @@ protected String updateDb(Object...parameters) throws DatabaseUnavailableExcepti
MessageRequest req = (MessageRequest) parameters[0];
if (this.database.get(req.reqId) == null) { //idempotence, in case db fails here
database.add(req); //if successful:
- System.out.println(sendMessage(req.msg));
+ LOGGER.info(sendMessage(req.msg));
return req.reqId;
}
return null;
diff --git a/converter/src/main/java/com/iluwatar/converter/App.java b/converter/src/main/java/com/iluwatar/converter/App.java
index 7d0821c5b501..b21d4dd6afe8 100644
--- a/converter/src/main/java/com/iluwatar/converter/App.java
+++ b/converter/src/main/java/com/iluwatar/converter/App.java
@@ -24,6 +24,8 @@
import com.google.common.collect.Lists;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
@@ -35,6 +37,8 @@
* objects between types.
*/
public class App {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program entry point
*
@@ -45,16 +49,16 @@ public static void main(String[] args) {
UserDto dtoUser = new UserDto("John", "Doe", true, "whatever[at]wherever.com");
User user = userConverter.convertFromDto(dtoUser);
- System.out.println("Entity converted from DTO:" + user);
+ LOGGER.info("Entity converted from DTO:" + user);
ArrayList users = Lists.newArrayList(new User("Camile", "Tough", false, "124sad"),
new User("Marti", "Luther", true, "42309fd"), new User("Kate", "Smith", true, "if0243"));
- System.out.println("Domain entities:");
- users.forEach(System.out::println);
+ LOGGER.info("Domain entities:");
+ users.stream().map(User::toString).forEach(LOGGER::info);
- System.out.println("DTO entities converted from domain:");
+ LOGGER.info("DTO entities converted from domain:");
List dtoEntities = userConverter.createFromEntities(users);
- dtoEntities.forEach(System.out::println);
+ dtoEntities.stream().map(UserDto::toString).forEach(LOGGER::info);
}
}
diff --git a/dao/pom.xml b/dao/pom.xml
index b8453f6a574d..5d6bc94546fa 100644
--- a/dao/pom.xml
+++ b/dao/pom.xml
@@ -40,10 +40,6 @@
junit-jupiter-engine
test
-
- log4j
- log4j
-
com.h2database
h2
@@ -53,49 +49,4 @@
mockito-core
-
-
-
-
-
-
-
- src/main/resources
-
-
- src/main/resources
-
- log4j.xml
-
- ..
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
-
- log4j.xml
-
-
-
- true
-
-
-
-
-
-
-
diff --git a/dao/src/main/java/com/iluwatar/dao/App.java b/dao/src/main/java/com/iluwatar/dao/App.java
index 5824d48cfea6..08d0a42bda3d 100644
--- a/dao/src/main/java/com/iluwatar/dao/App.java
+++ b/dao/src/main/java/com/iluwatar/dao/App.java
@@ -31,8 +31,9 @@
import javax.sql.DataSource;
-import org.apache.log4j.Logger;
import org.h2.jdbcx.JdbcDataSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Data Access Object (DAO) is an object that provides an abstract interface to some type of
@@ -50,7 +51,7 @@
*/
public class App {
private static final String DB_URL = "jdbc:h2:~/dao";
- private static Logger log = Logger.getLogger(App.class);
+ private static Logger log = LoggerFactory.getLogger(App.class);
private static final String ALL_CUSTOMERS = "customerDao.getAllCustomers(): ";
/**
@@ -94,7 +95,7 @@ private static void performOperationsUsing(final CustomerDao customerDao) throws
addCustomers(customerDao);
log.info(ALL_CUSTOMERS);
try (Stream customerStream = customerDao.getAll()) {
- customerStream.forEach((customer) -> log.info(customer));
+ customerStream.forEach((customer) -> log.info(customer.toString()));
}
log.info("customerDao.getCustomerById(2): " + customerDao.getById(2));
final Customer customer = new Customer(4, "Dan", "Danson");
@@ -105,7 +106,7 @@ private static void performOperationsUsing(final CustomerDao customerDao) throws
customerDao.update(customer);
log.info(ALL_CUSTOMERS);
try (Stream customerStream = customerDao.getAll()) {
- customerStream.forEach((cust) -> log.info(cust));
+ customerStream.forEach((cust) -> log.info(cust.toString()));
}
customerDao.delete(customer);
log.info(ALL_CUSTOMERS + customerDao.getAll());
diff --git a/dao/src/main/java/com/iluwatar/dao/DbCustomerDao.java b/dao/src/main/java/com/iluwatar/dao/DbCustomerDao.java
index 9d183e91284e..d8640dcb911d 100644
--- a/dao/src/main/java/com/iluwatar/dao/DbCustomerDao.java
+++ b/dao/src/main/java/com/iluwatar/dao/DbCustomerDao.java
@@ -22,6 +22,9 @@
*/
package com.iluwatar.dao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -35,15 +38,13 @@
import javax.sql.DataSource;
-import org.apache.log4j.Logger;
-
/**
* An implementation of {@link CustomerDao} that persists customers in RDBMS.
*
*/
public class DbCustomerDao implements CustomerDao {
- private static final Logger LOGGER = Logger.getLogger(DbCustomerDao.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(DbCustomerDao.class);
private final DataSource dataSource;
diff --git a/dao/src/main/resources/log4j.xml b/dao/src/main/resources/log4j.xml
deleted file mode 100644
index 5c7e49d51a98..000000000000
--- a/dao/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/data-mapper/pom.xml b/data-mapper/pom.xml
index cf53fdf65814..7da70f8fd243 100644
--- a/data-mapper/pom.xml
+++ b/data-mapper/pom.xml
@@ -37,9 +37,5 @@
junit-jupiter-engine
test
-
- log4j
- log4j
-
diff --git a/data-mapper/src/main/java/com/iluwatar/datamapper/App.java b/data-mapper/src/main/java/com/iluwatar/datamapper/App.java
index 3504ebbe1c94..6b1d9925333f 100644
--- a/data-mapper/src/main/java/com/iluwatar/datamapper/App.java
+++ b/data-mapper/src/main/java/com/iluwatar/datamapper/App.java
@@ -22,9 +22,10 @@
*/
package com.iluwatar.datamapper;
-import java.util.Optional;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-import org.apache.log4j.Logger;
+import java.util.Optional;
/**
* The Data Mapper (DM) is a layer of software that separates the in-memory objects from the
@@ -39,7 +40,7 @@
*/
public final class App {
- private static Logger log = Logger.getLogger(App.class);
+ private static Logger log = LoggerFactory.getLogger(App.class);
private static final String STUDENT_STRING = "App.main(), student : ";
diff --git a/data-mapper/src/main/resources/log4j.xml b/data-mapper/src/main/resources/log4j.xml
deleted file mode 100644
index 5c7e49d51a98..000000000000
--- a/data-mapper/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/data-transfer-object/pom.xml b/data-transfer-object/pom.xml
index 20c8a52f6c0a..ebdb15afa3dd 100644
--- a/data-transfer-object/pom.xml
+++ b/data-transfer-object/pom.xml
@@ -37,9 +37,5 @@
junit-jupiter-engine
test
-
- log4j
- log4j
-
diff --git a/dirty-flag/src/main/java/com/iluwatar/dirtyflag/App.java b/dirty-flag/src/main/java/com/iluwatar/dirtyflag/App.java
index af95b57bca88..e5368bc3a5a6 100644
--- a/dirty-flag/src/main/java/com/iluwatar/dirtyflag/App.java
+++ b/dirty-flag/src/main/java/com/iluwatar/dirtyflag/App.java
@@ -22,6 +22,9 @@
*/
package com.iluwatar.dirtyflag;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@@ -48,6 +51,8 @@
* when needed. {@link World} mainly serves the data to the front-end.
*/
public class App {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program execution point
*/
@@ -59,9 +64,9 @@ public void run() {
@Override
public void run() {
List countries = world.fetch();
- System.out.println("Our world currently has the following countries:-");
+ LOGGER.info("Our world currently has the following countries:-");
for (String country : countries) {
- System.out.println("\t" + country);
+ LOGGER.info("\t" + country);
}
}
}, 0, 15, TimeUnit.SECONDS); // Run at every 15 seconds.
diff --git a/dirty-flag/src/main/java/com/iluwatar/dirtyflag/DataFetcher.java b/dirty-flag/src/main/java/com/iluwatar/dirtyflag/DataFetcher.java
index 3b91ccd7debb..eca422a86165 100644
--- a/dirty-flag/src/main/java/com/iluwatar/dirtyflag/DataFetcher.java
+++ b/dirty-flag/src/main/java/com/iluwatar/dirtyflag/DataFetcher.java
@@ -22,6 +22,10 @@
*/
package com.iluwatar.dirtyflag;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.crypto.Data;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
@@ -37,6 +41,8 @@
*/
public class DataFetcher {
+ private static final Logger LOGGER = LoggerFactory.getLogger(DataFetcher.class);
+
private final String filename = "world.txt";
private long lastFetched;
@@ -62,7 +68,7 @@ public List fetch() {
File file = new File(classLoader.getResource(filename).getFile());
if (isDirty(file.lastModified())) {
- System.out.println(filename + " is dirty! Re-fetching file content...");
+ LOGGER.info(filename + " is dirty! Re-fetching file content...");
List data = new ArrayList();
try (BufferedReader br = new BufferedReader(new FileReader(file))) {
diff --git a/event-queue/src/main/java/com/iluwatar/event/queue/App.java b/event-queue/src/main/java/com/iluwatar/event/queue/App.java
index 88cc0bf570ae..87ad78ae6d40 100644
--- a/event-queue/src/main/java/com/iluwatar/event/queue/App.java
+++ b/event-queue/src/main/java/com/iluwatar/event/queue/App.java
@@ -22,6 +22,9 @@
*/
package com.iluwatar.event.queue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -39,6 +42,8 @@
* items from the queue at a later time.
*/
public class App {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program entry point.
*
@@ -51,7 +56,7 @@ public static void main(String[] args) throws UnsupportedAudioFileException, IOE
audio.playSound(audio.getAudioStream("./etc/Bass-Drum-1.wav"), -10.0f);
audio.playSound(audio.getAudioStream("./etc/Closed-Hi-Hat-1.wav"), -8.0f);
- System.out.println("Press Enter key to stop the program...");
+ LOGGER.info("Press Enter key to stop the program...");
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
br.read();
}
diff --git a/hexagonal/src/main/java/com/iluwatar/hexagonal/administration/ConsoleAdministration.java b/hexagonal/src/main/java/com/iluwatar/hexagonal/administration/ConsoleAdministration.java
index f2aa6d681ba5..4d51710b9d04 100644
--- a/hexagonal/src/main/java/com/iluwatar/hexagonal/administration/ConsoleAdministration.java
+++ b/hexagonal/src/main/java/com/iluwatar/hexagonal/administration/ConsoleAdministration.java
@@ -81,7 +81,7 @@ private static void printMainMenu() {
}
private static String readString(Scanner scanner) {
- System.out.print("> ");
+ LOGGER.info("> ");
return scanner.next();
}
}
diff --git a/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java b/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java
index 583bf348fc7e..3a41e1ef322f 100644
--- a/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java
+++ b/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java
@@ -82,7 +82,7 @@ private static void printMainMenu() {
}
private static String readString(Scanner scanner) {
- System.out.print("> ");
+ LOGGER.info("> ");
return scanner.next();
}
}
diff --git a/hexagonal/src/main/java/com/iluwatar/hexagonal/service/LotteryConsoleServiceImpl.java b/hexagonal/src/main/java/com/iluwatar/hexagonal/service/LotteryConsoleServiceImpl.java
index 17f5f1a9bc09..d61ec9108156 100644
--- a/hexagonal/src/main/java/com/iluwatar/hexagonal/service/LotteryConsoleServiceImpl.java
+++ b/hexagonal/src/main/java/com/iluwatar/hexagonal/service/LotteryConsoleServiceImpl.java
@@ -122,7 +122,7 @@ public void queryLotteryAccountFunds(WireTransfers bank, Scanner scanner) {
}
private String readString(Scanner scanner) {
- System.out.print( "> " );
+ logger.info( "> " );
return scanner.next();
}
}
diff --git a/master-worker-pattern/src/main/java/com/iluwatar/masterworker/App.java b/master-worker-pattern/src/main/java/com/iluwatar/masterworker/App.java
index ce1f7b625653..46c0baf8d16c 100644
--- a/master-worker-pattern/src/main/java/com/iluwatar/masterworker/App.java
+++ b/master-worker-pattern/src/main/java/com/iluwatar/masterworker/App.java
@@ -23,6 +23,8 @@
package com.iluwatar.masterworker;
import com.iluwatar.masterworker.system.ArrayTransposeMasterWorker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The Master-Worker pattern is used when the problem at hand can be solved by dividing into
@@ -45,7 +47,8 @@
*/
public class App {
-
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program entry point.
* @param args command line args
@@ -60,10 +63,9 @@ public static void main(String[] args) {
ArrayResult result = (ArrayResult) mw.getResult(input);
if (result != null) {
ArrayUtilityMethods.printMatrix(inputMatrix);
- System.out.println("");
ArrayUtilityMethods.printMatrix(result.data);
} else {
- System.out.println("Please enter non-zero input");
+ LOGGER.info("Please enter non-zero input");
}
}
diff --git a/master-worker-pattern/src/main/java/com/iluwatar/masterworker/ArrayUtilityMethods.java b/master-worker-pattern/src/main/java/com/iluwatar/masterworker/ArrayUtilityMethods.java
index e3125abe8032..fb27e5b486a4 100644
--- a/master-worker-pattern/src/main/java/com/iluwatar/masterworker/ArrayUtilityMethods.java
+++ b/master-worker-pattern/src/main/java/com/iluwatar/masterworker/ArrayUtilityMethods.java
@@ -22,6 +22,9 @@
*/
package com.iluwatar.masterworker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.util.Random;
/**
@@ -29,7 +32,8 @@
*/
public class ArrayUtilityMethods {
-
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ArrayUtilityMethods.class);
/**
* Method arraysSame compares 2 arrays @param a1 and @param a2
* and @return whether their values are equal (boolean).
@@ -100,9 +104,9 @@ public static void printMatrix(int[][] matrix) {
//prints out int[][]
for (int i = 0; i < matrix.length; i++) {
for (int j = 0; j < matrix[0].length; j++) {
- System.out.print(matrix[i][j] + " ");
+ LOGGER.info(matrix[i][j] + " ");
}
- System.out.println("");
+ LOGGER.info("");
}
}
diff --git a/module/pom.xml b/module/pom.xml
index 920efc01c9da..0a60960b53c6 100644
--- a/module/pom.xml
+++ b/module/pom.xml
@@ -37,9 +37,5 @@
junit-jupiter-engine
test
-
- log4j
- log4j
-
diff --git a/module/src/main/java/com/iluwatar/module/ConsoleLoggerModule.java b/module/src/main/java/com/iluwatar/module/ConsoleLoggerModule.java
index 6ab358777f6e..12eaae1d9be4 100644
--- a/module/src/main/java/com/iluwatar/module/ConsoleLoggerModule.java
+++ b/module/src/main/java/com/iluwatar/module/ConsoleLoggerModule.java
@@ -22,9 +22,10 @@
*/
package com.iluwatar.module;
-import java.io.PrintStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-import org.apache.log4j.Logger;
+import java.io.PrintStream;
/**
* The ConsoleLoggerModule is responsible for showing logs on System Console
@@ -34,7 +35,7 @@
*/
public final class ConsoleLoggerModule {
- private static final Logger LOGGER = Logger.getLogger(ConsoleLoggerModule.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleLoggerModule.class);
private static ConsoleLoggerModule singleton = null;
diff --git a/module/src/main/java/com/iluwatar/module/FileLoggerModule.java b/module/src/main/java/com/iluwatar/module/FileLoggerModule.java
index 1ec85ea47547..65f954b6cccd 100644
--- a/module/src/main/java/com/iluwatar/module/FileLoggerModule.java
+++ b/module/src/main/java/com/iluwatar/module/FileLoggerModule.java
@@ -22,12 +22,13 @@
*/
package com.iluwatar.module;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
-import org.apache.log4j.Logger;
-
/**
* The FileLoggerModule is responsible for showing logs on File System
*
@@ -36,7 +37,7 @@
*/
public final class FileLoggerModule {
- private static final Logger LOGGER = Logger.getLogger(FileLoggerModule.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(FileLoggerModule.class);
private static FileLoggerModule singleton = null;
diff --git a/module/src/main/resources/log4j.xml b/module/src/main/resources/log4j.xml
deleted file mode 100644
index 5c7e49d51a98..000000000000
--- a/module/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/module/src/test/java/com/iluwatar/module/FileLoggerModuleTest.java b/module/src/test/java/com/iluwatar/module/FileLoggerModuleTest.java
index 5f7616f02321..30f0baae5703 100644
--- a/module/src/test/java/com/iluwatar/module/FileLoggerModuleTest.java
+++ b/module/src/test/java/com/iluwatar/module/FileLoggerModuleTest.java
@@ -22,8 +22,9 @@
*/
package com.iluwatar.module;
-import org.apache.log4j.Logger;
import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
@@ -45,7 +46,7 @@
*/
public final class FileLoggerModuleTest {
- private static final Logger LOGGER = Logger.getLogger(FileLoggerModuleTest.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(FileLoggerModuleTest.class);
private static final String OUTPUT_FILE = "output.txt";
private static final String ERROR_FILE = "error.txt";
diff --git a/naked-objects/dom/exclude-pmd.properties b/naked-objects/dom/exclude-pmd.properties
deleted file mode 100644
index e281170f75a4..000000000000
--- a/naked-objects/dom/exclude-pmd.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# The MIT License
-# Copyright © 2014-2019 Ilkka Seppälä
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-domainapp.dom.modules.simple.QSimpleObject=UnusedFormalParameter
\ No newline at end of file
diff --git a/naked-objects/dom/pom.xml b/naked-objects/dom/pom.xml
index b8a04a53bb24..2709edda03f4 100644
--- a/naked-objects/dom/pom.xml
+++ b/naked-objects/dom/pom.xml
@@ -143,7 +143,6 @@
${datanucleus-maven-plugin.version}
false
- ${basedir}/log4j.properties
true
${basedir}/datanucleus.properties
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java b/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java
index d5f0cd55265a..930a805d5fe2 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/bootstrap/SimpleAppSystemInitializer.java
@@ -49,7 +49,6 @@ public static void initIsft() {
private static class SimpleAppSystemBuilder extends IsisSystemForTest.Builder {
public SimpleAppSystemBuilder() {
- withLoggingAt(org.apache.log4j.Level.INFO);
with(testConfiguration());
with(new DataNucleusPersistenceMechanismInstaller());
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java
index b53e88af0c0e..4b22615ecc96 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/specglue/BootstrappingGlue.java
@@ -36,7 +36,6 @@ public class BootstrappingGlue extends CukeGlueAbstract {
@Before(value = {"@integration"}, order = 100)
public void beforeScenarioIntegrationScope() {
- org.apache.log4j.PropertyConfigurator.configure("logging.properties");
SimpleAppSystemInitializer.initIsft();
before(ScenarioExecutionScope.INTEGRATION);
diff --git a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java
index 0db09fceb69f..0c19714253ba 100644
--- a/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java
+++ b/naked-objects/integtests/src/test/java/domainapp/integtests/tests/SimpleAppIntegTest.java
@@ -36,7 +36,6 @@ public abstract class SimpleAppIntegTest extends IntegrationTestAbstract {
@BeforeClass
public static void initClass() {
- org.apache.log4j.PropertyConfigurator.configure("logging.properties");
SimpleAppSystemInitializer.initIsft();
// instantiating will install onto ThreadLocal
diff --git a/naked-objects/webapp/pom.xml b/naked-objects/webapp/pom.xml
index e26c5f5610ad..e0697b855b31 100644
--- a/naked-objects/webapp/pom.xml
+++ b/naked-objects/webapp/pom.xml
@@ -216,26 +216,6 @@
hsqldb
-
-
-
-
-
-
- org.lazyluke
- log4jdbc-remix
-
-
- org.slf4j
- slf4j-api
-
-
-
-
-
junit
junit
diff --git a/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java b/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
index cf15632faf53..875212963b67 100644
--- a/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
+++ b/naked-objects/webapp/src/main/java/domainapp/webapp/SimpleApplication.java
@@ -50,6 +50,8 @@
import de.agilecoders.wicket.core.settings.IBootstrapSettings;
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme;
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchThemeProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -72,6 +74,7 @@
*/
public class SimpleApplication extends IsisWicketApplication {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SimpleApplication.class);
private static final long serialVersionUID = 1L;
/**
@@ -124,7 +127,7 @@ public WebRequest newWebRequest(HttpServletRequest servletRequest, String filter
servletRequest.getSession().invalidate();
}
} catch (Exception e) {
- System.out.println(e);
+ LOGGER.error(e.getMessage());
}
return super.newWebRequest(servletRequest, filterPath);
}
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java b/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java
index 3e8df8eefe3f..6a418fef4cf1 100644
--- a/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/ConvertToCharArrayHandler.java
@@ -32,12 +32,12 @@
*/
class ConvertToCharArrayHandler implements Handler {
- private final Logger logger = LoggerFactory.getLogger(ConvertToCharArrayHandler.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(ConvertToCharArrayHandler.class);
@Override
public char[] process(String input) {
char[] characters = input.toCharArray();
- logger.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
+ LOGGER.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
ConvertToCharArrayHandler.class, input, String.class, Arrays.toString(characters), Character[].class));
return characters;
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java
index 76219249d312..342ed86c23c7 100644
--- a/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveAlphabetsHandler.java
@@ -30,7 +30,7 @@
*/
class RemoveAlphabetsHandler implements Handler {
- private final Logger logger = LoggerFactory.getLogger(RemoveAlphabetsHandler.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(RemoveAlphabetsHandler.class);
@Override
public String process(String input) {
@@ -46,7 +46,7 @@ public String process(String input) {
}
String inputWithoutAlphabetsStr = inputWithoutAlphabets.toString();
- logger.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
+ LOGGER.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
RemoveAlphabetsHandler.class, input, String.class, inputWithoutAlphabetsStr, String.class));
return inputWithoutAlphabetsStr;
diff --git a/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java
index d1785c340858..a5320a0a55c4 100644
--- a/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java
+++ b/pipeline/src/main/java/com.iluwatar.pipeline/RemoveDigitsHandler.java
@@ -30,7 +30,7 @@
*/
class RemoveDigitsHandler implements Handler {
- private final Logger logger = LoggerFactory.getLogger(RemoveDigitsHandler.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(RemoveDigitsHandler.class);
@Override
public String process(String input) {
@@ -46,7 +46,7 @@ public String process(String input) {
}
String inputWithoutDigitsStr = inputWithoutDigits.toString();
- logger.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
+ LOGGER.info(String.format("Current handler: %s, input is %s of type %s, output is %s, of type %s",
RemoveDigitsHandler.class, input, String.class, inputWithoutDigitsStr, String.class));
return inputWithoutDigitsStr;
diff --git a/pom.xml b/pom.xml
index d6cd3a6e60c3..50e7c7de5439 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,10 +56,8 @@
1.2.3
1.1.0
1.11.289
- 1.0.0
2.0.1
2.8.5
- 1.2.17
2.3.1
2.3.2
1.3.2
@@ -304,11 +302,6 @@
mongo-java-driver
${mongo-java-driver.version}
-
- log4j
- log4j
- ${log4j.version}
-
javax.xml.bind
jaxb-api
diff --git a/serverless/pom.xml b/serverless/pom.xml
index 9e142cb3aa30..292df78c55f1 100644
--- a/serverless/pom.xml
+++ b/serverless/pom.xml
@@ -60,11 +60,6 @@
aws-lambda-java-events
${aws-lambda-java-events.version}
-
- com.amazonaws
- aws-lambda-java-log4j
- ${aws-lambda-log4j.version}
-
com.fasterxml.jackson.core
jackson-core
diff --git a/serverless/src/main/java/com/iluwatar/serverless/baas/api/FindPersonApiHandler.java b/serverless/src/main/java/com/iluwatar/serverless/baas/api/FindPersonApiHandler.java
index 0dac4c614b33..14f2b25a5153 100644
--- a/serverless/src/main/java/com/iluwatar/serverless/baas/api/FindPersonApiHandler.java
+++ b/serverless/src/main/java/com/iluwatar/serverless/baas/api/FindPersonApiHandler.java
@@ -27,7 +27,10 @@
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import com.iluwatar.serverless.baas.model.Person;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
/**
* find person from persons collection
@@ -36,13 +39,15 @@
public class FindPersonApiHandler extends AbstractDynamoDbHandler
implements RequestHandler {
- private static final Logger LOG = Logger.getLogger(FindPersonApiHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(FindPersonApiHandler.class);
private static final Integer SUCCESS_STATUS_CODE = 200;
@Override
public APIGatewayProxyResponseEvent handleRequest(APIGatewayProxyRequestEvent apiGatewayProxyRequestEvent,
Context context) {
- LOG.info(apiGatewayProxyRequestEvent.getPathParameters());
+ Map pathParameters = apiGatewayProxyRequestEvent.getPathParameters();
+ pathParameters.keySet().stream().map(key -> key + "=" + pathParameters.get(key)).forEach(LOG::info);
+
Person person = this.getDynamoDbMapper().load(Person.class, apiGatewayProxyRequestEvent
.getPathParameters().get("id"));
diff --git a/serverless/src/main/java/com/iluwatar/serverless/baas/api/SavePersonApiHandler.java b/serverless/src/main/java/com/iluwatar/serverless/baas/api/SavePersonApiHandler.java
index d77687d23b1f..8ef4b839ec63 100644
--- a/serverless/src/main/java/com/iluwatar/serverless/baas/api/SavePersonApiHandler.java
+++ b/serverless/src/main/java/com/iluwatar/serverless/baas/api/SavePersonApiHandler.java
@@ -27,7 +27,8 @@
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import com.iluwatar.serverless.baas.model.Person;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
@@ -38,7 +39,7 @@
public class SavePersonApiHandler extends AbstractDynamoDbHandler
implements RequestHandler {
- private static final Logger LOG = Logger.getLogger(SavePersonApiHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SavePersonApiHandler.class);
private static final Integer CREATED_STATUS_CODE = 201;
private static final Integer BAD_REQUEST_STATUS_CODE = 400;
diff --git a/serverless/src/main/java/com/iluwatar/serverless/faas/api/LambdaInfoApiHandler.java b/serverless/src/main/java/com/iluwatar/serverless/faas/api/LambdaInfoApiHandler.java
index 1157c962cb7c..174e409c35c6 100644
--- a/serverless/src/main/java/com/iluwatar/serverless/faas/api/LambdaInfoApiHandler.java
+++ b/serverless/src/main/java/com/iluwatar/serverless/faas/api/LambdaInfoApiHandler.java
@@ -27,8 +27,8 @@
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import com.iluwatar.serverless.faas.LambdaInfo;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
@@ -39,13 +39,12 @@
*/
public class LambdaInfoApiHandler implements RequestHandler