Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13919

"camel-package:update-readme" throws ArrayIndexOutOfBoundsException when there is an empty "adoc" file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0.M4
    • 3.0.0.RC2, 3.0.0
    • tooling
    • None
    • Unknown

    Description

      Steps to produce: 

      • Create an empty¬†adoc file in any component.
      • Run camel-package:update-readme.
      • It will fail with the following error:
        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)
        
      • As I can see here, it looks it will try to retrieve index although there are empty lines

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              omarsmak Omar Al-Safi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m