[
https://issues.apache.org/jira/browse/GERONIMO-4533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702459#action_12702459
]
Sean McNealy commented on GERONIMO-4533:
----------------------------------------
This is still a problem in 2.1.4.
In Windows, you can run the above code without a console attached, for example
using CreateProcess from a windowed app.
The JLine code then calculates the console's width to be 1 using the following
math:
Right-most column position - Left-most column position + 1
or when there's no console:
0 - 0 + 1 = 1 (since there's no error checking in the code).
So, while println in 2.1.4 checks for endCol to be 0, it unfortunately also
gets set to 1 on Windows and we're still getting the IllegalArgumentException.
Further, a RuntimeException is really a bad thing to be throwing from a routine
that's trying to format some logging output. I understand the sanity check that
the word-wrap be done with at least 10 characters, but if that fails you could
just output the line without the nice word-wrap formatting and let the console
or user deal with it. It's not an error that should bring the entire program to
a halt.
> Fix "This is ridiculous" error messages on command execution
> ------------------------------------------------------------
>
> Key: GERONIMO-4533
> URL: https://issues.apache.org/jira/browse/GERONIMO-4533
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Affects Versions: 2.1.3, 2.2
> Reporter: Kevan Miller
> Assignee: Kevan Miller
> Fix For: 2.1.4, 2.2
>
>
> Depending on the terminal you're running from, some commands will display a
> "This is ridiculous" error message:
> bash-3.2$ ./deploy.sh undeploy com.test/testwar/1.0/war
> Using GERONIMO_HOME:
> /Users/kevan/geronimo/server/branches/2.1/target/geronimo-tomcat6-javaee5-2.1.4-SNAPSHOT
> Using GERONIMO_TMPDIR: var/temp
> Using JRE_HOME:
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
> Username: system
> system
> Password: ***
> Module com.test/testwar/1.0/war unloaded.
> Module com.test/testwar/1.0/war uninstalled.
> line= Undeployed com.test/testwar/1.0/war; indent= 4; endCol= 0
> Exception in thread "main" java.lang.IllegalArgumentException: This is
> ridiculous! line= Undeployed com.test/testwar/1.0/war; indent= 4; endCol= 0
> at
> org.apache.geronimo.deployment.cli.DeployUtils.println(DeployUtils.java:103)
> at
> org.apache.geronimo.deployment.cli.CommandStart.execute(CommandStart.java:66)
> at
> org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:164)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
> at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
> at
> org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:31)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.