Restcomm-Connect icon indicating copy to clipboard operation
Restcomm-Connect copied to clipboard

Issue 2620

Open ddhuy opened this issue 8 years ago • 9 comments

Now we can be able to change the email address of an account.

ddhuy avatar Nov 18 '17 14:11 ddhuy

@gsaslis can you please help review this one ?

deruelle avatar Nov 23 '17 13:11 deruelle

@ddhuy can you please sign the Contributor License Agreement at https://telestax.com/open-source/#Contribute so we can accept the contribution ?

deruelle avatar Nov 23 '17 13:11 deruelle

@deruelle , I have just signed the CLA.

ddhuy avatar Nov 23 '17 15:11 ddhuy

@ddhuy the problem with commit https://github.com/RestComm/Restcomm-Connect/pull/2641/commits/b001a77c8ea7f9d1757315dd5affb2e5d52b157c is that you've changed the type of the InvalidEmailException: used to be Exception, now it's RuntimeException.

This means that its usages (e.g. https://github.com/RestComm/Restcomm-Connect/blob/e449462909d5620daa873e9d20818fba6413ac5c/restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/EmailMessagesEndpoint.java#L91 ) after your change now only catch a RuntimeException, instead of the more general Exception.

I am not sure this is a valid / intended change... ?

gsaslis avatar Dec 11 '17 14:12 gsaslis

@gsaslis , Thanks for your reviewing time and comments. I think make the InvalidEmailException sub-class from RuntimeException is more cleaner and easier for usage. But since sub-class from Exception or RuntimeException has not much different, so I will revert it back to keep minimum effect of the change.

ddhuy avatar Dec 15 '17 16:12 ddhuy

@ddhuy just to be clear: there is a difference between Exception and RuntimeException and it's a big one. The former is a checked exception, the latter is unchecked, leading to completely different handling.

Here's some further reading on this topic https://www.ibm.com/developerworks/library/j-jtp05254/index.html , but there's a broad discussion on checked vs. unchecked exceptions and google is your friend. ; )

I am passing your PR on for review from the core team.

gsaslis avatar Jan 25 '18 13:01 gsaslis

Hi all, I have tried to resolve the merging conflict. Please help cross check them again

ddhuy avatar Mar 08 '18 18:03 ddhuy

Thanks @ddhuy !

@jaimecasero / @RestComm/vvs-squad does this look good to merge?

gsaslis avatar Mar 09 '18 10:03 gsaslis

i was thinking email is sometimes used as account key, so im not sure making email address modifiable could have some impact. Let me think about it...

jaimecasero avatar Mar 09 '18 11:03 jaimecasero