2277 Commits

Author SHA1 Message Date
Leon Mak
c8a481bb77 Add java 11 support for #987 (o-t) (#1051)
* Use java 11

* Use .of
- Replace Arrays.asList with List.of
- Replace HashSet<>(List.of()) with Set.of

* Formatting
2019-10-29 08:37:40 +02:00
Leon Mak
dd971d8c19 Use java 11 (#1050) 2019-10-28 17:02:17 +02:00
Leon Mak
6bb3438965 Add java 11 (#1049) 2019-10-27 22:08:09 +02:00
Leon Mak
63fb8dc318 Add java 11 (#1048) 2019-10-27 22:05:10 +02:00
Ilkka Seppälä
b50189e283 Fix Role Object front matter 2019-10-26 21:26:42 +03:00
Ilkka Seppälä
9f7e3fe552 Update license headers 2019-10-26 21:09:19 +03:00
Boris
d1767bbb51 The pattern Role object (#1031)
* init repo for role object

* add to init

*  add to init

*  add first impl

*  add pattern

*  add license

*  add changes
2019-10-26 20:58:40 +03:00
Alexander Ivanov
5d47488fe9 Fix error when building from a submodule directory (#1045)
Add directory-maven-plugin to resolve the location of the
license-plugin-header-style.xml from a submodule directory
2019-10-26 20:43:28 +03:00
Ilkka Seppälä
d01a3a66b4 Update Github token 2019-10-26 20:32:50 +03:00
Anurag870
fadad43f8b #984 for unitofwork, tolerantreader, twin (#1044)
* #984 for unitofwork, tolerantreader, twin

* #984 for unitofwork, tolerantreader, twin

* #987 for visitor, value-object, unitofwork, typeobjectpattern, tolerantreader, twin, tranpoline
2019-10-26 18:58:56 +03:00
GVSharma
c7fee7bb07 local variable type inference changes (#1042)
* local variable type inference changes

local variable type inference changes for thread pool design pattern

* local variable type inference changes

local variable type inference changes for ThreadPool design pattern
2019-10-26 18:50:47 +03:00
GVSharma
954e7300e9 local variable type inference changes (#1043)
local variable type inference changes for throttling design pattern
2019-10-26 18:49:28 +03:00
GVSharma
03e1e92b52 local variable type inference changes (#1041)
local variable type inference changes for template method design pattern
2019-10-26 18:47:43 +03:00
GVSharma
af8c5ed0dd local variable type inference changes (#1040)
local variable type inference changes for strategy design pattern
2019-10-26 18:45:54 +03:00
GVSharma
349d8edebf local variable type inference changes (#1039)
local variable type inference changes for step builder design pattern
2019-10-26 18:43:52 +03:00
GVSharma
12f13a631e local variable infere changes (#1038)
local variable infere changes for STATE design pattern
2019-10-26 18:41:39 +03:00
GVSharma
0b8d78e4bf local variable type inference changes (#1036)
local variable type inference changes for design pattern singleton
2019-10-26 18:40:14 +03:00
GVSharma
58d8fa1758 local variable type inference changes (#1035)
local variable type inference changes for design pattern service locator
2019-10-26 18:38:09 +03:00
GVSharma
f7a53f2d17 service-layer local type inference changes (#1034)
local variable type inference for service-layer design patterns
2019-10-26 18:35:32 +03:00
Ilkka Seppälä
70ddeaa194
Create FUNDING.yml 2019-10-26 15:12:05 +03:00
adamski.pro
6aeafcf2aa https://github.com/iluwatar/java-design-patterns/issues/1016 - decrease number of checkstyle errors in adapter pattern (#1033) 2019-10-26 08:34:30 +03:00
adamski.pro
1cb1bdcb57 https://github.com/iluwatar/java-design-patterns/issues/1009 - remove child poms overhead information (#1030)
* https://github.com/iluwatar/java-design-patterns/issues/1009 - remove child versions

* https://github.com/iluwatar/java-design-patterns/issues/1009 - add custom jaxb version for cqrs
2019-10-25 06:58:33 +03:00
Ilkka Seppälä
1b6cecda19 Update keywords 2019-10-24 23:30:08 +03:00
GVSharma
acaa6cdc62 local variable type inference changes (#1028)
* local variable type inference changes

replacing type with var

* the type changed back to String

since it is initializing to null and later having different value, it is throwing error in Travis-CI.  Made changes.
2019-10-23 17:25:45 +03:00
Alexander Ivanov
4904d7eea0 #1021: Fix checkstyle warnings by changing the license header template (#1027)
* Add custom license header style in order to comply with Google's Checkstyle format

* Update license headers to comply with Google's Checkstyle format
2019-10-22 08:15:35 +03:00
Zack Beach
c81c3ff1c7 Use local variable type inference (#995)
* "visitor" pattern: Use local variable type inference

Update "visitor" pattern with local variable type inference.

* "value-object" pattern: Use local variable type inference

Update "value-object" pattern with local variable type inference.

* "unit-of-work" pattern: Use local variable type inference

Update "value-object" pattern with local variable type inference.

* "typeobjectpattern" pattern: Use local variable type inference

Update "value-object" pattern with local variable type inference.
2019-10-21 08:09:29 +03:00
Jonathan Lao-kan
5fc03ee9f8 improve grammar of README (#945)
* improve grammar of README

* Update README.md
2019-10-20 23:21:48 +03:00
Anurag870
f00ebe1a8d #984 local variable inference changes (#1025)
* #984 Fix for abstract-document, abstract-factory, acyclic-visitor, adapter, aggregator-microservices

* #984 Fix for abstract-document, abstract-factory, acyclic-visitor, adapter, aggregator-microservices
2019-10-20 19:01:02 +03:00
Azureyjt
2217fbc5ff Issue#550: double buffer pattern (#1024)
* Basic implementation

* implement double buffer

* add unit test

* add unit test

* Add Readme

* Change local value declaration to var

* Remove unused fields
2019-10-20 18:55:36 +03:00
Christopher O'Connell
82f9a6c232 1010: Fixed the two remaining SonarCloud errors (#1023)
The two remaining files were still creating a Random everytime the method
was called. These were missed in the previous commit because the previous
commit had fixed only one of the methods; in other words, there were
multiple methods that were creating the Random object on each call.
2019-10-20 09:02:36 +03:00
Ilkka Seppälä
f671f03d13 Update FAQ metadata 2019-10-19 22:14:01 +03:00
Christopher O'Connell
7c5d5f6b0d 1010: Fixed all of the blocking and critical Sonarcloud errors (#1020)
* 1011: Added SuppressWarnings for SonarCloud errors

All of these files are causing SonarCloud to report the following error:

Loops should not be infinite

Since these instances all require an infinite loop that will never end,
these warnings should be disabled so that SonarCloud no longer reports
them as error.

The rule is: squid:S2189

* 1011: Made all of the randoms static and final

According to SonarCloud rule: "Random" objects should be reused, randoms
should not be recreated. This commit has taken all of the Randoms and made
them constant variables in the files that are using them.
2019-10-19 20:04:44 +03:00
Ilkka Seppälä
8a4844792f Remove obsolete file 2019-10-19 19:44:57 +03:00
Kai Winter
0c60a95d8f Switched to embedded Google checkstyle rules (#1018)
* Switched to embedded Google checkstyle rules

Moved the configuration out of the execution to make it used in all
executions. Fixes #1016

* #1016: Moved checkstyle configuration back into execution

This refactoring may be better done in a new issue as it may have too
many implication.

* Replaced consoleOutput and failsOnError by failOnViolation

consoleOutput outputs everything while failsOnError just fails the build
but doesn't log the error. failOnViolation fails on a violation and logs
it (logViolationsToConsole defaults to true).
2019-10-19 18:41:12 +03:00
Ilkka Seppälä
2982db456d Update README.md 2019-10-18 23:09:27 +03:00
Christopher O'Connell
c308ca09e5 1011: Fixed all of the SonarCloud blocking errors (#1017)
* 1011: Added the method to the RequestMapping annotation

* 1011: Changed all of the a href blank targets to include rel="noopener noreferrer"
2019-10-18 08:50:02 +03:00
Kai Winter
880b234d8f Fixes #1007 by updating JUnit to 5.5.2 (#1015)
The missing class PreconditionViolationException is contained in
junit-platform-commons which comes in transitively by this JUnit
version. junit-jupiter-api had to be added because
spring-boot-dependencies imports an older version of this dependency.
2019-10-17 21:00:32 +03:00
Azureyjt
a5646b63c1 #554: Subclass Sandbox pattern (#998)
* 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

* Add subclass-sandbox

* Add Unit Test

* Add Unit Test

* Fix Typo

* Move dependency into parent pom.xml

* Change local valuable reference to be var
2019-10-16 18:21:06 +03:00
Michele Giacobazzi
27c131c2cb #1001 fix intermittent test failure (#1008) 2019-10-15 19:37:35 +03:00
Sharad Paul
c438ec0557 Intermittent test failure in Spatial Partition pattern #1001 (#1006)
* Intermittent test failure in Spatial Partition pattern #1001

* Intermittent test failure in Spatial Partition pattern #1001
2019-10-15 19:33:36 +03:00
Christopher O'Connell
dd5997b495 993: Fixed the pipeines project layout so that it will load in Eclipse (#1004)
The source directory was not working in the 2019.09 version of Eclipse. The
problem was in the layout of the project: after the src/main/java and
src/test/java, the directory was naed com.iluwatar.pipeline. It should've
been com/iluwatar/pipeline. This follows the hierarchy of all of the other
patterns.

Once these files were moved, the Pipeline project compiled without errors.
2019-10-15 19:21:07 +03:00
Christopher O'Connell
e6c71b63fc 988: Replaced all of the Apache HttpClients with Java's java.net.http (#1003)
* 988: Took out the apache http component from root pom.xml

* 988: Updated the aggregator sub projects to use java.net.http instead of apache

* 988: Updated the api-gateway-service sub projects to use java.net.http instead of apache

* Applied the code style formatter
2019-10-15 19:14:08 +03:00
Aditya Pal
7e698a90dd Fix for issue #413: Circuit Breaker Pattern (#986)
* Fix Issue #413: Circuit-Breaker Pattern

* Fix Image Links

* Remove Javadoc plugin to ensure correct build

* Implementing code review feedback

* Sync README with actual code
2019-10-14 21:32:19 +03:00
Ilkka Seppälä
088bb764f3
#996 disable sonar analysis for pull requests (#999) 2019-10-14 20:25:35 +03:00
Ilkka Seppälä
47d92bbffb #996 set sonar host url 2019-10-14 08:17:52 +03:00
Joshua Jimenez
cfdfedbd2e #970 single logging framework should be enforced (#982)
* #496 Add pipeline module to parent pom 

* #496: Add main application class and test for pipeline

* #496: Checkstyle format and add log messages on pipeline stages 🎨

* #496: Fill readme sections of pipeline 

* #496: Javadocs and checkstyle formatting 🎨

* #496: Follow PMD checks and add more explanation as block comment on App.java

* #496: Apply requested PR changes by iluwatar 🎨

* #970: Replace log4j usage on commander pattern to Slf4j API 🎨

* #970: Replace log4j usage on dao pattern to Slf4j API 🎨

* #970: Replace log4j usage on data mapper pattern to Slf4j API 🎨

* #970: Remove log4j dependency on data transfer object pom 🔥

* #970: Replace log4j usage on module pattern to Slf4j API 🎨

* #970: Replace log4j usage on serverless pattern to Slf4j API 🎨

This also removes the aws log4j dependency

* #970: Remove unnecessary gitignore line for log4j.xml 🔥

* #970: Remove remaining remnants of log4j 🔥

* #970: Replace System.out logging with appropriate logging methods 🎨

* #970: Replace System.out method references to Logger::info 🎨
2019-10-13 23:41:11 +03:00
Ilkka Seppälä
72b174619f
#996 Fix SonarCloud analysis failure (#997)
* #996 Update Travis config

* #996 Remove old secret

* #996 add coverage profile

* #996 move jacoco out of profile
2019-10-13 23:15:02 +03:00
Ilkka Seppälä
9ebbc421dd Update license headers 2019-10-12 20:05:54 +03:00
shumyk
fcc1c0a27c [mvn] - Remove maven-pmd-plugin from the project (#977) (#979) 2019-10-12 12:58:48 +03:00
lbroman
6faec9901a 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.
2019-10-12 08:39:58 +03:00