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

Omar Al-Safi updated CAMEL-13919:
---------------------------------
    Affects Version/s: 3.0.0.M4

> "camel-package:update-readme" throws ArrayIndexOutOfBoundsException when 
> there is an empty "adoc" file
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13919
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13919
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 3.0.0.M4
>            Reporter: Omar Al-Safi
>            Priority: Minor
>
> Steps to produce: 
>  * Create an empty {{adoc}} file in any component.
>  * Run {{camel-package:update-readme}}.
>  * It will fail with the following error: 
> {code}
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds 
> for length 1
>     at org.apache.camel.maven.packaging.UpdateReadmeMojo.updateAvailableFrom 
> (UpdateReadmeMojo.java:510)
>     at org.apache.camel.maven.packaging.UpdateReadmeMojo.executeComponent 
> (UpdateReadmeMojo.java:151)
>     at org.apache.camel.maven.packaging.UpdateReadmeMojo.execute 
> (UpdateReadmeMojo.java:105)
> {code}
> * As I can see 
> [here|https://github.com/apache/camel/blob/master/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateReadmeMojo.java#L510],
>  it looks it will try to retrieve index although there are empty lines



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to