From a5932f649f4eecca3efd7477878f5572cc965c0f Mon Sep 17 00:00:00 2001 From: Jarred Li Date: Sun, 15 Apr 2012 12:39:50 +0800 Subject: [PATCH] change code for hisitory size --- src/main/java/org/springframework/shell/JLineShell.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/shell/JLineShell.java b/src/main/java/org/springframework/shell/JLineShell.java index fe9c8943..0977ec1b 100644 --- a/src/main/java/org/springframework/shell/JLineShell.java +++ b/src/main/java/org/springframework/shell/JLineShell.java @@ -132,7 +132,7 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker, // reader.setDebug(new PrintWriter(new FileWriter("writer.debug", true))); openFileLogIfPossible(); - + this.reader.getHistory().setMaxSize(this.historySize); // Try to build previous command history from the project's log String[] filteredLogEntries = filterLogEntry(); for (String logEntry : filteredLogEntries) { @@ -652,7 +652,6 @@ public abstract class JLineShell extends AbstractShell implements CommandMarker, */ public void setHistorySize(int historySize) { this.historySize = historySize; - this.reader.getHistory().setMaxSize(this.historySize); } }