[
https://issues.apache.org/jira/browse/SLING-10215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17302375#comment-17302375
]
Konrad Windszus edited comment on SLING-10215 at 3/16/21, 10:08 AM:
--------------------------------------------------------------------
It would help to expose the full repoinit section in
https://github.com/apache/sling-org-apache-sling-feature-analyser/blob/642a14742f1b940ab658979dc4828248d092610b/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckRepoinit.java#L92,
although it might be really long. For me the error rather looks like an error
with the repoinit parser instead of the analyser...
I dug a bit deeper and to me it seems that the spooling from Reader to Writer
in
https://github.com/apache/sling-org-apache-sling-repoinit-parser/blob/master/src/main/java/org/apache/sling/repoinit/parser/impl/RepoInitParserService.java#L46
is assuming that 0 is never returned.
Apache Commons IO only ends once -1 is being returned which seems the safer
approach
https://github.com/apache/commons-io/blob/2d238d87dadf2860f9488133f9d250946bea3eb4/src/main/java/org/apache/commons/io/IOUtils.java#L1307.
Also relying on Commons IO for that logic seems better.
was (Author: kwin):
It would help to expose the full repoinit section in
https://github.com/apache/sling-org-apache-sling-feature-analyser/blob/642a14742f1b940ab658979dc4828248d092610b/src/main/java/org/apache/sling/feature/analyser/task/impl/CheckRepoinit.java#L92,
although it might be really long. For me the error rather looks like an error
with the repoinit parser instead of the analyser...
> repoinit analyser fails if there is no repoinit section
> -------------------------------------------------------
>
> Key: SLING-10215
> URL: https://issues.apache.org/jira/browse/SLING-10215
> Project: Sling
> Issue Type: Bug
> Components: Feature Model Analyser
> Affects Versions: Feature Model Analyser 1.3.22
> Reporter: A. J. David Bosschaert
> Priority: Major
> Fix For: Feature Model Analyser 1.3.24
>
>
> As reported by [~joerghoh]:
> the analyzer complains about an invalid repoinit, but the created test
> project does not contain any repoinit statement.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)