Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-370

Confluence module cannot parse horizontal separator

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.1.3
    • Component/s: Module - Confluence
    • Labels:
      None

      Description

      Confluence module cannot parse horizontal separator. E.g. if you parse this

      Up
      ----
      Down
      

      you get out of bounds exception in the ListBlockParser. This code looks pretty flakey (I probably wrote it, so apologies if it was my fault):

         private boolean isList( String line )
          {
              line = line.trim();
      
              if ( line.startsWith( "*" ) || line.startsWith( "-" ) || line.startsWith( "#" ) )
              {
                  String temp = line.substring( 1 );
                  while ( temp.charAt( 0 ) == '*' || temp.charAt( 0 ) == '-' || temp.charAt( 0 ) == '#' )
                  {
                      temp = temp.substring( 1 );
                  }
      
                  if ( temp.charAt( 0 ) == ' ' )
                  {
                      return true;
                  }
              }
      
              return false;
          }
      

      There are a load of potential out of bounds exceptions there. This one happens to come from the fact that the loop never terminates before the temp string is exhausted.

        Attachments

          Activity

            People

            • Assignee:
              ltheussl Lukas Theussl
              Reporter:
              david_syer Dave Syer

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment