ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

Find a bug. EmailAddress.tostring() is incorrect

Open icezmb opened this issue 11 years ago • 4 comments

hi. I have found a bug in EmailAddress class. When we want to transform a EmailAddress object to String, we get an incorrect string. Follow is the tostring code(EmailAddress class line 356):

if (null != this.getName() && this.getName().isEmpty()) { return this.getName() + " <" + addressPart + ">"; } else { return addressPart; }

"if(null != this.getName() && this.getName().isEmpty())" should be "if(null != this.getName() && !this.getName().isEmpty())", forget to add "!"

icezmb avatar Dec 19 '14 03:12 icezmb

@icezmb you are right. Are you able to create a PR of it with some jUnits included? thanks in advance.

serious6 avatar Dec 21 '14 13:12 serious6

@serious6 what's the meaning of PR?

icezmb avatar Dec 22 '14 06:12 icezmb

@icezmb I meant PR as pull request

serious6 avatar Dec 22 '14 10:12 serious6

if this one is merged, then perhaps we can close the issue?

ahaarrestad avatar Feb 03 '15 08:02 ahaarrestad