<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
        <base href="https://issues.shibboleth.net/jira"> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt" bgcolor="#f5f5f5"> 
            <!-- header here --> 
            <tbody>
                <tr> 
                    <td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
                        <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                            <tbody>
                                <tr> 
                                    <td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="cid:jira-generated-image-avatar-2df919f3-882f-4804-9dde-e6cebe74cd9a" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td> 
                                    <td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="takeshi@gakunin.nii.ac.jp" id="email_takeshi@gakunin.nii.ac.jp" href="https://issues.shibboleth.net/jira/secure/ViewProfile.jspa?name=takeshi%40gakunin.nii.ac.jp" style="color:#0052cc;; color: #3b73af; text-decoration: none">Takeshi Nishimura</a> <strong>commented</strong> on <a href="https://issues.shibboleth.net/jira/browse/IDP-1498" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-c9d0b736-fc38-4ae3-a6a2-d0a92a8d3e8e" height="16" width="16" border="0" align="absmiddle" alt="Improvement"> IDP-1498</a> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
                        <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0; border-collapse: separate"> 
                            <tbody>
                                <tr> 
                                    <!-- there needs to be content in the cell for it to render in some clients --> 
                                    <td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff"> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                            <tbody>
                                                <tr> 
                                                    <td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://issues.shibboleth.net/jira/browse/IDP-1498" style="color: #3b73af; text-decoration: none">Re: Allow for Velocity Engine configuration customization</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-pattern" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; border-bottom: none; padding-bottom: 0" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 10px 0"> <p style="margin: 10px 0 0 0; margin-top: 0">CORRECTION:</p> 
                                                        <blockquote style="margin: 10px 0 0 0; border-left: 1px solid #cccccc; color: #707070; margin-left: 19px; padding: 10px 20px">
                                                            <p style="margin: 10px 0 0 0; margin-top: 0">non-existent or empty attribute values leave the placeholder in the template.</p>
                                                        </blockquote> <p style="margin: 10px 0 0 0">It turns out that non-existent attributes and null attribute values certainly do, but empty attribute values replace the placeholder with an empty string.</p> <p style="margin: 10px 0 0 0">You can check that with the following code:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-xml" style="margin: 10px 0 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
    <span class="code-tag" style="color: #000091"><AttributeDefinition xsi:type=<span class="code-quote" style="color: #009100">"Template"</span> id=<span class="code-quote" style="color: #009100">"mail"</span>></span>
        <span class="code-tag" style="color: #000091"><InputAttributeDefinition ref=<span class="code-quote" style="color: #009100">"emptyAttribute"</span>/></span>
        <span class="code-tag" style="color: #000091"><InputAttributeDefinition ref=<span class="code-quote" style="color: #009100">"nullAttribute"</span>/></span>
        <span class="code-tag" style="color: #000091"><AttributeEncoder xsi:type=<span class="code-quote" style="color: #009100">"SAML1String"</span> name=<span class="code-quote" style="color: #009100">"urn:mace:dir:attribute-def:mail"</span> encodeType=<span class="code-quote" style="color: #009100">"false"</span> /></span>
        <span class="code-tag" style="color: #000091"><AttributeEncoder xsi:type=<span class="code-quote" style="color: #009100">"SAML2String"</span> name=<span class="code-quote" style="color: #009100">"urn:oid:0.9.2342.19200300.100.1.3"</span> friendlyName=<span class="code-quote" style="color: #009100">"mail"</span> encodeType=<span class="code-quote" style="color: #009100">"false"</span> /></span>
        <span class="code-tag" style="color: #000091"><Template></span>
            <![CDATA[
${emptyAttribute}::${nullAttribute}
            ]]>
        <span class="code-tag" style="color: #000091"></Template></span>
        <span class="code-tag" style="color: #000091"><SourceAttribute></span>emptyAttribute<span class="code-tag" style="color: #000091"></SourceAttribute></span>
        <span class="code-tag" style="color: #000091"><SourceAttribute></span>nullAttribute<span class="code-tag" style="color: #000091"></SourceAttribute></span>
    <span class="code-tag" style="color: #000091"></AttributeDefinition></span>
    <span class="code-tag" style="color: #000091"><AttributeDefinition xsi:type=<span class="code-quote" style="color: #009100">"ScriptedAttribute"</span> id=<span class="code-quote" style="color: #009100">"emptyAttribute"</span>></span>
    <span class="code-tag" style="color: #000091"><Script></span><![CDATA[
        valueType =  Java.type(<span class="code-quote" style="color: #009100">"net.shibboleth.idp.attribute.EmptyAttributeValue"</span>);
        emptyAttribute.addValue(valueType.ZERO_LENGTH);
    ]]><span class="code-tag" style="color: #000091"></Script></span>
    <span class="code-tag" style="color: #000091"></AttributeDefinition></span>
    <span class="code-tag" style="color: #000091"><AttributeDefinition xsi:type=<span class="code-quote" style="color: #009100">"ScriptedAttribute"</span> id=<span class="code-quote" style="color: #009100">"nullAttribute"</span>></span>
    <span class="code-tag" style="color: #000091"><Script></span><![CDATA[
        valueType =  Java.type(<span class="code-quote" style="color: #009100">"net.shibboleth.idp.attribute.EmptyAttributeValue"</span>);
        nullAttribute.addValue(valueType.NULL);
    ]]><span class="code-tag" style="color: #000091"></Script></span>
    <span class="code-tag" style="color: #000091"></AttributeDefinition></span>
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0 0">Tested on 3.4.5. Log output:</p> 
                                                        <div class="preformatted panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
                                                            <div class="preformattedContent panelContent" style="padding: 9px 12px"> 
                                                                <pre style="margin: 10px 0 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; white-space: pre; word-break: normal; word-wrap: break-word; word-break: break-word; white-space: pre-wrap">2019-09-20 16:08:09,263 - DEBUG [net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:442] - Attribute Resolver 'ShibbolethAttributeResolver': Resolving dependencies for 'mail'
...
2019-09-20 16:08:09,298 - DEBUG [net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition:282] - Attribute Definition 'nullAttribute': produced an attribute with the following values [EmptyAttributeValue{value=NULL_VALUE}]
...
2019-09-20 16:08:09,320 - DEBUG [net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition:282] - Attribute Definition 'emptyAttribute': produced an attribute with the following values [EmptyAttributeValue{value=ZERO_LENGTH_VALUE}]
...
2019-09-20 16:08:09,322 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.TemplateAttributeDefinition:215] - Attribute Definition 'mail': Determining value 1
2019-09-20 16:08:09,322 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.TemplateAttributeDefinition:242] - Attribute Definition 'mail': Adding value '' for attribute 'emptyAttribute' to the template context
2019-09-20 16:08:09,340 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.TemplateAttributeDefinition:242] - Attribute Definition 'mail': Adding value 'null' for attribute 'nullAttribute' to the template context
2019-09-20 16:08:09,340 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.TemplateAttributeDefinition:249] - Attribute Definition 'mail': Evaluating template
2019-09-20 16:08:09,342 - DEBUG [org.apache.velocity:99] - ResourceManager : found 65f32bb6-d0a5-4c7f-8a72-5fbfe1788b4e with loader org.apache.velocity.runtime.resource.loader.StringResourceLoader
2019-09-20 16:08:09,342 - DEBUG [org.apache.velocity:99] - Null reference [template '65f32bb6-d0a5-4c7f-8a72-5fbfe1788b4e', line 1, column 20] : ${nullAttribute} cannot be resolved.
2019-09-20 16:08:09,343 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.TemplateAttributeDefinition:251] - Attribute Definition 'mail': Result of template evaluating was '::${nullAttribute}'
2019-09-20 16:08:09,343 - DEBUG [net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition:282] - Attribute Definition 'mail': produced an attribute with the following values [StringAttributeValue{value=::${nullAttribute}}]
</pre> 
                                                            </div>
                                                        </div> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                                        <table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                                            <tbody>
                                                                <tr> 
                                                                    <td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://issues.shibboleth.net/jira/browse/IDP-1498#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-fae2cd66-2e2d-450f-92ae-0990b851fc89" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td> 
                                                                    <td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://issues.shibboleth.net/jira/browse/IDP-1498#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td> 
                                                                </tr> 
                                                            </tbody>
                                                        </table> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <!-- there needs to be content in the cell for it to render in some clients --> 
                                <tr> 
                                    <td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff"> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
                        <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                            <tbody>
                                <tr> 
                                    <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian Jira <span id="footer-build-information">(v8.4.1#804002-<span title="94e96d6294939fc41f873484cf96b18ab6f2be0a" data-commit-id="94e96d6294939fc41f873484cf96b18ab6f2be0a}">sha1:94e96d6</span>)</span> </td> 
                                    <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                        <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="https://issues.shibboleth.net/jira/images/mail/atlassian-email-logo.png" alt="Atlassian logo" title="Atlassian logo" width="191" height="24" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    </body>
</html>