[ 
https://issues.apache.org/jira/browse/SLING-6517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-6517:
-----------------------------------
    Affects Version/s: Rewriter 1.2.0
          Component/s: Extensions

> A condition that is always true.
> --------------------------------
>
>                 Key: SLING-6517
>                 URL: https://issues.apache.org/jira/browse/SLING-6517
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Rewriter 1.2.0
>            Reporter: JC
>            Priority: Trivial
>             Fix For: Rewriter 1.2.2
>
>
> I've recently found a condition that always returns true from the current 
> Github snapshot.
> Path: 
> contrib/extensions/rewriter/src/main/java/org/apache/sling/rewriter/impl/components/TraxErrorHandler.java
> {code:java}
>  86     private String getMessage(TransformerException exception) {
>  87         SourceLocator locator = exception.getLocator();
>  88         if (locator != null) {
>  89             String id = 
> (!locator.getPublicId().equals(locator.getPublicId()))
>  90                     ? locator.getPublicId()
>  91                     : (null != locator.getSystemId())
>  92                     ? locator.getSystemId() : "SystemId Unknown";
>  93             return "File " + id
>  94                    + "; Line " + locator.getLineNumber()
>  95                    + "; Column " + locator.getColumnNumber()
>  96                    + "; " + exception.getMessage();
>  97         }
>  98         return exception.getMessage();
>  99     }
> 100 }
> {code}
> In Line 89, locator.getPublicId().equals(locator.getPublicId()) compares the 
> same Id. It looks like a minor issue and typos but wanted to report just in 
> case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to