Skip to content

Commit 9fd25c2

Browse files
committed
Remove unnecessary assertions
1 parent 1c8add6 commit 9fd25c2

3 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/main/java/microsoft/exchange/webservices/data/core/service/item/Item.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,8 @@ public Item(ExchangeService service) throws Exception {
9999
* @param parentAttachment The parent attachment.
100100
* @throws Exception the exception
101101
*/
102-
public Item(ItemAttachment parentAttachment) throws Exception {
102+
public Item(final ItemAttachment parentAttachment) throws Exception {
103103
this(parentAttachment.getOwner().getService());
104-
EwsUtilities.ewsAssert(parentAttachment != null, "Item.ctor", "parentAttachment is null");
105-
106104
this.parentAttachment = parentAttachment;
107105
}
108106

src/main/java/microsoft/exchange/webservices/data/core/service/response/PostReply.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public final class PostReply extends ServiceObject {
6767
*/
6868
public PostReply(Item referenceItem) throws Exception {
6969
super(referenceItem.getService());
70-
EwsUtilities.ewsAssert(referenceItem != null, "PostReply.ctor", "referenceItem is null");
7170
referenceItem.throwIfThisIsNew();
7271

7372
this.referenceItem = referenceItem;

src/main/java/microsoft/exchange/webservices/data/core/service/response/ResponseObject.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public abstract class ResponseObject<TMessage extends EmailMessage> extends Serv
6767
*/
6868
protected ResponseObject(Item referenceItem) throws Exception {
6969
super(referenceItem.getService());
70-
EwsUtilities.ewsAssert(referenceItem != null, "ResponseObject.ctor", "referenceItem is null");
7170
referenceItem.throwIfThisIsNew();
7271
this.referenceItem = referenceItem;
7372
}

0 commit comments

Comments
 (0)