[ 
https://issues.apache.org/jira/browse/STREAMS-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16667335#comment-16667335
 ] 

ASF GitHub Bot commented on STREAMS-626:
----------------------------------------

steveblackmon closed pull request #464: resolves STREAMS-626
URL: https://github.com/apache/streams/pull/464
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/streams-contrib/streams-provider-linkedin/src/main/templates/linkedin.ttl.ftl 
b/streams-contrib/streams-provider-linkedin/src/main/templates/linkedin.ttl.ftl
index 266760a0bf..4f794cf186 100644
--- 
a/streams-contrib/streams-provider-linkedin/src/main/templates/linkedin.ttl.ftl
+++ 
b/streams-contrib/streams-provider-linkedin/src/main/templates/linkedin.ttl.ftl
@@ -156,6 +156,7 @@
   </#if>
   vcard:org "${connection.company?replace("\\W"," ","r")}" ;
   vcard:title "${connection.position?replace("\\W"," ","r")}" ;
+<#if contacts??>
 <#list contacts as contact>
   <#if (contact.first_name == connection.first_name ) && (contact.last_name == 
connection.last_name)>
   <#attempt>
@@ -169,18 +170,18 @@
   <#attempt>
     <#list contact.phone_numbers?split(",") as raw_phone_number>
       <#assign raw_phone_number = pp.loadData('eval', '
-    debug();
-    com.google.i18n.phonenumbers.PhoneNumberUtil phoneUtil = 
com.google.i18n.phonenumbers.PhoneNumberUtil.getInstance();
-    String rawPhoneNumber = "${raw_phone_number}";
-    phoneNumber = phoneUtil.parse(rawPhoneNumber, "US");
-    return phoneUtil.format(phoneNumber, 
com.google.i18n.phonenumbers.PhoneNumberUtil$PhoneNumberFormat.RFC3966);
-  ')>
+        com.google.i18n.phonenumbers.PhoneNumberUtil phoneUtil = 
com.google.i18n.phonenumbers.PhoneNumberUtil.getInstance();
+        String rawPhoneNumber = "${raw_phone_number}";
+        phoneNumber = phoneUtil.parse(rawPhoneNumber, "US");
+        return phoneUtil.format(phoneNumber, 
com.google.i18n.phonenumbers.PhoneNumberUtil$PhoneNumberFormat.RFC3966);
+      ')>
   vcard:tel "${phone_number}" ;
     </#list>
     <#recover>
   </#attempt>
   </#if>
 </#list>
+</#if>
   .
 
 :${id}-connect-${cid}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> linkedin.ttl.ftl - contacts can be null
> ---------------------------------------
>
>                 Key: STREAMS-626
>                 URL: https://issues.apache.org/jira/browse/STREAMS-626
>             Project: Streams
>          Issue Type: Bug
>            Reporter: Steve Blackmon
>            Assignee: Steve Blackmon
>            Priority: Major
>
> Some user exports may not have an Imported Contacts.csv (perhaps basic vs 
> complete export) - so don’t crash during processing if ‘contacts’ is null
> 16:51:21                      >>> ABORTED! <<<
> 16:51:21                      
> 16:51:21                      The cause of aborting was: 
> 16:51:21                      FreeMarker template error: The following has 
> evaluated to null or missing:
> 16:51:21                      ==> contacts  [in template "linkedin.ttl.ftl" 
> at line 152, column 8]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to