Skip to content

Pull Request: SonarQube Security & Code Quality Fixes#3466

Open
Sagar-S-R wants to merge 102 commits intoiluwatar:test-branchfrom
Sagar-S-R:master
Open

Pull Request: SonarQube Security & Code Quality Fixes#3466
Sagar-S-R wants to merge 102 commits intoiluwatar:test-branchfrom
Sagar-S-R:master

Conversation

@Sagar-S-R
Copy link
Copy Markdown

This PR addresses critical security vulnerabilities and code quality issues identified by SonarQube analysis:

Security Fixes (7 issues)

  • Password Handling (4 files): Converted String password to char[] password for secure memory clearing

    • metadata-mapping/User.java
    • monolithic-architecture/User.java
    • table-module/User.java
    • page-controller/SignupModel.java
  • Hardcoded Credentials: Moved hardcoded MONGO_PASSWORD to environment variables

    • caching/MongoDb.java
  • Insecure Deserialization (2 files): Added type validation before casting

    • serialized-entity/CountryTest.java
    • serialized-lob/BlobSerializer.java

Code Quality Fixes (4 issues)

  • NullPointerException Prevention: Added null check in caching/LruCache.java
  • Deprecated API: Replaced Thread.getId() with Thread.threadId() for Java 21+ compatibility
    • balking/WashingMachine.java
  • Magic Numbers: Replaced with named constants in bytecode/VirtualMachineTest.java
  • Complex Conditionals: Extracted helper methods in builder/Hero.java

Testing

  • All changes compile successfully: mvn clean compile
  • Maintains backward compatibility
  • All existing tests pass

Impact

  • Reduces Security Issues: 4 → 3
  • Reduces Security Hotspots: 8 → 2-3 (after rescan)
  • Improves code maintainability and readability

