iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
88.32k stars 26.21k forks source link

refactor: Eliminate Optional from fields and parameters for async method invocation #2830

Closed guqing closed 3 months ago

guqing commented 3 months ago

What this PR does?

Eliminate Optional from fields and parameters

This commit addresses the misuse of the Optional class within our Async Method Invocation pattern. Following #2829 , we have removed Optional from being used as class fields and method parameters.

Key Changes:

Rationale:

Fixes #2829

guqing commented 3 months ago

Hi @iluwatar After extensive research, I have been unable to find suitable software to edit the file located at https://github.com/iluwatar/java-design-patterns/blob/master/async-method-invocation/etc/async-method-invocation.ucls and https://github.com/iluwatar/java-design-patterns/blob/master/async-method-invocation/etc/async-method-invocation.png . Following the issue in https://github.com/iluwatar/java-design-patterns/issues/2532, I attempted to download Eclipse and ObjectAid, yet these efforts were unsuccessful🫣. Could you please advise on how I should proceed?😅

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
86.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

iluwatar commented 3 months ago

Hi @iluwatar After extensive research, I have been unable to find suitable software to edit the file located at https://github.com/iluwatar/java-design-patterns/blob/master/async-method-invocation/etc/async-method-invocation.ucls and https://github.com/iluwatar/java-design-patterns/blob/master/async-method-invocation/etc/async-method-invocation.png . Following the issue in #2532, I attempted to download Eclipse and ObjectAid, yet these efforts were unsuccessful🫣. Could you please advise on how I should proceed?😅

Hey, don't worry about the .ucls-file. It is a duplicate since we primarily use .urm.puml files that are autogenerated. I'll remove the .ucls-file.

iluwatar commented 3 months ago

Looks good! Thank you for the contribution 🎉

@all-contributors please add @guqing for code

allcontributors[bot] commented 3 months ago

@iluwatar

I couldn't determine any contributions to add, did you specify any contributions? Please make sure to use valid contribution names.

I've put up a pull request to add @guqing! :tada: