You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2016/01/03 12:16:40 UTC

[jira] [Commented] (DOXIASITETOOLS-134) Remove special handling of date format in DefaultSiteRenderer

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

Hervé Boutemy commented on DOXIASITETOOLS-134:
----------------------------------------------

can you copy in the description some example of code that you want to avoid, please? to make the intent more clear

Then don't forget that there are compatibility issues: if a newer version of Doxia Sitetools gives more features, a skin has to work with previous versions of Sitetools

one copy/paste that I hate, for example, is
{code}  #if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") ||
    $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") ||
    $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) ){code}
but I know that if I add a new method to DecorationModel to have the feature as API, any skin using this new feature will have a minimum Sitetools requirement, then a minimum maven-site-plugin requirement: currently, this is a dependency that we completely avoided

then I'd like to be very cautious about new features in Doxia Sitetools to make skins easier to maintain, since this could have the opposite effect, with people complaining about skins not working

> Remove special handling of date format in DefaultSiteRenderer
> -------------------------------------------------------------
>
>                 Key: DOXIASITETOOLS-134
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-134
>             Project: Maven Doxia Sitetools
>          Issue Type: Task
>    Affects Versions: 1.6
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>
> {{dateFormat}} is double-checked from validity and existance in decoration model and set with a fallback when everything fails. We should solely rely on the decoration model because it has a fixed value. This would save code and duplicate fixed values. Every deviation from it is undefined behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)