maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Krammer (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MNG-3145) StringIndexOutOfBoundsException in AbstractMavenReportRenderer
Date Fri, 10 Aug 2007 12:57:13 GMT
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


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