You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2011/09/20 13:17:08 UTC

[jira] [Created] (JCR-3077) WeightededHighlighter does not encode XML markup characters

WeightededHighlighter does not encode XML markup characters
-----------------------------------------------------------

                 Key: JCR-3077
                 URL: https://issues.apache.org/jira/browse/JCR-3077
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
            Reporter: Julian Reschke
            Assignee: Julian Reschke


See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Alex Parvulescu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108732#comment-13108732 ] 

Alex Parvulescu commented on JCR-3077:
--------------------------------------

a tiny feedback on your patch ;)

> - adds a test case
I think it would be better if the test was in the "ExcerptTest" class.

> - puts the convenience method "escape" into the base class (and uses it throughout)
I like the "escape" refactoring. 
Why is it not static? Text.encodeIllegalXMLCharacters is static, what is the gain of adding a non-static method to call a static one?

> - removes "static" from two methods on WeightedHighlighter
What is the benefit of making methods non static?


> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

    Summary: WeightedHighlighter does not encode XML markup characters  (was: WeightededHighlighter does not encode XML markup characters)

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

    Fix Version/s: 2.2.8

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 2.2.8, 2.3.0
>
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108740#comment-13108740 ] 

Julian Reschke commented on JCR-3077:
-------------------------------------

> a tiny feedback on your patch ;)

Merci. 

> I think it would be better if the test was in the "ExcerptTest" class.

Yep; I just did that.

> I like the "escape" refactoring.
>Why is it not static? Text.encodeIllegalXMLCharacters is static, what is the gain of adding a non-static method to call a static one?

It needs to be non-static to that classes that extend from the DefaultHighLighter can override it.

> What is the benefit of making methods non static?

So that they can call the other methods I made non-static for the reason above :-) 

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.0
           Status: Resolved  (was: Patch Available)

Fixed with r1173196

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 2.3.0
>
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3077:
-------------------------------

    Fix Version/s:     (was: 2.3.0)
                   2.1.6
                   2.0.4

Merged to the 2.1 branch in revision 1174630 and to 2.0 in revision 1174642.

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 2.0.4, 2.1.6, 2.2.9
>
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

    Attachment: JCR-3077.patch

see prev. comment

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3077:
-------------------------------

    Fix Version/s:     (was: 2.2.8)
                   2.2.9

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 2.2.9, 2.3.0
>
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

    Attachment: JCR-3077.patch

(whitespace fixed)

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

    Attachment: JCR-3077.patch

updated patch, uses ExcerptTest instead

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3077:
-------------------------------

    Fix Version/s: 1.6.5

Merged to the 1.6 branch in revision 1174650.

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 1.6.5, 2.0.4, 2.1.6, 2.2.9
>
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3077:
--------------------------------

    Status: Patch Available  (was: In Progress)

This patch

- adds a test case
- puts the convenience method "escape" into the base class (and uses it throughout)
- fixes a Javadoc typo
- fixes WeightedHighlighter to invoke the escaping as well
- removes "static" from two methods on WeightedHighlighter 

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108829#comment-13108829 ] 

Julian Reschke commented on JCR-3077:
-------------------------------------

2.2: r1173250

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 2.3.0
>
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JCR-3077) WeightedHighlighter does not encode XML markup characters

Posted by "Alex Parvulescu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108774#comment-13108774 ] 

Alex Parvulescu commented on JCR-3077:
--------------------------------------

cool!

+1 for the patch then.

> WeightedHighlighter does not encode XML markup characters
> ---------------------------------------------------------
>
>                 Key: JCR-3077
>                 URL: https://issues.apache.org/jira/browse/JCR-3077
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>         Attachments: JCR-3077.patch, JCR-3077.patch, JCR-3077.patch
>
>
> See JCR-2611; the same problem applies to WeightedHighlighter.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira