geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean McNealy (JIRA)" <>
Subject [jira] Commented: (GERONIMO-4533) Fix "This is ridiculous" error messages on command execution
Date Fri, 24 Apr 2009 17:29:31 GMT


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:
>             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$ ./ 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(
> 	at org.apache.geronimo.deployment.cli.CommandStart.execute(
> 	at org.apache.geronimo.deployment.cli.DeployTool.execute(
> 	at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(
> 	at org.apache.geronimo.cli.AbstractCLI.executeMain(
> 	at org.apache.geronimo.cli.deployer.DeployerCLI.main(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message