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

Storage - Files Data Lake Samples Issue #36969

Closed
faynef opened this issue Sep 27, 2023 · 0 comments · Fixed by #37881
Closed

Storage - Files Data Lake Samples Issue #36969

faynef opened this issue Sep 27, 2023 · 0 comments · Fixed by #37881
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. needs-team-triage This issue needs the team to triage. Storage Storage Service (Queues, Blobs, Files) test-manual-pass

Comments

@faynef
Copy link
Contributor

faynef commented Sep 27, 2023

Section link1, link2, link3, link4:
image

Reason:
java.lang.NullPointerException: Cannot invoke "String.toLowerCase(java.util.Locale)" because the return value of "com.azure.storage.file.datalake.models.AccessControlType.toString()" is null.

Suggestion:
Update code to

PathAccessControlEntry ownerEntry = new PathAccessControlEntry()
	              .setAccessControlType(AccessControlType.USER)
	              .setPermissions(new RolePermissions().setReadPermission(true).setWritePermission(true).setExecutePermission(true));

PathAccessControlEntry groupEntry = new PathAccessControlEntry()
	      .setAccessControlType(AccessControlType.GROUP)
	      .setPermissions(new RolePermissions().setReadPermission(true).setWritePermission(true));

PathAccessControlEntry otherEntry = new PathAccessControlEntry()
	      .setAccessControlType(AccessControlType.OTHER)
	      .setPermissions(new RolePermissions());

List<PathAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(ownerEntry);
pathAccessControlEntries.add(groupEntry);
pathAccessControlEntries.add(otherEntry);

Section link1, link2:
image

Reason:
java.lang.NullPointerException: Cannot invoke "String.toLowerCase(java.util.Locale)" because the return value of "com.azure.storage.file.datalake.models.AccessControlType.toString()" is null.

Suggestion:
Update code to

PathRemoveAccessControlEntry ownerEntry = new PathRemoveAccessControlEntry()
	                .setAccessControlType(AccessControlType.USER)
	                .setDefaultScope(true);
	
PathRemoveAccessControlEntry groupEntry = new PathRemoveAccessControlEntry()
	      .setAccessControlType(AccessControlType.GROUP)
	      .setDefaultScope(true);

PathRemoveAccessControlEntry otherEntry = new PathRemoveAccessControlEntry()
	      .setAccessControlType(AccessControlType.OTHER)
	      .setDefaultScope(true);
List<PathRemoveAccessControlEntry> pathAccessControlEntries = new ArrayList<>();
pathAccessControlEntries.add(ownerEntry);
pathAccessControlEntries.add(groupEntry);
pathAccessControlEntries.add(otherEntry);

@sandeep-sen , @joshfree , @rohit-ganguly , @kasobol-msft and @alzimmermsft to notification.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files) labels Sep 27, 2023
@v-xuto v-xuto added test-manual-pass and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Sep 27, 2023
@ibrahimrabab ibrahimrabab self-assigned this Nov 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. needs-team-triage This issue needs the team to triage. Storage Storage Service (Queues, Blobs, Files) test-manual-pass
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants