8000 API clean ups by krystian-panek-vmltech · Pull Request #130 · wttech/acm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

API clean ups #130

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

Merged
merged 3 commits into from
Jun 26, 2025
Merged

API clean ups #130

merged 3 commits into from
Jun 26, 2025

Conversation

krystian-panek-vmltech
Copy link
Collaborator

No description provided.

@krystian-panek-vmltech krystian-panek-vmltech changed the title ACL API clean up API clean ups Jun 26, 2025
Copy link
Contributor
@Copilot 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

This PR cleans up the APIs by streamlining error handling and reducing redundancy across resource and ACL-related operations. Key changes include:

  • Updated logging behavior in copy and move operations instead of throwing exceptions when targets already exist.
  • Removed multiple overloaded allow/deny (and related) methods from ACL classes.
  • Minor syntax adjustments in the README for Groovy code formatting.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
core/src/main/java/dev/vml/es/acm/core/repo/RepoResource.java Updated error handling in copy and move methods with log messages instead of exceptions.
core/src/main/java/dev/vml/es/acm/core/acl/authorizable/AclAuthorizable.java Removed numerous overloaded methods to simplify the API.
core/src/main/java/dev/vml/es/acm/core/acl/Acl.java Removed multiple overloaded methods to streamline permission operations.
README.md Adjusted Groovy syntax for improved clarity and string interpolation.
Comments suppressed due to low confidence (5)

core/src/main/java/dev/vml/es/acm/core/repo/RepoResource.java:266

  • Changing the behavior from throwing an exception to logging and returning the target on an existing resource may be a breaking change for API consumers. Consider documenting this change clearly or introducing a deprecation phase.
                LOG.info("Skipped copying resource from '{}' to '{}' as it already exists", path, target.getPath());

core/src/main/java/dev/vml/es/acm/core/repo/RepoResource.java:305

  • The updated move operation now logs and returns the target instead of throwing an exception when the target exists. Ensure that the API documentation reflects this behavior change to avoid unexpected client-side consequences.
                LOG.info("Skipped moving resource from '{}' to '{}' as it already exists", path, target.getPath());

core/src/main/java/dev/vml/es/acm/core/acl/authorizable/AclAuthorizable.java:189

  • The removal of these overloaded allow (and similarly deny) methods may break existing client code. It is advisable to provide a deprecation phase or update the documentation to notify API consumers of these breaking changes.
        return apply(options, true);

core/src/main/java/dev/vml/es/acm/core/acl/Acl.java:585

  • Removing the overloaded allow (and corresponding deny) methods here streamlines the API but may cause compatibility issues with existing integrations. Please ensure that API consumers are well informed and corresponding documentation is updated accordingly.
            context.getLogger()

README.md:268

  • The removal of the safe navigation operator ('?.') in the 'johnDoe.with' call could lead to a NullPointerException if johnDoe is null. Verify that johnDoe is guaranteed to be non-null post-change or reintroduce the null-check if necessary.
    johnDoe.with {

@krystian-panek-vmltech krystian-panek-vmltech marked this pull request as ready for review June 26, 2025 07:15
@krystian-panek-vmltech krystian-panek-vmltech merged commit 7b65b76 into main Jun 26, 2025
1 check passed
@krystian-panek-vmltech krystian-panek-vmltech deleted the acl-api-cleanup branch June 26, 2025 08:19
@krystian-panek-vmltech krystian-panek-vmltech restored the acl-api-cleanup branch June 26, 2025 08:19
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.

1 participant
0