iseppala and others added 30 commits April 9, 2025 21:27
… shutdown (iluwatar#3244)

* fix: handle awaitTermination result and ensure proper ExecutorService shutdown

- Added handling for the result of awaitTermination to avoid Sonar warning
- Wrapped ExecutorService with try-finally for proper shutdown (java:S2095)
- Prevents potential resource leak and aligns with best practices

Fixes: iluwatar#2865

Note: ExecutorService is not AutoCloseable, so try-with-resources is not applicable. Used try-finally instead.

* fix: add missing logger definition for SLF4J

- Defined logger explicitly with LoggerFactory.getLogger(...)
- Ensured compatibility with Lombok's @slf4j annotation
- Fixed compilation error caused by missing 'log' variable

* fix: add missing logger definition for SLF4J
…, state, step builder, strangler, strategy, subclass sandbox
* Initial commit backpressure

temp

* Adding backpressure pattern iluwatar#3233

* Fix test case iluwatar#3233

* Fix formatting iluwatar#3233

* Changes after review iluwatar#3233

* Fix sonar error in leaderfollowers module iluwatar#3233
skamble2 and others added 6 commits February 22, 2026 20:15
* need to fix one test case shouldGraduallyIncreaseLimitWhenHealthy failing for AdaptiveRateLimiter.java

* Added Class Diagram and Flow Diagrams for Adaptive, Fixed Window and Token Bucket Rate Limiter

* Updated README.md. All test case passed. Updated with Google Java Guidelines

* Updated parent pom iluwatar#2973

* Updated parent pom iluwatar#2973

* fixed shouldResetCounterAfterWindow() test iluwatar#2973

* formatting fixed iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* added test coverage for app.java and fixed random to be thread safe iluwatar#2973

* fixed random to be thread safe iluwatar#2973

* fixed random to be thread safe iluwatar#2973

* fixed random to be thread safe iluwatar#2973

* fixed spacing in pom.xml iluwatar#2973

---------

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 18:37
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

PR Summary

Introduces two new design-pattern modules (Actor Model and Backpressure) with tests and docs. Includes targeted SonarQube security and code quality fixes across modules (e.g., secure password handling hints, null checks, threadId usage, and removal of deprecated APIs). Also includes minor refactors and documentation updates to improve maintainability and readability.

Changes

File Summary
.all-contributorsrc Update the All Contributors configuration to include new contributors and updated counts.
.github/workflows/presubmit.yml Refactor workflow to use pull_request_target, adjust types, and switch AI model to gpt-5-nano for PR reviews.
README.md Synchronize Java CI badge link and contributor counts; adjust wording in a few sections.
actor-model/README.md New documentation for the Actor Model pattern including concepts, UML diagram, and tutorial-style examples.
actor-model/etc/Actor_Model_UML_Class_Diagram.png Add UML Class Diagram asset for the Actor Model module.
actor-model/etc/actor-model.urm.puml Add PlantUML diagram file for the Actor Model architecture.
actor-model/pom.xml Introduce new Maven module for Actor Model with dependencies and build configuration.
actor-model/src/main/java/com/iluwatar/actormodel/Actor.java Define abstract Actor with a mailbox, ID, and run loop for message processing.
actor-model/src/main/java/com/iluwatar/actormodel/ActorSystem.java Provide actor lifecycle management: create, register, start, and shutdown actors.
actor-model/src/main/java/com/iluwatar/actormodel/App.java Demo application that starts two actors and demonstrates message exchange.
actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java Concrete actor that logs received messages and replies to the sender.
actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java Concrete actor that collects and logs received messages for verification.
actor-model/src/main/java/com/iluwatar/actormodel/Message.java Data class representing messages with content and sender ID.
actor-model/src/test/java/com/iluwatar/actor/ActorModelTest.java Unit tests validating main method execution and message passing between actors.
backpressure/README.md Documentation for the Backpressure pattern, including a sample Reactor-based publisher-subscriber demo.
backpressure/etc/backpressure-sequence-diagram.png Add sequence diagram asset for the Backpressure pattern.
backpressure/etc/backpressure.png Add visual diagram illustrating backpressure concept.
backpressure/pom.xml Module POM with Reactor dependencies and test setup.
backpressure/src/main/java/com/iluwatar/backpressure/App.java Demo app orchestrating publisher and subscriber to illustrate backpressure.
backpressure/src/main/java/com/iluwatar/backpressure/Publisher.java Publisher emitting a delayed integer stream using Reactor Flux.
backpressure/src/main/java/com/iluwatar/backpressure/Subscriber.java Custom subscriber implementing backpressure logic with request/processing control.
backpressure/src/test/java/com/iluwatar/backpressure/AppTest.java Test ensuring App.main() runs without exceptions.
backpressure/src/test/java/com/iluwatar/backpressure/LoggerExtension.java JUnit extension to capture and inspect logging during tests.
backpressure/src/test/java/com/iluwatar/backpressure/PublisherTest.java Unit test validating publisher delays using virtual time.
backpressure/src/test/java/com/iluwatar/backpressure/SubscriberTest.java Test verifying subscriber backpressure behavior and logging.
balking/src/main/java/com/iluwatar/balking/WashingMachine.java Fix logging to use threadId() for consistent thread identification per SonarQube suggestions.
bloc/README.md Revise Bloc pattern documentation with updated guidance, examples, and terminology.
bloc/src/test/java/com/iluwatar/bloc/BlocUiTest.java Adjust test visibility and method signatures to align with updated Bloc UI example.
builder/src/main/java/com/iluwatar/builder/Hero.java Refactor toString() to extract hair, armor, and weapon description into private helpers.
bytecode/src/test/java/com/iluwatar/bytecode/VirtualMachineTest.java Introduce named constants for readability and maintainability in tests.

autogenerated by presubmit.ai

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR mixes SonarQube-driven security/code-quality fixes with substantial documentation additions (diagrams) and several new pattern modules (e.g., rate limiting, actor model, backpressure, microservices self-registration, DAO factory).

Changes:

  • Improves security posture in a few areas (e.g., safer deserialization checks, password handling changes, env var credential support).
  • Adds/updates many README diagrams (flowcharts/sequence diagrams/mind maps) across patterns.
  • Introduces new modules and test suites (rate-limiting-pattern, actor-model, backpressure, dao-factory, microservices-self-registration) plus assorted refactors/modernizations in existing code.

Reviewed changes

Copilot reviewed 219 out of 363 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
subclass-sandbox/README.md Docs: add flowchart image
strategy/README.md Docs: add flowchart image
strangler/README.md Docs: add flowchart image
step-builder/README.md Docs: add sequence diagram; remove older diagram section
state/README.md Docs: add flowchart image
specification/README.md Docs: add flowchart image
special-case/README.md Docs: add sequence diagram section
spatial-partition/README.md Docs: add flowchart image
singleton/README.md Docs: add sequence diagram image
single-table-inheritance/README.md Docs: add flowchart image
sharding/README.md Docs: add flowchart image
service-to-worker/README.md Docs: add sequence diagram image
service-locator/README.md Docs: add sequence diagram image
service-layer/README.md Docs: remove extra blank line + remove older diagram section
server-session/README.md Docs: add sequence diagram image
servant/README.md Docs: add sequence diagram image
serialized-lob/README.md Docs: add flowchart image
serialized-entity/README.md Docs: add flowchart image
separated-interface/README.md Docs: add sequence diagram image
saga/README.md Docs: add flowchart image
role-object/README.md Docs: add sequence diagram image
retry/README.md Docs: add flowchart image
resource-acquisition-is-initialization/README.md Docs: add sequence diagram image
repository/README.md Docs: add sequence diagram image
registry/README.md Docs: add flowchart image
reactor/README.md Docs: add sequence diagram; remove older diagram section
queue-based-load-leveling/README.md Docs: add flowchart image
proxy/README.md Docs: tag capitalization + add sequence diagram
prototype/README.md Docs: tag capitalization + add sequence diagram; remove older diagram section
property/README.md Docs: add sequence diagram image
promise/README.md Docs: add sequence diagram image
producer-consumer/README.md Docs: add sequence diagram; remove older diagram section
private-class-data/README.md Docs: add mind map + flowchart images
presentation-model/README.md Docs: remove extra blank line
poison-pill/README.md Docs: add sequence diagram; remove older diagram section
pipeline/README.md Docs: add flowchart image
partial-response/README.md Docs: add sequence diagram image
parameter-object/README.md Docs: add mind map + flowchart images
page-object/README.md Docs: add mind map + flowchart images
optimistic-offline-lock/README.md Docs: add sequence diagram image
observer/README.md Docs: tag capitalization + add sequence diagram
object-pool/README.md Docs: add sequence diagram image
object-mother/README.md Docs: add mind map + flowchart images
null-object/README.md Docs: add sequence diagram image
notification/README.md Docs: add sequence diagram image
dependency-injection/README.md Docs: remove older diagram section
data-locality/README.md Docs: remove older diagram section
data-access-object/README.md Docs: remove older diagram section
function-composition/README.md Docs: revise content/tags/examples
microservices-api-gateway/README.md Docs: shortTitle wording
money/README.md Docs: major rewrite (category/tags/diagrams/text)
actor-model/README.md Docs: add new Actor Model page
serialized-lob/src/main/java/com/iluwatar/slob/serializers/BlobSerializer.java Security: validate deserialized type before cast
serialized-entity/src/test/java/com/iluwatar/serializedentity/CountryTest.java Security/test: validate deserialized type before cast
caching/src/main/java/com/iluwatar/caching/database/MongoDb.java Security: read Mongo credentials from env with fallback
caching/src/main/java/com/iluwatar/caching/LruCache.java Quality: guard against null end when evicting
page-controller/src/main/java/com/iluwatar/page/controller/SignupModel.java Security: switch password to char[] + add clearPassword
monolithic-architecture/src/main/java/com/iluwatar/monolithic/model/User.java Security: switch password to char[] + add clearPassword
metadata-mapping/src/main/java/com/iluwatar/metamapping/model/User.java Security: store password as char[] + add clearPassword
balking/src/main/java/com/iluwatar/balking/WashingMachine.java Quality: use Thread.threadId()
bytecode/src/test/java/com/iluwatar/bytecode/VirtualMachineTest.java Quality: replace magic numbers with constants
builder/src/main/java/com/iluwatar/builder/Hero.java Quality: extract helper methods for toString()
leader-followers/src/main/java/com/iluwatar/leaderfollowers/App.java Quality: logging + executor shutdown flow adjustments
function-composition/src/main/java/com/iluwatar/function/composition/FunctionComposer.java Quality: prevent instantiation (private ctor)
function-composition/src/main/java/com/iluwatar/function/composition/App.java Quality: switch to Lombok @Slf4j logging
session-facade/src/test/java/com/iluwatar/sessionfacade/PaymentServiceTest.java Tests: convert to parameterized tests
session-facade/src/test/java/com/iluwatar/sessionfacade/AppTest.java Tests: reduce visibility
session-facade/pom.xml Build: add junit-jupiter-params
service-stub/src/test/java/com/iluwatar/servicestub/AppTest.java Tests: reduce visibility
service-stub/src/main/java/com/iluwatar/servicestub/RealSentimentAnalysisServer.java Quality: replace ternary with switch; doc cleanup
publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/publisher/PublisherTest.java Tests: reduce visibility
publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/model/TopicTest.java Tests: reduce visibility
publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/model/MessageTest.java Tests: reduce visibility + remove public
publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/LoggerExtension.java Quality: use Stream.toList()
publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/AppTest.java Tests: reduce visibility
publish-subscribe/src/main/java/com/iluwatar/publish/subscribe/model/Topic.java Docs: grammar fix in Javadoc
microservices-idempotent-consumer/src/main/java/com/iluwatar/idempotentconsumer/RequestService.java Quality: simplify Optional usage + grammar fix
microservices-distributed-tracing/pom.xml Build: bump micrometer tracing bridge version
dynamic-proxy/pom.xml Build: bump jackson-core + spring-web milestone
event-sourcing/pom.xml Build: bump jackson-core
money/src/main/java/com/iluwatar/Money.java Quality: use Lombok constructor + simplify getters
money/src/test/java/com/iluwater/money/MoneyTest.java Tests: simplify assertThrows lambdas
microservices-api-gateway/api-gateway-service/src/main/java/com/iluwatar/api/gateway/ImageClientImpl.java Formatting: add blank line
README.md Docs/meta: CI badge link + contributors update + e-book link
.github/workflows/presubmit.yml CI: rework presubmit AI reviewer step + model
.all-contributorsrc Meta: add new contributors
localization/fa/active-object/etc/active-object.urm.puml Docs: add UML file
rate-limiting-pattern/pom.xml New module: rate limiting pattern build setup
rate-limiting-pattern/src/main/java/com/iluwatar/rate/limiting/pattern/*.java New module: rate limiting implementations + exceptions
rate-limiting-pattern/src/test/java/com/iluwatar/rate/limiting/pattern/*.java New module: rate limiting tests
dao-factory/pom.xml New module: DAO factory build setup
dao-factory/src/main/java/com/iluwatar/daofactory/*.java New module: DAO factory implementation
dao-factory/src/test/java/com/iluwatar/daofactory/*.java New module: DAO factory tests
dao-factory/src/main/resources/logback.xml New module: logging config
dao-factory/etc/dao-factory.puml New module: UML
microservices-self-registration/pom.xml New module: microservices self-registration parent
microservices-self-registration/** New modules: eureka server + greeting/context services
backpressure/pom.xml New module: backpressure pattern build setup
backpressure/src/main/java/com/iluwatar/backpressure/*.java New module: backpressure implementation
backpressure/src/test/java/com/iluwatar/backpressure/*.java New module: backpressure tests
actor-model/pom.xml New module: actor model build setup
actor-model/src/main/java/com/iluwatar/actormodel/*.java New module: actor model implementation
actor-model/src/test/java/com/iluwatar/actor/ActorModelTest.java New module: actor model tests
actor-model/etc/actor-model.urm.puml New module: UML
pom.xml Build: dependency/plugin bumps + add new modules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread special-case/README.md Outdated
Comment thread backpressure/src/test/java/com/iluwatar/backpressure/PublisherTest.java Outdated
Comment thread .github/workflows/presubmit.yml
Comment thread money/README.md Outdated
Comment thread pom.xml
Comment thread function-composition/src/main/java/com/iluwatar/function/composition/App.java Outdated
Comment thread dao-factory/src/main/java/com/iluwatar/daofactory/DAOFactoryProvider.java Outdated
Sagar-S-R and others added 6 commits April 15, 2026 00:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…com/learning/greetingservice/GreetingserviceApplication.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…Test.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ovider.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…sition/App.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (30)
  • 6195d5e: docs: diagrams for transaction script, twin, and type object
  • 21914f9: docs: updated diagrams for tolerant reader and trampoline
  • 95bfd6c: docs: new diagrams for template view and throttling
  • ba7be25: docs: diagrams for table module and template method
  • 0b83b6d: feat: Adding backpressure design pattern #3233 (#3249)
  • Initial commit backpressure

temp

  • Adding backpressure pattern #3233

  • Fix test case #3233

  • Fix formatting #3233

  • Changes after review #3233

  • Fix sonar error in leaderfollowers module #3233

  • cd224ea: docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox
  • 8e82390: docs: single table inheritance and singleton diagrams
  • e5485da: docs: service to worker, session facade, sharding diagrams
  • 73a5828: docs: service locator and service stub diagrams
  • b8f3869: docs: diagrams for servant and server session
  • 30d6875: docs: diagrams for serialized entity and serialized lob
  • a97bfec: docs: separated interface diagram
  • 54048a1: docs: add saga flowchart
  • 6cadf25: fix: handle awaitTermination result and ensure proper ExecutorService shutdown (#3244)
  • fix: handle awaitTermination result and ensure proper ExecutorService shutdown
  • Added handling for the result of awaitTermination to avoid Sonar warning
  • Wrapped ExecutorService with try-finally for proper shutdown (java:S2095)
  • Prevents potential resource leak and aligns with best practices

Fixes: #2865

Note: ExecutorService is not AutoCloseable, so try-with-resources is not applicable. Used try-finally instead.

  • fix: add missing logger definition for SLF4J
  • Defined logger explicitly with LoggerFactory.getLogger(...)
  • Ensured compatibility with Lombok's @slf4j annotation
  • Fixed compilation error caused by missing 'log' variable
  • fix: add missing logger definition for SLF4J
  • 44f6ab3: docs: retry and role object diagrams
  • 21fed21: docs: raii diagram
  • 9e5d9e5: docs: repository diagram
  • 09e5313: docs: registry diagram
  • 6d6638f: docs: reactor diagram
  • ae737f6: docs: queue-based load leveling diagram
  • 23af67c: docs: property, prototype, proxy diagrams
  • 3abaa83: docs: producer-consumer and promise diagrams
  • 261da00: docs: poison pill and private class data diagrams
  • fdd07c7: docs: partial response and pipeline diagrams
  • ecfd944: docs: page object and parameter object diagrams
  • 32dbc7f: docs: optimistic offline lock diagram
  • 2aaf712: docs: object pool and observer diagrams
  • 6bae409: docs: object mother diagrams
  • 7ed9e39: docs: null object diagram
  • f01235b: docs: add notification diagram
Files Processed (30)
  • .all-contributorsrc (1 hunk)
  • .github/workflows/presubmit.yml (1 hunk)
  • README.md (3 hunks)
  • actor-model/README.md (1 hunk)
  • actor-model/etc/Actor_Model_UML_Class_Diagram.png (0 hunks)
  • actor-model/etc/actor-model.urm.puml (1 hunk)
  • actor-model/pom.xml (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/Actor.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ActorSystem.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/App.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/Message.java (1 hunk)
  • actor-model/src/test/java/com/iluwatar/actor/ActorModelTest.java (1 hunk)
  • backpressure/README.md (1 hunk)
  • backpressure/etc/backpressure-sequence-diagram.png (0 hunks)
  • backpressure/etc/backpressure.png (0 hunks)
  • backpressure/pom.xml (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/App.java (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/Publisher.java (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/Subscriber.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/AppTest.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/LoggerExtension.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/PublisherTest.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/SubscriberTest.java (1 hunk)
  • balking/src/main/java/com/iluwatar/balking/WashingMachine.java (1 hunk)
  • bloc/README.md (2 hunks)
  • bloc/src/test/java/com/iluwatar/bloc/BlocUiTest.java (3 hunks)
  • builder/src/main/java/com/iluwatar/builder/Hero.java (2 hunks)
  • bytecode/src/test/java/com/iluwatar/bytecode/VirtualMachineTest.java (2 hunks)
Actionable Comments (3)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java [46-46]

    readability: "Logger call uses undefined symbol"

  • backpressure/src/main/java/com/iluwatar/backpressure/Subscriber.java [42-42]

    readability: "Logger usage mismatch in Subscriber (Backpressure)"

  • balking/src/main/java/com/iluwatar/balking/WashingMachine.java [80-82]

    compatibility: "Java 21+ logger usage and compatibility consideration"

Skipped Comments (2)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java [60-60]

    readability: "Logger usage mismatch with Lombok annotation"

  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java [41-45]

    readability: "Logger usage mismatch in ExampleActor2"

Comment thread actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java
Comment thread balking/src/main/java/com/iluwatar/balking/WashingMachine.java
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (30)
  • 6195d5e: docs: diagrams for transaction script, twin, and type object
  • 21914f9: docs: updated diagrams for tolerant reader and trampoline
  • 95bfd6c: docs: new diagrams for template view and throttling
  • ba7be25: docs: diagrams for table module and template method
  • 0b83b6d: feat: Adding backpressure design pattern #3233 (#3249)
  • Initial commit backpressure

temp

  • Adding backpressure pattern #3233

  • Fix test case #3233

  • Fix formatting #3233

  • Changes after review #3233

  • Fix sonar error in leaderfollowers module #3233

  • cd224ea: docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox
  • 8e82390: docs: single table inheritance and singleton diagrams
  • e5485da: docs: service to worker, session facade, sharding diagrams
  • 73a5828: docs: service locator and service stub diagrams
  • b8f3869: docs: diagrams for servant and server session
  • 30d6875: docs: diagrams for serialized entity and serialized lob
  • a97bfec: docs: separated interface diagram
  • 54048a1: docs: add saga flowchart
  • 6cadf25: fix: handle awaitTermination result and ensure proper ExecutorService shutdown (#3244)
  • fix: handle awaitTermination result and ensure proper ExecutorService shutdown
  • Added handling for the result of awaitTermination to avoid Sonar warning
  • Wrapped ExecutorService with try-finally for proper shutdown (java:S2095)
  • Prevents potential resource leak and aligns with best practices

Fixes: #2865

Note: ExecutorService is not AutoCloseable, so try-with-resources is not applicable. Used try-finally instead.

  • fix: add missing logger definition for SLF4J
  • Defined logger explicitly with LoggerFactory.getLogger(...)
  • Ensured compatibility with Lombok's @slf4j annotation
  • Fixed compilation error caused by missing 'log' variable
  • fix: add missing logger definition for SLF4J
  • 44f6ab3: docs: retry and role object diagrams
  • 21fed21: docs: raii diagram
  • 9e5d9e5: docs: repository diagram
  • 09e5313: docs: registry diagram
  • 6d6638f: docs: reactor diagram
  • ae737f6: docs: queue-based load leveling diagram
  • 23af67c: docs: property, prototype, proxy diagrams
  • 3abaa83: docs: producer-consumer and promise diagrams
  • 261da00: docs: poison pill and private class data diagrams
  • fdd07c7: docs: partial response and pipeline diagrams
  • ecfd944: docs: page object and parameter object diagrams
  • 32dbc7f: docs: optimistic offline lock diagram
  • 2aaf712: docs: object pool and observer diagrams
  • 6bae409: docs: object mother diagrams
  • 7ed9e39: docs: null object diagram
  • f01235b: docs: add notification diagram
Files Processed (30)
  • .all-contributorsrc (1 hunk)
  • .github/workflows/presubmit.yml (1 hunk)
  • README.md (3 hunks)
  • actor-model/README.md (1 hunk)
  • actor-model/etc/Actor_Model_UML_Class_Diagram.png (0 hunks)
  • actor-model/etc/actor-model.urm.puml (1 hunk)
  • actor-model/pom.xml (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/Actor.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ActorSystem.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/App.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/Message.java (1 hunk)
  • actor-model/src/test/java/com/iluwatar/actor/ActorModelTest.java (1 hunk)
  • backpressure/README.md (1 hunk)
  • backpressure/etc/backpressure-sequence-diagram.png (0 hunks)
  • backpressure/etc/backpressure.png (0 hunks)
  • backpressure/pom.xml (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/App.java (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/Publisher.java (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/Subscriber.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/AppTest.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/LoggerExtension.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/PublisherTest.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/SubscriberTest.java (1 hunk)
  • balking/src/main/java/com/iluwatar/balking/WashingMachine.java (1 hunk)
  • bloc/README.md (2 hunks)
  • bloc/src/test/java/com/iluwatar/bloc/BlocUiTest.java (3 hunks)
  • builder/src/main/java/com/iluwatar/builder/Hero.java (2 hunks)
  • bytecode/src/test/java/com/iluwatar/bytecode/VirtualMachineTest.java (2 hunks)
Actionable Comments (3)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java [45-46]

    possible bug: "Logger usage inconsistent with Lombok-generated logger"

  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java [44-44]

    possible bug: "Logger usage inconsistent with Lombok-generated logger in ExampleActor2"

  • .github/workflows/presubmit.yml [1-28]

    security: "Security risk: using pull_request_target in CI"

Skipped Comments (4)
  • balking/src/main/java/com/iluwatar/balking/WashingMachine.java [81-81]

    maintainability: "Logger usage consistency (WashingMachine)"

  • builder/src/main/java/com/iluwatar/builder/Hero.java [58-66]

    maintainability: "Code organization: extract hair description helper methods"

  • builder/src/main/java/com/iluwatar/builder/Hero.java [71-74]

    maintainability: "Code organization: extract armor description helper"

  • builder/src/main/java/com/iluwatar/builder/Hero.java [77-81]

    maintainability: "Code organization: extract weapon description helper"

Comment thread actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java
Comment thread .github/workflows/presubmit.yml
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Pull request needs attention.

Review Summary

Commits Considered (30)
  • 6195d5e: docs: diagrams for transaction script, twin, and type object
  • 21914f9: docs: updated diagrams for tolerant reader and trampoline
  • 95bfd6c: docs: new diagrams for template view and throttling
  • ba7be25: docs: diagrams for table module and template method
  • 0b83b6d: feat: Adding backpressure design pattern #3233 (#3249)
  • Initial commit backpressure

temp

  • Adding backpressure pattern #3233

  • Fix test case #3233

  • Fix formatting #3233

  • Changes after review #3233

  • Fix sonar error in leaderfollowers module #3233

  • cd224ea: docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox
  • 8e82390: docs: single table inheritance and singleton diagrams
  • e5485da: docs: service to worker, session facade, sharding diagrams
  • 73a5828: docs: service locator and service stub diagrams
  • b8f3869: docs: diagrams for servant and server session
  • 30d6875: docs: diagrams for serialized entity and serialized lob
  • a97bfec: docs: separated interface diagram
  • 54048a1: docs: add saga flowchart
  • 6cadf25: fix: handle awaitTermination result and ensure proper ExecutorService shutdown (#3244)
  • fix: handle awaitTermination result and ensure proper ExecutorService shutdown
  • Added handling for the result of awaitTermination to avoid Sonar warning
  • Wrapped ExecutorService with try-finally for proper shutdown (java:S2095)
  • Prevents potential resource leak and aligns with best practices

Fixes: #2865

Note: ExecutorService is not AutoCloseable, so try-with-resources is not applicable. Used try-finally instead.

  • fix: add missing logger definition for SLF4J
  • Defined logger explicitly with LoggerFactory.getLogger(...)
  • Ensured compatibility with Lombok's @slf4j annotation
  • Fixed compilation error caused by missing 'log' variable
  • fix: add missing logger definition for SLF4J
  • 44f6ab3: docs: retry and role object diagrams
  • 21fed21: docs: raii diagram
  • 9e5d9e5: docs: repository diagram
  • 09e5313: docs: registry diagram
  • 6d6638f: docs: reactor diagram
  • ae737f6: docs: queue-based load leveling diagram
  • 23af67c: docs: property, prototype, proxy diagrams
  • 3abaa83: docs: producer-consumer and promise diagrams
  • 261da00: docs: poison pill and private class data diagrams
  • fdd07c7: docs: partial response and pipeline diagrams
  • ecfd944: docs: page object and parameter object diagrams
  • 32dbc7f: docs: optimistic offline lock diagram
  • 2aaf712: docs: object pool and observer diagrams
  • 6bae409: docs: object mother diagrams
  • 7ed9e39: docs: null object diagram
  • f01235b: docs: add notification diagram
Files Processed (30)
  • .all-contributorsrc (1 hunk)
  • .github/workflows/presubmit.yml (1 hunk)
  • README.md (3 hunks)
  • actor-model/README.md (1 hunk)
  • actor-model/etc/Actor_Model_UML_Class_Diagram.png (0 hunks)
  • actor-model/etc/actor-model.urm.puml (1 hunk)
  • actor-model/pom.xml (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/Actor.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ActorSystem.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/App.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java (1 hunk)
  • actor-model/src/main/java/com/iluwatar/actormodel/Message.java (1 hunk)
  • actor-model/src/test/java/com/iluwatar/actor/ActorModelTest.java (1 hunk)
  • backpressure/README.md (1 hunk)
  • backpressure/etc/backpressure-sequence-diagram.png (0 hunks)
  • backpressure/etc/backpressure.png (0 hunks)
  • backpressure/pom.xml (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/App.java (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/Publisher.java (1 hunk)
  • backpressure/src/main/java/com/iluwatar/backpressure/Subscriber.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/AppTest.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/LoggerExtension.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/PublisherTest.java (1 hunk)
  • backpressure/src/test/java/com/iluwatar/backpressure/SubscriberTest.java (1 hunk)
  • balking/src/main/java/com/iluwatar/balking/WashingMachine.java (1 hunk)
  • bloc/README.md (2 hunks)
  • bloc/src/test/java/com/iluwatar/bloc/BlocUiTest.java (3 hunks)
  • builder/src/main/java/com/iluwatar/builder/Hero.java (2 hunks)
  • bytecode/src/test/java/com/iluwatar/bytecode/VirtualMachineTest.java (2 hunks)
Actionable Comments (4)
  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java [45-45]

    readability: "Logger usage does not align with Lombok @slf4j"

  • actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor2.java [41-45]

    readability: "Logger usage does not align with Lombok @slf4j"

  • actor-model/src/main/java/com/iluwatar/actormodel/Actor.java [51-59]

    possible bug: "Graceful shutdown on interruption"

  • .github/workflows/presubmit.yml [1-28]

    security: "Security risk: pull_request_target exposes secrets to forks"

Skipped Comments (1)
  • balking/src/main/java/com/iluwatar/balking/WashingMachine.java [78-82]

    performance: "Java version compatibility for thread logging"

Comment thread actor-model/src/main/java/com/iluwatar/actormodel/ExampleActor.java
Comment thread actor-model/src/main/java/com/iluwatar/actormodel/Actor.java
Comment thread .github/workflows/presubmit.yml
Sagar-S-R and others added 2 commits April 15, 2026 00:55
…p.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rceFactory.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Sagar-S-R Sagar-S-R requested a review from Copilot April 14, 2026 19:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 219 out of 363 changed files in this pull request and generated 30 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pom.xml
Comment thread pom.xml
Comment thread pom.xml
Comment thread .github/workflows/presubmit.yml
Comment thread .github/workflows/presubmit.yml Outdated
Comment thread dao-factory/src/main/java/com/iluwatar/daofactory/FlatFileDataSourceFactory.java Outdated
Comment thread dao-factory/src/main/java/com/iluwatar/daofactory/DAOFactory.java
Comment thread dao-factory/src/main/java/com/iluwatar/daofactory/DAOFactory.java
Comment thread money/README.md
Comment thread money/README.md
Sagar-S-R and others added 8 commits April 15, 2026 01:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…SourceFactory.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/pattern/ConcurrencyTests.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rTest.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.