• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

flexPMD.xml:42: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

New Here ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

Am try use FlexPMD on big project(about 1000 classes, ~6mb code), same  configuration on small project(about 350classes, ~ 1.2mb code) work fine.

FlexPMD lastest - 1.1

Java - 6 ver 19

org.apache.ant_1.7.0.v200803061910

39   <target name="flexPmdWithDefaultRuleset">
40        <flexPmd
41         sourceDirectory="${src.dir}"
42            outputDirectory="${bin.dir}"/>
43  </target>

Buildfile: d:\ant\flexPMD.xml
flexPmdWithDefaultRuleset:
  [flexPmd] 05.05.2010 12:48:56 com.adobe.ac.pmd.engines.AbstractFlexPmdEngine loadRuleset
  [flexPmd] INFO: Ruleset: C:\Temp\default_flex3199696228101358228.xml
  [flexPmd] 05.05.2010 12:48:56 com.adobe.ac.pmd.engines.AbstractFlexPmdEngine loadRuleset
  [flexPmd] INFO: Rules number in the ruleSet: 90

BUILD FAILED
d:\ant\flexPMD.xml:42: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Total time: 19 seconds

TOPICS
FlexPMD

Views

3.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Hi,

While this is not expected, FlexPMD is being used on much bigger applications than this one. It is not size-related.

This issue is likely to be related to a specific piece of code in your project.

Can you try to specify a sub source folder, and maybe isolate a class or a piece of code which makes it break?

Did you send the entire console content?

Thanks for your feedback.

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

Hi,

Im find class by remove one by one. But im dont find string, if im delete one piece of code flexPMD work, but if remove all other code flexPMD work too.


Can you give me email for send this class?

Im find out how change class to parseable for flexPMD so problem solve.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 07, 2010 May 07, 2010

Copy link to clipboard

Copied

Can open a ticket on JIRA for this please?

Thanks,

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2010 May 07, 2010

Copy link to clipboard

Copied

Hi,

Im can open tikcet, but class code is company property, so am doesn`t want public his in JIRA. And ticket without way to reproduce helpless imho.

Code do not contain any commercial secret but im sign documetns what forbidden me public code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 15, 2010 Oct 15, 2010

Copy link to clipboard

Copied

Has this bug been resolved?  We're seeing the same "String index out of range: -1" problem as well.

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 30, 2010 Dec 30, 2010

Copy link to clipboard

Copied

I have just downloaded and encountered this error from the most recent FlexPMD version (1.2).

I managed to systematically determine which ActionScript file and (more to the point) which line of code was causing this error for me.  I am by no means an Flex/ActionScript/Flash guru so this may not be THE problem but merely one (of many?) which triggers this error.

My ActionScript file contained the line:

[Inspectable()]

Apparently an empty attribute list is a no-no for FlexPMD.  Adding any text or even removing the '( )' caused FlexPMD to be happy again

[Instpectable]  // no error

[Inspectable(blah)] // no error

[Inspectable()]  // EHHHHHHHHHHHHHHNNNNN!!!!   StringIndexOutOfBounds!

Hope that helps,

Tim

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2011 Mar 16, 2011

Copy link to clipboard

Copied

LATEST

There seems to also be an issue with having certain xml as a class/instance property.

private static const CHECK_VERSION:XML = <![CDATA[function() { return { appVersion: navigator.appVersion, userAgent: navigator.userAgent, appName: navigator.appName };}]]>;

I had the above code in one of my classes and it caused the StringIndexOutOfBoundsException.

If I set the xml within the class, no exception. But if it was preset as a class/instance property it throws the exception.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines