geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r744143 - /geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
Date Fri, 13 Feb 2009 15:21:59 GMT
Author: gnodet
Date: Fri Feb 13 15:21:56 2009
New Revision: 744143

URL: http://svn.apache.org/viewvc?rev=744143&view=rev
Log:
GSHELL-159: NegativeArraySizeException is thrown when using just the Shell Impementation when
running tests.

Modified:
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java?rev=744143&r1=744142&r2=744143&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
Fri Feb 13 15:21:56 2009
@@ -238,7 +238,11 @@
             String message = application.getModel().getBranding().getWelcomeMessage();
             if (message != null) {
                 io.out.print(message);
-                io.out.println(repeat("-", io.getTerminal().getTerminalWidth() - 1));
+                int width = io.getTerminal().getTerminalWidth() - 1;
+                if (width <= 0) {
+                    width = 80;
+                }
+                io.out.println(repeat("-", width));
                 io.out.flush();
             }
         }



Mime
View raw message