2203 Commits

Author SHA1 Message Date
snehalatapandit
88fae070e6 Fix broken links #915 (#921) 2019-09-07 21:18:13 +03:00
Adrian Yao
f1410337b5 Fix issue #761: ThreadSafeDoubleCheckLocking.java: Instantiating by Reflection call will be successful if you do that firstly (#920) 2019-09-07 21:13:15 +03:00
Ibrahim ali abdelghany
8c865e6b4d clean code (#910) 2019-09-07 21:07:01 +03:00
dongshengchen
c653edf38f fix must override a superclass method (#919)
* fix must override a superclass method

* fix must override a superclass method
2019-09-07 20:52:49 +03:00
saksham93
35dc25d480 MInor bug fix Issue #895 -> Code comment change (https://github.com/iluwatar/java-design-patterns/issues/895) (#901) 2019-09-07 20:24:40 +03:00
Pawel Zawitowski
318f811fea Bytecode pattern #553 (#896)
* Added bytecode pattern

* Diagram changed and added licence information

* Added bytecode module to main pom.

* Fixed missing dependency error
2019-09-03 21:50:48 +03:00
Ranjeet
7f6067f19f Added priority queue design pattern (#888)
* added priority queue design pattern

* Minor Refactored, fixed review comments
2019-08-31 21:10:35 +03:00
Ilkka Seppälä
11c0550559
Create .sonarcloud.properties 2019-08-21 21:51:27 +03:00
Ilkka Seppälä
085e47b50d
Update SonarCloud badge 2019-08-21 21:47:36 +03:00
Aravind M
61ef59de02 fix code example containing syntax error (#890) 2019-08-11 21:06:27 +03:00
Ranjeet
ccb257d525 fixed bug #883 (#885) 2019-08-04 17:11:56 +03:00
hoangnam2261
6daaeec5c6 Remove the transitive dependency(junit-jupiter-api) (#916) 2019-07-30 22:46:38 +03:00
Thiago Medeiros
517c20960d Added one more Credit/Article about the benefits of Repository pattern (#882) 2019-07-29 21:31:42 +03:00
S Sethi
36e80c4e69 fixed failing tests (#860) (#880) 2019-07-29 21:27:08 +03:00
pierDipi
3454941dcd Typo coresponding -> corresponding (#879) 2019-07-29 21:22:56 +03:00
DRad
b497d41f61 Modify Observer pattern UML (#877) 2019-07-29 21:21:07 +03:00
HelloCoCooo
aaabc8f517 Fix the dependency conflict issue (#872) 2019-07-29 21:16:21 +03:00
hoangnam2261
2757b210ea Best practice when compare enum (#869) 2019-07-29 21:12:14 +03:00
AnaghaSasikumar
d9a567cf97 Commander pattern #505 (#857)
* Commander pattern

* Fix checkstyle errors

* Update Commander.java

* Update README.md

* Update PaymentService.java

* Update Commander.java

* Update README.md
2019-07-29 21:09:08 +03:00
Ilkka Seppälä
a113de6a14 Add licenses 2019-07-28 16:24:14 +03:00
kanwarpreet25
f7e22a1cf6 508 : Sonar qube critical Issue Fix (#854)
* 508 : Sonar qube critical Issue Fix
Refactor this method to reduce its Cognitive Complexity from 30 to the 15 allowed.

* 508: Sonar Qube Issue fxes
Define a constant instead of duplicating this literal " does not exist." 3 times.

* 508: sonar qube issue fixes
Define a constant instead of duplicating this literal "Some external api for only realtime execution could be called here." 3 times.
2019-07-28 15:42:03 +03:00
kanwarpreet25
c6ecf58687 508 : sonar qube critical issue fixes (#852)
* 508 : sonar qube critical issue fixes

* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.
Define a constant instead of duplicating this literal "userID" 5 times
Define a constant instead of duplicating this literal "additionalInfo" 4 times.
Define a constant instead of duplicating this literal "userName" 4 times.

* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.

* 508 : Sonar Qube Fixes
Define a constant instead of duplicating this literal "eEvans" 4 times
Define a constant instead of duplicating this literal "jBloch" 6 times
Define a constant instead of duplicating this literal "mFowler" 3 times

* 508 : Sonar Qube FIxes
Define a constant instead of duplicating this literal "username" 3 times.

* 508: sonar qube issue fixes
Define a constant instead of duplicating this literal "customerDao.getAllCustomers(): " 4 times.

* 508 : sonar qube issue fixes
Define a constant instead of duplicating this literal "App.main(), student : " 4 times.

* 508 : sonar Qube issue fixes
Define a constant instead of duplicating this literal "{} hits {}. {} is damaged!" 3 times.
Define a constant instead of duplicating this literal "{} hits {}." 4 times.

* 508 : Define a constant instead of duplicating this literal "{} hits {}." 4 times.

* 508 : checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: cqrs checkstyle fixes
2019-07-28 15:39:40 +03:00
ptrax
17bfc91f45 Change Travis CI build env. to Trusty (#911) 2019-07-28 14:20:18 +03:00
AnaghaSasikumar
0c6237c225 Type object pattern #555 (#848)
* typeobject pattern

* fixing errors

* fix error cellpool

* Update README.md

* Update README.md
2019-07-24 22:08:30 +03:00
saritchie
fedc2d9e47 Minor ReadMe Update (#864)
Two sentences read a little awkward, so I tweaked them. Hope this helps!
2019-04-07 08:41:35 +03:00
kanwarpreet25
b6b4602baf 845 : unnecassary return deleted (#856) 2019-02-16 22:53:06 +02:00
kanwarpreet25
eafe52e17a 756 : faq added (#855) 2019-02-15 20:00:21 +02:00
Lucas Prone
5251ec4a93 removed unnecessary static modifier on enum definition (#853) 2019-02-15 19:55:23 +02:00
Ilkka Seppälä
26f1a608ab Update license headers 2019-02-13 23:14:53 +02:00
AnaghaSasikumar
7a25c57474 Master worker pattern #799 (#831)
* master worker pattern

* Update App.java

* Adding new line to README.md

* Adding new line to pom.xml

* Adding new line to ArrayEquality.java

* Adding new line to Input.java

* Adding new line to Result.java

* Adding new line to ArrayTransposeMasterWorker.java

* Adding new line to ArrayTransposeMaster.java

* Adding new line to ArrayTransposeWorker.java

* Adding new line to Worker.java

* Adding new line to ArrayInputTest.java

* Adding new line ArrayTransposeMasterWorkerTest.java

* Adding new line to ArrayResult.java

* Review changes

* Update README.md
2019-02-13 23:04:16 +02:00
Rodolfo Forte
55c7579983 Fix script blocking (#843) 2019-02-04 08:35:06 +02:00
AnaghaSasikumar
10cb191533 Retry exponential backoff #775 (#829)
* Spatial partition

* Retry with exponential backoff

* retry exponential backoff

* branch error
2019-02-04 08:27:13 +02:00
AnaghaSasikumar
a6749cb63e Spatial partition pattern #562 (#828)
* Spatial partition

* Update pom.xml

* Update Bubble.java - pmd

* Update Rect.java - pmd
2018-12-22 23:37:31 +02:00
Edy Cu Tjong
7b8c9b07ed Fix typo (#832) 2018-12-17 12:12:54 +05:30
Narendra Pathai
0fa18d91c6
Added real world example of Command pattern
JUnit 4 Statement class is also an example of Command pattern. Added that to list of real world examples
2018-12-03 18:58:20 +05:30
hoangnam2261
53b673d5b0 No Need declare App class as a utility class (#827) 2018-11-25 19:35:22 +02:00
Anandhu Gopi
966c56311c Update Readme.md (#815)
Added a tutorial link for  intercepting filter design pattern
2018-11-04 20:12:04 +02:00
Ilkka Seppälä
150f72758e Add missing license headers 2018-11-03 09:13:59 +02:00
Paweł Matejko
4446e74338 Hexagonal pattern fixes (#814)
* Fixed wrong else condition

* Simplified creating Set of numbers

* Deleted unused imports

* Replaced 'for' loop with 'foreach' one

* Replaced explicit type with diamond

* Removed unnecesary brackets from lambda

* Removed unnecesary contains check before adding element to Set

* Fixed typo and changed non-english constant names
2018-10-27 16:39:16 +05:30
staillebois
70f6e54353 Fix blocker issues on Sonar #508 (#810)
* Fix blocker issues on Sonar

* Replace Assertj assertions with JUnit ones
2018-10-25 18:43:58 +05:30
staillebois
1f1fcae513 Refactor Page-object pattern (#812)
* Refactor : create 2 sub-modules for page-object pattern

* Replace e.printStrackTrace with logger
2018-10-24 23:17:46 +03:00
Narendra Pathai
2aa9e78ddd
Minor refactorings and code style changes (#807)
* Made minor changes in some patterns such as removed throws clause where not needed, changed incorrect order of arguments in assertEquals

* Minor refactorings and code style changes. 1) Removed several use of raw types 2) Removed unnecessary throws clauses 3) Used lambda expressions wherever applicable 4) Used apt assertion methods for readability 5) Use of try with resources wherever applicable 6) Corrected incorrect order of assertXXX arguments

* Removed unused import from Promise

* Addressed review comments

* Addressed checkstyle issue
2018-10-23 13:45:41 +05:30
Narendra Pathai
25ed7c09c5 Refactored Event Queue (#806)
* 1) Test cases were not stopping AudioService before ending test case 2) Changed Audio to be a good singleton, previously because of Audio being bad singleton, test cases which were using static methods could have caused intermittent failures. 3) Made some other refactorings as well

* Removed sonar issue and converted Audio to eager singleton for simplicity

* Updated class diagram PNG
2018-10-21 21:15:33 +03:00
Narendra Pathai
922fd62da6 Resolves #643, test cases failed due to global state in CallsCount (#803)
* Resolves #643, test cases failed due to presence of global state in CallsCount. Because AppTest was executed before B2BServiceTest, it scheduled 1 sec timer using ThrottleTimerImpl class. While resetting it used that global CallCount class reset() method, which reset all counters. So that causes thread safety issue because of unintended sharing of application state between test cases, which is not a good practice.

* Updated class diagram png and added UCLS file
2018-10-21 21:14:07 +03:00
Narendra Pathai
9e7a500743 Refactoring changes in Ambassador Pattern (#805)
* 1) Updated test cases to use Junit Assert method as compared to assert keyword 2) Proper testing of RemoteService using RandomProvider interface. Introduced RandomProvider interface so that randomness can be controlled from test cases. 3) For readability used constant for representing FAILURE

* Addressing review comments, Deleting unintentional file and used FAILURE constant in ClientTest as well
2018-10-21 21:12:03 +03:00
Ilkka Seppälä
21a149ee77
Merge pull request #801 from iluwatar/HexagonalRefactoring
Minor refactorings in Hexagonal architecture
2018-10-21 09:54:28 +03:00
Ilkka Seppälä
f5eaf06c1c
Merge pull request #802 from iluwatar/Issue#699
Resolves #699 Intermittent failure was due to Thread.sleep in the code
2018-10-21 09:25:06 +03:00
Ilkka Seppälä
3c6fb0c53b
Merge pull request #800 from trumvekhuya/master
Fix small points in Strategy and Decorator pattern.
2018-10-21 08:46:24 +03:00
Narendra Pathai
829df031c3 Intermittent failure was due to Thread.sleep in the code. While performing unit test cases there was race condition between two threads, so it was not guaranteed to work every time. Used an interface DelayProvider for simulating delay, and while unit testing fake delay provider is used that eradicates the use of Threads in unit test cases, which is not a good practice. 2018-10-15 16:36:27 +05:30
Narendra Pathai
37ae182630 Resolved PMD issues 2018-10-15 13:30:20 +05:30