Skip to content
Snippets Groups Projects
Commit 78a9098c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

fix on phone trimming

parent bf42d117
No related branches found
No related tags found
1 merge request!1Appointments dev
......@@ -271,7 +271,7 @@ public class Subject {
* @see #phone1
*/
public void setPhone1(String phone1) {
if (phone1.length() > 20) {
if (phone1 != null && phone1.length() > 20) {
logger.warn("Invalid phone. Ignoring: " + phone1);
} else {
this.phone1 = phone1;
......@@ -292,7 +292,7 @@ public class Subject {
* @see #phone2
*/
public void setPhone2(String phone2) {
if (phone2.length() > 20) {
if (phone2 != null && phone2.length() > 20) {
logger.warn("Invalid phone. Ignoring: " + phone2);
} else {
this.phone2 = phone2;
......@@ -313,7 +313,7 @@ public class Subject {
* @see #phone3
*/
public void setPhone3(String phone3) {
if (phone3.length() > 20) {
if (phone3 != null && phone3.length() > 20) {
logger.warn("Invalid phone. Ignoring: " + phone3);
} else {
this.phone3 = phone3;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment