Commit 865fa24b by nilu

S40358962 # Client - Incoming Issues (raised by Client) #Delay/problem with email ingest

parent 62e62fc4
...@@ -109,13 +109,13 @@ public class JobApplication extends BaseJobApplication ...@@ -109,13 +109,13 @@ public class JobApplication extends BaseJobApplication
if(getCV() != null) if(getCV() != null)
{ {
String contentType = getCV().getContentType(); String contentType = getCV().getContentType();
context.check(Utils.isValidContentType(contentType), this, FIELD_CV, "invalid"); context.check(contentType!= null && Utils.isValidContentType(contentType.toLowerCase()), this, FIELD_CV, "invalid");
} }
if(getCoverLetter() != null) if(getCoverLetter() != null)
{ {
String contentType = getCoverLetter().getContentType(); String contentType = getCoverLetter().getContentType();
context.check(Utils.isValidContentType(contentType) , this, FIELD_CoverLetter, "invalid"); context.check(contentType!= null && Utils.isValidContentType(contentType.toLowerCase()) , this, FIELD_CoverLetter, "invalid");
} }
} }
catch(RuntimeException ex) catch(RuntimeException ex)
......
...@@ -390,7 +390,7 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -390,7 +390,7 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
{ {
FileBinaryContent cv = contents.get(0); FileBinaryContent cv = contents.get(0);
if(Utils.isValidContentType(cv.getContentType())) if(cv.getContentType() != null && Utils.isValidContentType(cv.getContentType().toLowerCase()))
{ {
jobApplication.setCV(cv); jobApplication.setCV(cv);
} }
...@@ -400,7 +400,7 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -400,7 +400,7 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
{ {
FileBinaryContent coverLetter = contents.get(0); FileBinaryContent coverLetter = contents.get(0);
if(Utils.isValidContentType(coverLetter.getContentType())) if(coverLetter.getContentType() != null && Utils.isValidContentType(coverLetter.getContentType().toLowerCase()))
{ {
jobApplication.setCoverLetter(contents.get(1)); jobApplication.setCoverLetter(contents.get(1));
} }
...@@ -452,7 +452,7 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -452,7 +452,7 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
{ {
FileBinaryContent cv = contents.get(0); FileBinaryContent cv = contents.get(0);
if(Utils.isValidContentType(cv.getContentType())) if(cv.getContentType() != null && Utils.isValidContentType(cv.getContentType().toLowerCase()))
{ {
jobApplication.setCV(cv); jobApplication.setCV(cv);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment