Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 84579 invoked from network); 1 Jul 2003 09:32:15 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 1 Jul 2003 09:32:15 -0000 Received: (qmail 1428 invoked by uid 97); 1 Jul 2003 09:34:51 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 1420 invoked from network); 1 Jul 2003 09:34:51 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 1 Jul 2003 09:34:51 -0000 Received: (qmail 84364 invoked by uid 500); 1 Jul 2003 09:32:13 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 84350 invoked from network); 1 Jul 2003 09:32:12 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 1 Jul 2003 09:32:12 -0000 Received: (qmail 1414 invoked by uid 50); 1 Jul 2003 09:34:49 -0000 Date: 1 Jul 2003 09:34:49 -0000 Message-ID: <20030701093449.1413.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 21215] New: - Line separator as first char for helpformatter (footer) throws exception X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21215 Line separator as first char for helpformatter (footer) throws exception Summary: Line separator as first char for helpformatter (footer) throws exception Product: Commons Version: 1.0 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: CLI AssignedTo: commons-dev@jakarta.apache.org ReportedBy: kibaltsis@hotmail.com This might apply for more than just the footer. I only tested footer so don't know. compile and run this example and you will get an exception public class CliError { public static void main(String[] args) { Options options = new Options(); HelpFormatter formatter = new HelpFormatter(); String footer = System.getProperty("line.separator")+"Hello world."; formatter.printHelp(80, "foobar", "", options, footer, true); } } result is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.charAt(String.java:582) at org.apache.commons.cli.HelpFormatter.rtrim(HelpFormatter.java:505) at org.apache.commons.cli.HelpFormatter.renderWrappedText (HelpFormatter.java:416) at org.apache.commons.cli.HelpFormatter.printWrapped (HelpFormatter.java:324) at org.apache.commons.cli.HelpFormatter.printWrapped (HelpFormatter.java:318) at org.apache.commons.cli.HelpFormatter.printHelp (HelpFormatter.java:212) at org.apache.commons.cli.HelpFormatter.printHelp (HelpFormatter.java:165) at com.nokia.em.bts.swupdateautomate.test.CliError.main (CliError.java:21) Exception in thread "main" Process terminated with exit code 1 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org