GeezerVison is showing github.com — Upgrade of maven plugins (#951) · jllogic/java-design-patterns@218ba44
File treeExpand file treeCollapse file tree Open diff view settings bytecode/src/main/java/com/iluwatar/bytecode src/main/java/com/iluwatar/caching
commander/src/main/java/com/iluwatar/commander double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking event-asynchronous/src/main/java/com/iluwatar/event/asynchronous flux/src/main/java/com/iluwatar/flux/action hexagonal/src/main/java/com/iluwatar/hexagonal/service poison-pill/src/main/java/com/iluwatar/poison/pill retry/src/test/java/com/iluwatar/retry semaphore/src/main/java/com/iluwatar/semaphore service-layer/src/main/java/com/iluwatar/servicelayer/common
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: async-method-invocation/pom.xml +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 43 | 43 | <artifactId>mockito-core</artifactId> | 44 | 44 | <scope>test</scope> | 45 | 45 | </dependency> | | 46 | + <dependency> | | 47 | + <groupId>junit</groupId> | | 48 | + <artifactId>junit</artifactId> | | 49 | + <scope>test</scope> | | 50 | + </dependency> | 46 | 51 | </dependencies> | 47 | 52 | </project> |
Collapse file Copy file name to clipboardExpand all lines: bytecode/src/main/java/com/iluwatar/bytecode/Instruction.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,15 +29,15 @@ public enum Instruction { | 29 | 29 |
| 30 | 30 | LITERAL(1), | 31 | 31 | SET_HEALTH(2), | 32 | | - SET_WISDOM (3), | | 32 | + SET_WISDOM(3), | 33 | 33 | SET_AGILITY(4), | 34 | 34 | PLAY_SOUND(5), | 35 | 35 | SPAWN_PARTICLES(6), | 36 | 36 | GET_HEALTH(7), | 37 | 37 | GET_AGILITY(8), | 38 | 38 | GET_WISDOM(9), | 39 | 39 | ADD(10), | 40 | | - DIVIDE (11); | | 40 | + DIVIDE(11); | 41 | 41 |
| 42 | 42 | private int value; | 43 | 43 |
| |
Collapse file Copy file name to clipboardExpand all lines: caching/pom.xml -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 65 | 65 | <plugin> | 66 | 66 | <groupId>org.apache.maven.plugins</groupId> | 67 | 67 | <artifactId>maven-surefire-plugin</artifactId> | 68 | | - <version>2.19</version> | 69 | 68 | <configuration> | 70 | 69 | <skipTests>false</skipTests> | 71 | 70 | </configuration> | |
Collapse file Copy file name to clipboardExpand all lines: caching/src/main/java/com/iluwatar/caching/CachingPolicy.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,7 @@ public enum CachingPolicy { | 32 | 32 |
| 33 | 33 | private String policy; | 34 | 34 |
| 35 | | - private CachingPolicy(String policy) { | | 35 | + CachingPolicy(String policy) { | 36 | 36 | this.policy = policy; | 37 | 37 | } | 38 | 38 |
| |
Collapse file Copy file name to clipboardExpand all lines: commander/src/main/java/com/iluwatar/commander/Commander.java +8-9Lines changed: 8 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -239,12 +239,12 @@ private void updateQueue(QueueTask qt) throws InterruptedException { | 239 | 239 | //since payment time is lesser than queuetime it would have already failed..additional check not needed | 240 | 240 | LOG.trace("Order " + qt.order.id + ": Queue time for order over, failed.."); | 241 | 241 | return; | 242 | | - } else if ((qt.taskType.equals(TaskType.Payment) && !qt.order.paid.equals(PaymentStatus.Trying)) | 243 | | - || (qt.taskType.equals(TaskType.Messaging) && ((qt.messageType == 1 | 244 | | - && !qt.order.messageSent.equals(MessageSent.NoneSent)) | | 242 | + } else if (qt.taskType.equals(TaskType.Payment) && !qt.order.paid.equals(PaymentStatus.Trying) | | 243 | + || qt.taskType.equals(TaskType.Messaging) && (qt.messageType == 1 | | 244 | + && !qt.order.messageSent.equals(MessageSent.NoneSent) | 245 | 245 | || qt.order.messageSent.equals(MessageSent.PaymentFail) | 246 | | - || qt.order.messageSent.equals(MessageSent.PaymentSuccessful))) | 247 | | - || (qt.taskType.equals(TaskType.EmployeeDb) && qt.order.addedToEmployeeHandle)) { | | 246 | + || qt.order.messageSent.equals(MessageSent.PaymentSuccessful)) | | 247 | + || qt.taskType.equals(TaskType.EmployeeDb) && qt.order.addedToEmployeeHandle) { | 248 | 248 | LOG.trace("Order " + qt.order.id + ": Not queueing task since task already done.."); | 249 | 249 | return; | 250 | 250 | } | @@ -576,8 +576,8 @@ private void doTasksInQueue() throws Exception { | 576 | 576 | || qt.order.messageSent.equals(MessageSent.PaymentSuccessful)) { | 577 | 577 | tryDequeue(); | 578 | 578 | LOG.trace("Order " + qt.order.id + ": This messaging task already done, dequeue.."); | 579 | | - } else if ((qt.messageType == 1 && (!qt.order.messageSent.equals(MessageSent.NoneSent) | 580 | | - || !qt.order.paid.equals(PaymentStatus.Trying)))) { | | 579 | + } else if (qt.messageType == 1 && (!qt.order.messageSent.equals(MessageSent.NoneSent) | | 580 | + || !qt.order.paid.equals(PaymentStatus.Trying))) { | 581 | 581 | tryDequeue(); | 582 | 582 | LOG.trace("Order " + qt.order.id + ": This messaging task does not need to be done, dequeue.."); | 583 | 583 | } else if (qt.messageType == 0) { | @@ -606,8 +606,7 @@ private void doTasksInQueue() throws Exception { | 606 | 606 | } else { | 607 | 607 | Thread.sleep(queueTaskTime / 3); | 608 | 608 | tryDoingTasksInQueue(); | 609 | | - } | 610 | | - return; | | 609 | + } | 611 | 610 | } | 612 | 611 |
| 613 | 612 | } |
Collapse file Copy file name to clipboardExpand all lines: commander/src/main/java/com/iluwatar/commander/queue/Queue.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -83,15 +83,15 @@ T dequeue() throws IsEmptyException { | 83 | 83 | Node temp = front; | 84 | 84 | front = front.next; | 85 | 85 | size = size - 1; | 86 | | - return ((T) temp.value); | | 86 | + return (T) temp.value; | 87 | 87 | } | 88 | 88 | } | 89 | 89 |
| 90 | 90 | T peek() throws IsEmptyException { | 91 | 91 | if (isEmpty()) { | 92 | 92 | throw new IsEmptyException(); | 93 | 93 | } else { | 94 | | - return ((T)front.value); | | 94 | + return (T)front.value; | 95 | 95 | } | 96 | 96 | } | 97 | 97 | } |
Collapse file Copy file name to clipboardExpand all lines: double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking/App.java +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -55,7 +55,9 @@ public static void main(String[] args) { | 55 | 55 | ExecutorService executorService = Executors.newFixedThreadPool(3); | 56 | 56 | for (int i = 0; i < 3; i++) { | 57 | 57 | executorService.execute(() -> { | 58 | | - while (inventory.addItem(new Item())) {}; | | 58 | + while (inventory.addItem(new Item())) { | | 59 | + LOGGER.info("Adding another item"); | | 60 | + } | 59 | 61 | }); | 60 | 62 | } | 61 | 63 |
| |
Collapse file Copy file name to clipboardExpand all lines: event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/Event.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -97,7 +97,7 @@ public final void removeListener(final ThreadCompleteListener listener) { | 97 | 97 | this.eventListener = null; | 98 | 98 | } | 99 | 99 |
| 100 | | - private final void completed() { | | 100 | + private void completed() { | 101 | 101 | if (eventListener != null) { | 102 | 102 | eventListener.completedEventHandler(eventId); | 103 | 103 | } | |
Collapse file Copy file name to clipboardExpand all lines: exclude-pmd.properties +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 24 | 24 | com.iluwatar.servicelayer.common.BaseEntity=UnusedPrivateField | 25 | 25 | com.iluwatar.doublechecked.locking.App=EmptyStatementNotInLoop,EmptyWhileStmt | 26 | 26 | com.iluwatar.doublechecked.locking.InventoryTest=EmptyStatementNotInLoop,EmptyWhileStmt | | 27 | +domainapp.dom.modules.simple.QSimpleObject=UnusedFormalParameter |
Collapse file Copy file name to clipboardExpand all lines: flux/src/main/java/com/iluwatar/flux/action/Content.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -34,7 +34,7 @@ public enum Content { | 34 | 34 |
| 35 | 35 | private String title; | 36 | 36 |
| 37 | | - private Content(String title) { | | 37 | + Content(String title) { | 38 | 38 | this.title = title; | 39 | 39 | } | 40 | 40 |
| |
|