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

Avoid unnecessary copies #302

Merged
merged 3 commits into from
Feb 2, 2024
Merged

Conversation

csware
Copy link
Contributor

@csware csware commented Jan 23, 2024

These copies were introduced with PR #272.

This related to #301 and works with Java 9.

@@ -846,15 +846,15 @@ Property forKey(String propertyName) {
builder.put("z-index", bottom);
builder.put("repeating-linear-gradient()", linearGradient$Fun);
builder.put("repeating-radial-gradient()", radialGradient$Fun);
DEFINITIONS = Map.copyOf(builder);
DEFINITIONS = Collections.unmodifiableMap(builder);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. I see builder allocated locally at 263

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly, I renamed all variables to include bulder to make it more clear.

Signed-off-by: Sven Strickroth <[email protected]>
@mikesamuel mikesamuel merged commit 3e32abc into OWASP:main Feb 2, 2024
6 checks passed
@csware csware deleted the guava-migration-do-less branch February 2, 2024 19:42
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.

2 participants