You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "mneethiraj (via GitHub)" <gi...@apache.org> on 2025/07/02 07:25:43 UTC
Re: [PR] ATLAS-4916 : Improve Efficiency in Access Request Handling by Optimizing Classification Retrieval [atlas]
mneethiraj commented on code in PR #374:
URL: https://github.com/apache/atlas/pull/374#discussion_r2179319950
##########
authorization/src/main/java/org/apache/atlas/authorize/AtlasEntityAccessRequest.java:
##########
@@ -76,7 +79,7 @@ public AtlasEntityAccessRequest(AtlasTypeRegistry typeRegistry, AtlasPrivilege a
this.businessMetadata = businessMetadata;
this.attributeName = attributeName;
this.typeRegistry = typeRegistry;
- this.entityClassifications = super.getClassificationNames(entity);
+ this.entityClassifications = (entity != null && CollectionUtils.isNotEmpty(entity.getClassificationNames())) ? new HashSet<>(entity.getClassificationNames()) : Collections.emptySet();
Review Comment:
`AtlasAccessRequest.getClassificationNames()` implementation already handles `entity == null` and returns either `Collections.emptySet()` or a new `HashSet` containing classification names. Is the change here necessary?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@atlas.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org