Commit Graph

28 Commits

Author SHA1 Message Date
k1w1dev ef42e169b9 fix: Fix sonar issues (#2925)
* Remove unused member which was also causing a false positive sonar issue.
Fixes sonar issue https://sonarcloud.io/project/issues?open=AY3gHwu5DIZTZkppqVEG&id=iluwatar_java-design-patterns

* Fixes sonar issue https://sonarcloud.io/project/issues?open=AXK0OzDA-CiGJS70dLki&id=iluwatar_java-design-patterns
related to "Refactor the code of the lambda to not have multiple invocations throwing the same checked exception."

Also, updated the code to use Instant and Duration to deal with time instead of int. Added the awaitility
library to perform assertions in test which is more reliable than using Thread.sleep directly to wait for events to happen.

* checkstyle fix

* Add sneaky throws to fix sonar lint issue. This is fine as the newFile method is not being tested but instead the new SimpleFileWriter(...) is.

* The first booking needs to happen outside the assertions. Fixed other warnings

* Use records to pass around related objects instead of using a large number of
individual params, which sonar did not like.

* Checkstyle fixes

* checkstyle fixes

* Remove complexity to keep sonar happy.

* Split into different methods to reduce complexity. Could be broken down even further but currently Sonar is happy.

* Move files to correct package

* Add valid assertions to tests

* rename constants to avoid confusion

* Sonar warning related to cognitive complexity can be suppressed as the methods are quite generic and not functional enough to be separated out.

* Use constants to keep Sonar happy

* Use correct constant naming conventions

* Use correct constant naming conventions

* Use lombok to define noargsconstructor

* Use a single method to do the logging

* Remove unused constructor and redundant method

* Use a reusable method for logging
2024-05-04 08:20:01 +03:00
Jakub Klimek 0f39267a19 refactor: #2366 Change h2 database usage to in mem (#2776)
* fix: Change h2 database usage to in mem (#2366)

* #2366 Add delay option
2024-01-27 13:07:10 +02:00
Rahul Raj fb7ec9b375 dependencies: #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve chec… (#2464)
* #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve checkstyle issues

* remove FileSelectorJFrame.java to resolve checkstyle issue

* remove FileSelectorJFrame.java to resolve checkstyle issue

* remove FileSelectorJFrame.java to resolve checkstyle issue

* add refactored file with correct filename to resolve checkstyle issue

* add the test data

* change filenames from JFrame to Jframe for checkstyle

* fix code smell from  sonar report

* add new testcases to improve the test coverage

* remove code smell
2023-02-04 19:20:54 +02:00
Robert Volkmann c4307db0a6 dependencies: Fix #2297: Upgrade H2 (#2317)
* refactor: drop tables according to their dependencies

* refactor: renamed table because USER is an SQL keyword

* dep: upgrade com.h2database.h2 1.4.190 to 2.1.214
2022-11-20 14:25:33 +02:00
Robert Volkmann 4cd8149502 refactor: remove code smell java:S5786 (#2159)
https://sonarcloud.io/organizations/iluwatar/rules?open=java%3AS5786&rule_key=java%3AS5786
2022-10-30 18:21:21 +02:00
Ilkka Seppälä 932836f68b Update license plugin (#2020)
* update license plugin

* suppress linelength and emptylineseparator rules

* fix checkstyle error

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-09-14 23:22:24 +05:30
va1m 5cf2fe009b 📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
2021-03-13 14:19:21 +02:00
Subhrodip Mohanta 7891c2b117 update inception year to 2021 (#1653) 2021-02-14 11:57:57 +02:00
Subhrodip Mohanta 462b581b34 clearing Sonar Blockers (#1633)
* update gitignore

.checkstyle files are being tracked which should not be

* NOSONAR for statement

excluded from SONAR analysis as it is already dealt using functional approach

https://sonarcloud.io/project/issues?id=iluwatar_java-design-patterns&issues=AW8FwRBhm8eoEVQR-x0f&open=AW8FwRBhm8eoEVQR-x0f

* achieved thread safety with lazy initialization

https://sonarcloud.io/project/issues?fileUuids=AXb6t0PKusn4P8Tm-LmM&id=iluwatar_java-design-patterns&open=AXb6t19yusn4P8Tm-Lmo&resolved=false

* remove double checked locking and initialize before using

https://sonarcloud.io/project/issues?fileUuids=AXb6t0PKusn4P8Tm-LmK&id=iluwatar_java-design-patterns&open=AXb6t19qusn4P8Tm-Lmk&resolved=false

* NOSONAR for the line

https://sonarcloud.io/project/issues?id=iluwatar_java-design-patterns&issues=AXPd3iSe46HRSze7cz3D&open=AXPd3iSe46HRSze7cz3D

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-01-27 16:24:06 +02:00
Toxic Dreamz 31471acb69 Fixed most reported issues by SonarCloud. 2020-08-15 21:47:39 +04:00
Ilkka Seppälä 1683fbdf9c Clean up Transaction Script 2020-08-11 17:17:25 +03:00
Ashish Trivedi e99bcf772b #1321 Added comments about TS 2020-08-11 00:21:46 +05:30
Ashish Trivedi 75b10ed657 #1321 2020-08-10 13:21:24 +05:30
Ashish Trivedi 108532d8dd #1321 2020-08-10 13:12:12 +05:30
Ashish Trivedi 5527cf4234 #1321 Renamed main class 2020-08-10 13:06:46 +05:30
Ashish Trivedi 4008ae41b5 #1321 2020-08-10 13:02:35 +05:30
Ashish Trivedi 24126edd86 Update Hotel.java 2020-08-10 12:54:46 +05:30
Ashish Trivedi c0edac0046 Rename TransactionScriptApp.java to App.java 2020-08-10 12:53:13 +05:30
Ashish_Trivedi 7acc5fbf95 #1321
Resolved conflicts and used var wherever possible
2020-08-09 01:33:19 +05:30
Ashish Trivedi 12d392931e #1321 Added UML diagram 2020-07-27 00:39:53 +05:30
Ashish Trivedi 4017c37b6f #1321 Fixed a test 2020-07-26 18:34:42 +05:30
Ashish Trivedi 9d191324ff #1321 2020-07-26 18:17:00 +05:30
Ashish Trivedi 75ab3b5245 #1321 Added Tests 2020-07-26 17:38:33 +05:30
Ashish Trivedi e0fb2d014a #1321 Added comments and refactored code 2020-07-26 15:56:55 +05:30
Ashish Trivedi c4b1b89f1f #1321 2020-07-19 22:20:15 +05:30
Ashish Trivedi 52e6ea2b68 #1321
Implemented DAO
2020-07-19 20:33:52 +05:30
Ashish Trivedi 112973482d #1321
Added basic structure and planned out the roadmap
2020-07-19 16:51:16 +05:30
Ashish Trivedi 58e3fbfc6a #1321
Added gitignore
2020-07-19 16:19:01 +05:30