maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Siveton (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MNG-3145) StringIndexOutOfBoundsException in AbstractMavenReportRenderer
Date Mon, 07 Jan 2008 11:52:57 GMT

     [ http://jira.codehaus.org/browse/MNG-3145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vincent Siveton closed MNG-3145.
--------------------------------

      Assignee: Vincent Siveton
    Resolution: Fixed

Fixed in r609579
For the next time, please provide us a patch.
http://maven.apache.org/guides/development/guide-m2-development.html#Creating_and_submitting_a_patch

> StringIndexOutOfBoundsException in AbstractMavenReportRenderer
> --------------------------------------------------------------
>
>                 Key: MNG-3145
>                 URL: http://jira.codehaus.org/browse/MNG-3145
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Sites & Reporting
>    Affects Versions: 2.0.6
>            Reporter: Thomas Krammer
>            Assignee: Vincent Siveton
>             Fix For: Shared Components
>
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1768)
> at org.apache.maven.reporting.AbstractMavenReportRenderer.applyPattern(AbstractMavenReportRenderer.java:598)
> at org.apache.maven.reporting.AbstractMavenReportRenderer.linkPatternedText(AbstractMavenReportRenderer.java:353)
> at org.apache.maven.reporting.AbstractMavenReportRenderer.tableCell(AbstractMavenReportRenderer.java:213)
> at org.apache.maven.reporting.AbstractMavenReportRenderer.tableCell(AbstractMavenReportRenderer.java:193)
> at org.apache.maven.reporting.AbstractMavenReportRenderer.tableRow(AbstractMavenReportRenderer.java:225)
> at org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.renderDependenciesForScope(DependenciesReport.java:318)
> at org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.renderBody(DependenciesReport.java:228)
> at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:65)
> at org.apache.maven.report.projectinfo.DependenciesReport.executeReport(DependenciesReport.java:97)
> at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
> at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:67)
> at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:239)
> at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:115)
> at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:124)
> at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:92)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> When you look at the code it seems like a copy/paste error:
>                                 String subString = text.substring( lastOffset, i );
>                                 lastOffset = i + 1;
>                                 int lastComma = subString.lastIndexOf( "," );
>                                 if ( lastComma != -1 )
>                                 {
>                                     segments.put( subString.substring( 0, lastComma ).trim(),
>                                                   subString.substring( lastComma + 1
).trim() );
>                                 }
>                                 else
>                                 {
>                                     segments.put( subString.substring( 0, lastComma ).trim(),
null );
>                                 }
> I guess the last line should read:
>                                     segments.put( subString.trim(), null );

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message