Skip to content

Adding isAll and isNone as read-only methods#29809

Merged
ibrahimrabab merged 2 commits intomainfrom
fileSharesRevision
Jul 7, 2022
Merged

Adding isAll and isNone as read-only methods#29809
ibrahimrabab merged 2 commits intomainfrom
fileSharesRevision

Conversation

@ibrahimrabab
Copy link
Copy Markdown
Contributor

Description

Adding isAll and isNone as read-only methods, and removing unused booleans from CopyableFileSmbProperties.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jul 6, 2022
@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-storage-file-share

}

/**
* @return whether no properties should be copied from the source file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There should be a description in this JavaDoc too along with @return tag doc

* @return whether all properties should be copied from the source file.
*/
public Boolean isAll() {
return isSetFileAttributes && isSetCreatedOn && isSetLastWrittenOn && isSetChangedOn;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since all these are Boolean properties, this will throw NPE if any of them is null. The constructor does initialize them but the user can still call setLastWrittenOn(null) to make this property null. So, we should check for null here.

@ibrahimrabab ibrahimrabab enabled auto-merge (squash) July 7, 2022 07:04
@ibrahimrabab ibrahimrabab merged commit 7ea2fa9 into main Jul 7, 2022
@ibrahimrabab ibrahimrabab deleted the fileSharesRevision branch July 7, 2022 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants