6 Replies Latest reply on Oct 17, 2010 7:48 AM by RobStacy

    String index out of range: -15

    RobStacy Level 1

      When I try and run FlexPMD from the command line or through Maven Site I get the following exception:

       

      com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -15
              at java.lang.String.substring(Unknown Source)
              at com.adobe.ac.pmd.nodes.impl.MetaDataNode.compute(MetaDataNode.java:72)
              at com.adobe.ac.pmd.nodes.impl.NodeFactory.createMetaData(NodeFactory.java:48)
              at com.adobe.ac.pmd.nodes.impl.AbstractNode.computeMetaDataList(AbstractNode.java:59)
              at com.adobe.ac.pmd.nodes.impl.FunctionNode.compute(FunctionNode.java:145)
              at com.adobe.ac.pmd.nodes.impl.ClassNode.detectFunction(ClassNode.java:414)
              at com.adobe.ac.pmd.nodes.impl.ClassNode.computeClassContent(ClassNode.java:366)
              at com.adobe.ac.pmd.nodes.impl.ClassNode.compute(ClassNode.java:129)
              at com.adobe.ac.pmd.nodes.impl.PackageNode.compute(PackageNode.java:86)
              at com.adobe.ac.pmd.nodes.impl.NodeFactory.createPackage(NodeFactory.java:57)
              at com.adobe.ac.pmd.files.FileSetUtils.computeAsts(FileSetUtils.java:136)
              at com.adobe.ac.pmd.FlexPmdViolations.computeAsts(FlexPmdViolations.java:123)
              at com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:102)
              at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.ja va:161)
              at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:1 38)
              at com.adobe.ac.pmd.commandline.FlexPMD.startFlexPMD(FlexPMD.java:119)
              at com.adobe.ac.pmd.commandline.FlexPMD.main(FlexPMD.java:70)

       

      When I run through eclipse on a small set of code it works fine.  However if I try running on the whole project it never seems to finish after an hour.  I am using version 1.2 on a Windows 7 box.