Bug 674593 - Plugin generator throws StringIndexOutOfBoundsException on Windows
Plugin generator throws StringIndexOutOfBoundsException on Windows
Status: NEW
Product: RHQ Project
Classification: Other
Component: No Component (Show other bugs)
1.4
Unspecified Windows
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-02 10:27 EST by Hontvári József Levente
Modified: 2011-05-23 20:58 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Hontvári József Levente 2011-02-02 10:27:49 EST
Description of problem:
On Windows the plugin generator throws an exception after all questions are answered. It runs well with the same answers on Ubuntu.

Version-Release number of selected component (if applicable):
rhq-pluginGen-1.4.0-SNAPSHOT-jar-with-dependencies.jar – against RHQ 1.4 Snapshot of 2009/09/23

How reproducible:
always

Steps to Reproduce:
C:\Users\levente\home\javaCommon\rhq-http-plugin>java -jar rhq-pluginGen-1.4.0-S
NAPSHOT-jar-with-dependencies.jar
Please specify the plugin root category PLATFORM(P), SERVER(S), SERVICE(I), S
Please specify its Name: HttpChecker
Please specify its PackagePrefix: com.flyordie.rhqHttpPlugin
Please specify its FileSystemRoot: C:\home\javaCommon\rhq-http-plugin
Please specify its ComponentClass: HttpCheckerComponent
Please specify its DiscoveryClass: HttpCheckerDiscovery
Please specify if it should support Events (y/N): n
Please specify its Description: Issues HTTP requests and checks the answer
Please specify its ParentType:
Please specify if it should support Monitoring (y/N):
Please specify if it should support Operations (y/N):
Please specify if it should support Singleton (y/N): y
Please specify if it should support ResourceConfiguration (y/N):
Please specify if it should support SupportFacet (y/N):
Please specify if it should support CreateChildren (y/N):
Please specify if it should support UsesExternalJarsInPlugin (y/N): y
Please specify if it should support DeleteChildren (y/N): y
Please specify if it should support ManualAddOfResourceType (y/N): y
Please specify if it should support UsePluginLifecycleListenerApi (y/N): y
Please specify if it should support DependsOnJmxPlugin (y/N): n
Please specify its RhqVersion: 3.0

Do you want to add a child to HttpChecker? (y/N) n
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind
ex out of range: 1
        at java.lang.String.charAt(Unknown Source)
        at java.util.regex.Matcher.appendReplacement(Unknown Source)
        at java.util.regex.Matcher.replaceAll(Unknown Source)
        at java.lang.String.replaceAll(Unknown Source)
        at org.rhq.helpers.pluginGen.PluginGen.toDirPath(PluginGen.java:318)
        at org.rhq.helpers.pluginGen.PluginGen.generate(PluginGen.java:274)
        at org.rhq.helpers.pluginGen.PluginGen.run(PluginGen.java:94)
        at org.rhq.helpers.pluginGen.PluginGen.main(PluginGen.java:55)

C:\Users\levente\home\javaCommon\rhq-http-plugin>  

Actual results:
Directory stucture is generated, but not Java source files.

Note You need to log in before you can comment on or make changes to this bug.