[JBoss JIRA] (ROASTER-85) StringIndexOutOfBoundsException when handling nested typed parameters
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/ROASTER-85?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on ROASTER-85:
-------------------------------------------
Hi! Thank you so much for filing this bug AND for submitting a failing test case! Open source is driven by people like you! George is on Vacation for another week or so, but if I can get some time away from my current tasks, I will try to take a look at this. If you happen to solve it before I get the chance to take a look, just send an updated PR and if looks good and the tests pass, I'll be happy to merge it.
> StringIndexOutOfBoundsException when handling nested typed parameters
> ---------------------------------------------------------------------
>
> Key: ROASTER-85
> URL: https://issues.jboss.org/browse/ROASTER-85
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.17.1.Final
> Reporter: Stephan Windmüller
>
> When parsing a Type object with nested types, like {{Map<String,Map<java.lang.String,Map<java.lang.String,java.lang.String>>}}, a StringIndexOutOfBoundsException is thrown:
> {{java.lang.StringIndexOutOfBoundsException: String index out of range: -5
> at java.lang.String.substring(String.java:1967)
> at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:297)
> at org.jboss.forge.roaster.model.util.Types.validateNameWithGenerics(Types.java:311)
> at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:301)}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (ROASTER-85) StringIndexOutOfBoundsException when handling nested typed parameters
by Anonymous (JIRA)
[ https://issues.jboss.org/browse/ROASTER-85?page=com.atlassian.jira.plugin... ]
Issue was automatically transitioned when Stephan Windmüller created pull request #45 in GitHub
-----------------------------------------------------------------------------------------------
Status: Pull Request Sent (was: Open)
> StringIndexOutOfBoundsException when handling nested typed parameters
> ---------------------------------------------------------------------
>
> Key: ROASTER-85
> URL: https://issues.jboss.org/browse/ROASTER-85
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.17.1.Final
> Reporter: Stephan Windmüller
>
> When parsing a Type object with nested types, like {{Map<String,Map<java.lang.String,Map<java.lang.String,java.lang.String>>}}, a StringIndexOutOfBoundsException is thrown:
> {{java.lang.StringIndexOutOfBoundsException: String index out of range: -5
> at java.lang.String.substring(String.java:1967)
> at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:297)
> at org.jboss.forge.roaster.model.util.Types.validateNameWithGenerics(Types.java:311)
> at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:301)}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (ROASTER-85) StringIndexOutOfBoundsException when handling nested typed parameters
by Stephan Windmüller (JIRA)
Stephan Windmüller created ROASTER-85:
-----------------------------------------
Summary: StringIndexOutOfBoundsException when handling nested typed parameters
Key: ROASTER-85
URL: https://issues.jboss.org/browse/ROASTER-85
Project: Roaster
Issue Type: Bug
Components: API
Affects Versions: 2.17.1.Final
Reporter: Stephan Windmüller
When parsing a Type object with nested types, like {{Map<String,Map<java.lang.String,Map<java.lang.String,java.lang.String>>}}, a StringIndexOutOfBoundsException is thrown:
{{java.lang.StringIndexOutOfBoundsException: String index out of range: -5
at java.lang.String.substring(String.java:1967)
at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:297)
at org.jboss.forge.roaster.model.util.Types.validateNameWithGenerics(Types.java:311)
at org.jboss.forge.roaster.model.util.Types.isGeneric(Types.java:301)}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (FORGE-2531) Using mixed versions of slf4j causes SLF4J to print to console a WARN about this
by Claus Ibsen (JIRA)
Claus Ibsen created FORGE-2531:
----------------------------------
Summary: Using mixed versions of slf4j causes SLF4J to print to console a WARN about this
Key: FORGE-2531
URL: https://issues.jboss.org/browse/FORGE-2531
Project: Forge
Issue Type: Bug
Affects Versions: 2.20.1.Final
Reporter: Claus Ibsen
Priority: Minor
You can reproduce by installing the fabric8 devops addon
{code}
addon-install --coordinate io.fabric8.forge:devops,2.2.63
***SUCCESS*** Addon io.fabric8.forge:devops,2.2.63 was installed successfully.
[forge-distribution-2.20.1.Final]$ deSLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/forge-distribution-2.20.1.Final/addons/org-jboss-forge-addon-maven-2-20-1-Final/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/forge-distribution-2.20.1.Final/addons/org-jboss-forge-addon-database-tools-2-20-1-Final/slf4j-jdk14-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
{code}
And then wait some seconds then you see all the slf4j logging. As you can see those 2 addons from forge itself are using mixed slf4j versions.
1.7.5 and 1.5.8
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (FORGE-2530) IndexOutOfBoundsException in IDEA when running custom command
by Claus Ibsen (JIRA)
Claus Ibsen created FORGE-2530:
----------------------------------
Summary: IndexOutOfBoundsException in IDEA when running custom command
Key: FORGE-2530
URL: https://issues.jboss.org/browse/FORGE-2530
Project: Forge
Issue Type: Bug
Components: UI - IntelliJ IDEA
Affects Versions: 3.0.0.Alpha1
Environment: IDEA 15 with latest forge plugin update installed
Reporter: Claus Ibsen
I run the Camel forge addon, where we have a multi step wizard.
And when I click next I can get this exception from within forge itself.
{code}
Index: 2, Size: 2
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.getCurrentEntry(WizardCommandControllerImpl.java:491)
at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.getCurrentController(WizardCommandControllerImpl.java:502)
at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.getMetadata(WizardCommandControllerImpl.java:262)
at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.getMetadata(NoUIWizardControllerDecorator.java:207)
at sun.reflect.GeneratedMethodAccessor1712.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:123)
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)
at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:96)
at org.jboss.forge.addon.ui.controller.CommandController_$$_javassist_95731ae3-f50e-4add-917c-6a0b2360542a.getMetadata(CommandController_$$_javassist_95731ae3-f50e-4add-917c-6a0b2360542a.java)
at org.jboss.forge.plugin.idea.ui.wizard.ForgeWizardStep.getExplanation(ForgeWizardStep.java:144)
at com.intellij.ui.wizard.WizardDialog.c(WizardDialog.java:172)
at com.intellij.ui.wizard.WizardDialog.onStepChanged(WizardDialog.java:224)
at com.intellij.ui.wizard.WizardModel.a(WizardModel.java:93)
at com.intellij.ui.wizard.WizardModel.next(WizardModel.java:76)
at com.intellij.ui.wizard.WizardAction$Next.actionPerformed(WizardAction.java:46)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6543)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6308)
at java.awt.Container.processEvent(Container.java:2235)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2293)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4897)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4461)
at java.awt.Container.dispatchEventImpl(Container.java:2279)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:724)
at java.awt.EventQueue$4.run(EventQueue.java:722)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:721)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:861)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:380)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1637)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1586)
at org.jboss.forge.plugin.idea.ui.CommandListPopupBuilder.openWizard(CommandListPopupBuilder.java:224)
at org.jboss.forge.plugin.idea.ui.CommandListPopupBuilder.access$300(CommandListPopupBuilder.java:54)
at org.jboss.forge.plugin.idea.ui.CommandListPopupBuilder$3.run(CommandListPopupBuilder.java:173)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:861)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:380)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
{code}
Maybe that part of the code can be enhanced to detect that out of bounds and report a better exception or maybe its some bug in forge itself.
To reproduce I can setup a Camel github project. And then you would need to install the camel addon, and run a camel-add-endpoint command and select the file component, and then enter a directory, and then click the next button to get this exception.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-2529) Creating commands with multi steps is a pain with repeated calls
by Claus Ibsen (JIRA)
Claus Ibsen created FORGE-2529:
----------------------------------
Summary: Creating commands with multi steps is a pain with repeated calls
Key: FORGE-2529
URL: https://issues.jboss.org/browse/FORGE-2529
Project: Forge
Issue Type: Enhancement
Affects Versions: 2.20.1.Final
Reporter: Claus Ibsen
I think you guys are aware of the surprise you have as a forge addon developer that you get repeated calls for next() / execute() / initializeUI() that you do not expected, and can't seem to grasp the order they are called.
And here I am speaking when a command implements UIWizard.
If something goes wrong you can end up with a stacktrace and exception message that does not give you much clue how to fix.
{code}
16:33:22,214 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter] (AeshProcess: 3) Controller cannot be executed: java.lang.IllegalArgumentException: Controller cannot be executed
at org.jboss.forge.furnace.util.Assert.isTrue(Assert.java:36) [furnace-api-2.22.7.Final.jar:2.22.7.Final]
at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.execute(WizardCommandControllerImpl.java:129) [ui-impl-2.20.1.Final.jar:2.20.1.Final]
at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.execute(NoUIWizardControllerDecorator.java:152) [ui-impl-2.20.1.Final.jar:2.20.1.Final]
at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:98) [shell-impl-2.20.1.Final.jar:2.20.1.Final]
at org.jboss.forge.addon.shell.aesh.ForgeCommandContainer.executeCommand(ForgeCommandContainer.java:90) [shell-impl-2.20.1.Final.jar:2.20.1.Final]
at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:311) [aesh-0.65.1.jar:0.65.1]
at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53) [aesh-0.65.1.jar:0.65.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
{code}
In past experience I have seen this kind of exception if an exception was thrown in the initializeUI method that sometimes neither is logged in the forge log. So it can take some trail and error to fix.
Anyway just wanted to share that if there is something that can enhance that exception above to give the addon developer a chance to know what was wrong and what he/she can do to fix it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-2528) Arquillian Forge Addon generate incorrect code
by Tony Diep (JIRA)
Tony Diep created FORGE-2528:
--------------------------------
Summary: Arquillian Forge Addon generate incorrect code
Key: FORGE-2528
URL: https://issues.jboss.org/browse/FORGE-2528
Project: Forge
Issue Type: Bug
Reporter: Tony Diep
Priority: Minor
Arquillian Forge Addon generates
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap
.create(WebArchive.class)
.addClass(MyClass.class)
.addAsManifestResource("META-INF/persistence.xml",
"persistence.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
It should read
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "test.war").addClasses(MyClass.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "META-INF/beans.xml")
.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml");
}
Note the XML files have to be in "META-INF" folder
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-2527) Wizard step - Allow to finish in the CLI instead of having to walk through all UIInput
by Claus Ibsen (JIRA)
Claus Ibsen created FORGE-2527:
----------------------------------
Summary: Wizard step - Allow to finish in the CLI instead of having to walk through all UIInput
Key: FORGE-2527
URL: https://issues.jboss.org/browse/FORGE-2527
Project: Forge
Issue Type: Feature Request
Components: UI - Shell
Affects Versions: 2.20.1.Final
Reporter: Claus Ibsen
Priority: Minor
When using the CLI and you have a forge addon with a wizard. And in the wizard you have N number of UIInput.
Now suppose the first 2 options is mandatory and the CLI marks those with * to indicate reguired and you enter some values.
But then there is 18 optional options still to go. In the IDEA / Eclipse graphical wizards the wizard allows you to press "finish" button.
But in the CLI all those 18 options is listed one by one, and you have to press ENTER.
I wonder if for example a CTRL + ENTER or some other combination can make it like a "finish" button click.
Now the trick is that to show those 18 optional options in the CLI I had to mark them specially as hint enabled with this code
https://github.com/davsclaus/fuse/blob/master/forge/addons/utils/src/main...
But I would like to be able to press CTRL + ENTER as a "finish".
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-552) Escaping of selected characters doesn't work
by Claus Ibsen (JIRA)
[ https://issues.jboss.org/browse/FORGE-552?page=com.atlassian.jira.plugin.... ]
Claus Ibsen commented on FORGE-552:
-----------------------------------
Thanks
In the mean time we have made some progress on our end. So at first glance it seems working now, but we need to take a deeper look if the issue is still there, maybe for some less used camel endpoint combinations.
> Escaping of selected characters doesn't work
> --------------------------------------------
>
> Key: FORGE-552
> URL: https://issues.jboss.org/browse/FORGE-552
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 1.0.2.Final, 2.19.2.Final
> Environment: Ubuntu 10.04 i686
> Reporter: Jevgeni Zelenkov
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.0.0.Alpha14, 2.x Future, 3.x Future
>
>
> This is related to the FORGE-43 issue.
> The following characters in file names should be escaped by the forge completion:
> \* ? = ' " { } \ $ ! & ; ( ) < > |
> also: TAB-char (yes, I know it is stupid, but possible)
> First two (*, ?) are used internally as wildcard chars, so should be allowed to be used escaped as well as unescaped.
> = char doesn't need to be escaped neither on linux nor on windows but somehow forge fails to work with files containing = (at least on my ubuntu).
> Windows has a slightly different set of chars to be escaped (from wikipedia, not actually tested):
> ' " = & | ( ) < > ^
> This issue is added for completeness.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-552) Escaping of selected characters doesn't work
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-552?page=com.atlassian.jira.plugin.... ]
George Gastaldi commented on FORGE-552:
---------------------------------------
Hi Claus, could you ping [~stalep] on this? I created AESH-333 and raised it to Blocker.
> Escaping of selected characters doesn't work
> --------------------------------------------
>
> Key: FORGE-552
> URL: https://issues.jboss.org/browse/FORGE-552
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 1.0.2.Final, 2.19.2.Final
> Environment: Ubuntu 10.04 i686
> Reporter: Jevgeni Zelenkov
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.0.0.Alpha14, 2.x Future, 3.x Future
>
>
> This is related to the FORGE-43 issue.
> The following characters in file names should be escaped by the forge completion:
> \* ? = ' " { } \ $ ! & ; ( ) < > |
> also: TAB-char (yes, I know it is stupid, but possible)
> First two (*, ?) are used internally as wildcard chars, so should be allowed to be used escaped as well as unescaped.
> = char doesn't need to be escaped neither on linux nor on windows but somehow forge fails to work with files containing = (at least on my ubuntu).
> Windows has a slightly different set of chars to be escaped (from wikipedia, not actually tested):
> ' " = & | ( ) < > ^
> This issue is added for completeness.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months