Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DockerComposeConfiguration : Use Map.getOrDefault instead of conditional statement #1814

Open
rohanKanojia opened this issue Aug 4, 2024 · 1 comment · May be fixed by #1815
Open

DockerComposeConfiguration : Use Map.getOrDefault instead of conditional statement #1814

rohanKanojia opened this issue Aug 4, 2024 · 1 comment · May be fixed by #1815
Assignees

Comments

@rohanKanojia
Copy link
Member

Description

In DockerComposeConfiguration constructor, this code is using ternary operator to assign default values. We should use JDK's inbuilt getOrDefault method that's available on Map interface

basedir = config.containsKey("basedir") ? config.get("basedir") : "src/main/docker";
composeFile = config.containsKey("composeFile") ? config.get("composeFile") : "docker-compose.yml";
ignoreBuild = config.containsKey("ignoreBuild") ? Boolean.parseBoolean(config.get("ignoreBuilder")) : false;

@Er-Sadiq
Copy link

Er-Sadiq commented Aug 4, 2024

if no one is working on this issue I would like to take it up and will raise a RP soon

Er-Sadiq added a commit to Er-Sadiq/docker-maven-plugin that referenced this issue Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants