From 0f9d4ea197de92940f2b2f5304a3b95128c37636 Mon Sep 17 00:00:00 2001
From: Jacob Wu <jwu@digitalmeasures.com>
Date: Thu, 9 Feb 2012 15:20:47 -0600
Subject: [PATCH 1/5] Ignoring IDEA project files and test output artifacts
 for versioning

---
 .gitignore                 |    4 +++-
 logback-classic/.gitignore |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7e52e85..c5f7037 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,6 @@ target
 .project
 .idea
 *~
-*.iml
\ No newline at end of file
+*.iml
+*.ipr
+*.iws
diff --git a/logback-classic/.gitignore b/logback-classic/.gitignore
index 00cf4f4..48d665c 100644
--- a/logback-classic/.gitignore
+++ b/logback-classic/.gitignore
@@ -1,3 +1,4 @@
 bundle/
 lib/
-felix-cache/
\ No newline at end of file
+felix-cache/
+jdbc:*test.*
-- 
1.7.5.4


From 53a2a3045a98fb376fe4998cb608aea5c131592e Mon Sep 17 00:00:00 2001
From: Jacob Wu <jwu@digitalmeasures.com>
Date: Thu, 9 Feb 2012 15:22:13 -0600
Subject: [PATCH 2/5] Back-porting a fix for a test that should only be run on
 Windows platforms

---
 .../core/rolling/TimeBasedRolling_STest.scala      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/logback-core/src/test/scala/ch/qos/logback/core/rolling/TimeBasedRolling_STest.scala b/logback-core/src/test/scala/ch/qos/logback/core/rolling/TimeBasedRolling_STest.scala
index 78a75c7..cef4a87 100644
--- a/logback-core/src/test/scala/ch/qos/logback/core/rolling/TimeBasedRolling_STest.scala
+++ b/logback-core/src/test/scala/ch/qos/logback/core/rolling/TimeBasedRolling_STest.scala
@@ -180,7 +180,7 @@ class TimeBasedRolling_STest extends RollingScaffolding {
   @Test
   def failed_rename: Unit = {
 
-    if(!Env.isWindows) null
+    if(!Env.isWindows) return
 
     var fos: FileOutputStream = null
     try {
-- 
1.7.5.4


From 6bd107d656d2c19ae73e6a3d983a353f7d53772a Mon Sep 17 00:00:00 2001
From: Jacob Wu <jwu@digitalmeasures.com>
Date: Thu, 9 Feb 2012 15:51:51 -0600
Subject: [PATCH 3/5] added "removeBufferOnTrigger" option.  Removes the
 buffer when an event triggers a SMTP message

---
 .../ch/qos/logback/core/net/SMTPAppenderBase.java  |   33 ++++-
 .../net/SMTPAppenderBase_RemoveBufferTest.java     |  165 ++++++++++++++++++++
 .../ch/qos/logback/core/net/TestSMTPAppender.java  |   61 +++++++
 3 files changed, 254 insertions(+), 5 deletions(-)
 create mode 100644 logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java
 create mode 100644 logback-core/src/test/java/ch/qos/logback/core/net/TestSMTPAppender.java

diff --git a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
index 494afdb..c8b2f8f 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
@@ -77,6 +77,7 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
   private int smtpPort = 25;
   private boolean starttls = false;
   private boolean ssl = false;
+	private boolean removeBufferOnTrigger = false;
 
   String username;
   String password;
@@ -182,8 +183,10 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
 
     cb.asList();
 
+		boolean messageTriggered = false;
     try {
-      if (eventEvaluator.evaluate(eventObject)) {
+			messageTriggered = eventEvaluator.evaluate(eventObject);
+      if (messageTriggered) {
         // perform actual sending asynchronously
         SenderRunnable senderRunnable = new SenderRunnable(new CyclicBuffer<E>(cb), eventObject);
         context.getExecutorService().execute(senderRunnable);
@@ -195,10 +198,15 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
       }
     }
 
-    // immediately remove the buffer if asked by the user
-    if (isEventMarkedForBufferRemoval(eventObject)) {
-      cbTracker.removeBuffer(key);
-    }
+		if (
+			// immediately remove the buffer if the appender is configured
+			// to clear on a triggered event
+			(messageTriggered && removeBufferOnTrigger)
+				// -- OR --
+				// immediately remove the buffer if asked by the user
+				|| isEventMarkedForBufferRemoval(eventObject)) {
+			cbTracker.removeBuffer(key);
+		}
 
     cbTracker.clearStaleBuffers(now);
 
@@ -357,6 +365,21 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
 
   abstract protected void fillBuffer(CyclicBuffer<E> cb, StringBuffer sbuf);
 
+	/**
+	 * Returns value of the <b>RemoveBufferOnTrigger</b> option.
+	 */
+	public boolean getRemoveBufferOnTrigger() {
+		return removeBufferOnTrigger;
+	}
+
+	/**
+	 * The <b>RemoveBufferOnTrigger</b> option takes a boolean and if set
+	 * to true will remove the buffer when a triggering event occurs.
+	 */
+	public void setRemoveBufferOnTrigger(boolean removeBufferOnTrigger) {
+		this.removeBufferOnTrigger = removeBufferOnTrigger;
+	}
+
   /**
    * Returns value of the <b>From</b> option.
    */
diff --git a/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java b/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java
new file mode 100644
index 0000000..27643fd
--- /dev/null
+++ b/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java
@@ -0,0 +1,165 @@
+package ch.qos.logback.core.net;
+
+import java.util.concurrent.ExecutorService;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import ch.qos.logback.core.Context;
+import ch.qos.logback.core.Layout;
+import ch.qos.logback.core.boolex.EventEvaluator;
+import ch.qos.logback.core.helpers.CyclicBuffer;
+import ch.qos.logback.core.sift.Discriminator;
+import ch.qos.logback.core.spi.CyclicBufferTracker;
+import ch.qos.logback.core.status.StatusManager;
+
+import static org.easymock.EasyMock.*;
+
+public final class SMTPAppenderBase_RemoveBufferTest {
+
+	@Test
+	public void testBufferNotRemovedIfEventTriggersAndUsingDefaultConfiguration() throws Exception {
+		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+
+		testSMTPAppender.setMarkedForRemoval(false);
+
+		Object testEvent = new Object();
+
+		expect(eventDiscriminator.getDiscriminatingValue(testEvent)).andReturn("testEventKey");
+		expect(cbTracker.getOrCreate(eq("testEventKey"), anyLong())).andReturn(buffer);
+		expect(eventEvaluator.evaluate(testEvent)).andReturn(true); //Triggers Event
+		expect(context.getExecutorService()).andReturn(createNiceMock(ExecutorService.class));
+		cbTracker.clearStaleBuffers(anyLong());
+		expectLastCall();
+		expect(cbTracker.size()).andReturn(0);
+		expect(context.getStatusManager()).andReturn(createNiceMock(StatusManager.class));
+
+		replayMocks();
+
+		testSMTPAppender.append(testEvent);
+
+		verifyMocks();
+	}
+
+	@Test
+	public void testBufferRemovedIfEventTriggersAndConfiguredToClear() throws Exception {
+		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+
+		testSMTPAppender.setMarkedForRemoval(false);
+		testSMTPAppender.setRemoveBufferOnTrigger(true);
+
+		Object testEvent = new Object();
+
+		expect(eventDiscriminator.getDiscriminatingValue(testEvent)).andReturn("testEventKey");
+		expect(cbTracker.getOrCreate(eq("testEventKey"), anyLong())).andReturn(buffer);
+		expect(eventEvaluator.evaluate(testEvent)).andReturn(true); //Triggers Event
+		expect(context.getExecutorService()).andReturn(createNiceMock(ExecutorService.class));
+		cbTracker.removeBuffer("testEventKey");
+		expectLastCall();
+		cbTracker.clearStaleBuffers(anyLong());
+		expectLastCall();
+		expect(cbTracker.size()).andReturn(0);
+		expect(context.getStatusManager()).andReturn(createNiceMock(StatusManager.class));
+
+		replayMocks();
+
+		testSMTPAppender.append(testEvent);
+
+		verifyMocks();
+	}
+
+	@Test
+	public void testBufferNotRemovedIfEventTriggersAndNotConfiguredToClear() throws Exception {
+		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+
+		testSMTPAppender.setMarkedForRemoval(false);
+		testSMTPAppender.setRemoveBufferOnTrigger(false);
+
+		Object testEvent = new Object();
+
+		expect(eventDiscriminator.getDiscriminatingValue(testEvent)).andReturn("testEventKey");
+		expect(cbTracker.getOrCreate(eq("testEventKey"), anyLong())).andReturn(buffer);
+		expect(eventEvaluator.evaluate(testEvent)).andReturn(true); //Triggers Event
+		expect(context.getExecutorService()).andReturn(createNiceMock(ExecutorService.class));
+		cbTracker.clearStaleBuffers(anyLong());
+		expectLastCall();
+		expect(cbTracker.size()).andReturn(0);
+		expect(context.getStatusManager()).andReturn(createNiceMock(StatusManager.class));
+
+		replayMocks();
+
+		testSMTPAppender.append(testEvent);
+
+		verifyMocks();
+	}
+
+	@Test
+	public void testBufferRemovedIfEventIsMarkedForRemovalRegardlessOfConfigurationOrTriggering() throws Exception {
+		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+
+		testSMTPAppender.setMarkedForRemoval(true);
+		testSMTPAppender.setRemoveBufferOnTrigger(false);
+
+		Object testEvent = new Object();
+
+		expect(eventDiscriminator.getDiscriminatingValue(testEvent)).andReturn("testEventKey");
+		expect(cbTracker.getOrCreate(eq("testEventKey"), anyLong())).andReturn(buffer);
+		expect(eventEvaluator.evaluate(testEvent)).andReturn(false); // Doesn't trigger
+		cbTracker.removeBuffer("testEventKey");
+		expectLastCall();
+		cbTracker.clearStaleBuffers(anyLong());
+		expectLastCall();
+		expect(cbTracker.size()).andReturn(0);
+		expect(context.getStatusManager()).andReturn(createNiceMock(StatusManager.class));
+
+		replayMocks();
+
+		testSMTPAppender.append(testEvent);
+
+		verifyMocks();
+	}
+
+	private TestSMTPAppender<Object> testSMTPAppender;
+	private EventEvaluator<Object> eventEvaluator;
+	private CyclicBufferTracker<Object> cbTracker;
+	private Discriminator<Object> eventDiscriminator;
+	private Context context;
+
+	private Object[] fixedMocks;
+
+	@Before
+	@SuppressWarnings("unchecked")
+	public void setUp() throws Exception {
+		eventDiscriminator = createMock("eventDiscriminator", Discriminator.class);
+		eventEvaluator = createMock("eventEvaluator", EventEvaluator.class);
+		cbTracker = createMock("cbTracker", CyclicBufferTracker.class);
+		context = createMock("context", Context.class);
+
+		Layout layout = createNiceMock("layout", Layout.class);
+
+		fixedMocks = new Object[]{eventEvaluator, cbTracker, context, layout, eventDiscriminator};
+
+		testSMTPAppender = new TestSMTPAppender();
+		testSMTPAppender.setEvaluator(eventEvaluator);
+		testSMTPAppender.setCyclicBufferTracker(cbTracker);
+		testSMTPAppender.setContext(context);
+		testSMTPAppender.setDiscriminator(eventDiscriminator);
+		testSMTPAppender.setLayout(layout);
+
+		testSMTPAppender.start();
+	}
+
+	private void replayMocks(Object... additionalMocks) {
+		replay(fixedMocks);
+		if (null != additionalMocks && additionalMocks.length > 0) {
+			replay(additionalMocks);
+		}
+	}
+
+	private void verifyMocks(Object... additionalMocks) {
+		verify(fixedMocks);
+		if (null != additionalMocks && additionalMocks.length > 0) {
+			verify(additionalMocks);
+		}
+	}
+}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/net/TestSMTPAppender.java b/logback-core/src/test/java/ch/qos/logback/core/net/TestSMTPAppender.java
new file mode 100644
index 0000000..75a2008
--- /dev/null
+++ b/logback-core/src/test/java/ch/qos/logback/core/net/TestSMTPAppender.java
@@ -0,0 +1,61 @@
+package ch.qos.logback.core.net;
+
+import java.util.Collections;
+import java.util.Map;
+
+import ch.qos.logback.core.Layout;
+import ch.qos.logback.core.helpers.CyclicBuffer;
+import ch.qos.logback.core.pattern.PatternLayoutBase;
+
+final class TestSMTPAppender<T> extends SMTPAppenderBase<T> {
+	private boolean markedForRemoval;
+	private PatternLayoutBase<T> patternLayoutBase = new PatternLayoutBase<T>() {
+		@Override
+		public Map<String, String> getDefaultConverterMap() {
+			return Collections.emptyMap();
+		}
+
+		public String doLayout(T event) {
+			return "mock-layout";
+		}
+	};
+
+	public boolean isMarkedForRemoval() {
+		return markedForRemoval;
+	}
+
+	public void setMarkedForRemoval(boolean markedForRemoval) {
+		this.markedForRemoval = markedForRemoval;
+	}
+
+	public PatternLayoutBase<T> getPatternLayoutBase() {
+		return patternLayoutBase;
+	}
+
+	public void setPatternLayoutBase(PatternLayoutBase<T> patternLayoutBase) {
+		this.patternLayoutBase = patternLayoutBase;
+	}
+
+	@Override
+	protected Layout<T> makeSubjectLayout(String subjectStr) {
+		return layout;
+	}
+
+	@Override
+	protected boolean isEventMarkedForBufferRemoval(T eventObject) {
+		return markedForRemoval;
+	}
+
+	@Override
+	protected void subAppend(CyclicBuffer<T> cb, T eventObject) {
+	}
+
+	@Override
+	protected void fillBuffer(CyclicBuffer<T> cb, StringBuffer sbuf) {
+	}
+
+	@Override
+	protected PatternLayoutBase<T> makeNewToPatternLayout(String toPattern) {
+		return patternLayoutBase;
+	}
+}
-- 
1.7.5.4


From d13bd57efab99a466cfcc5d63b3081c2679ee5d3 Mon Sep 17 00:00:00 2001
From: Jacob Wu <jwu@digitalmeasures.com>
Date: Fri, 10 Feb 2012 14:42:04 -0600
Subject: [PATCH 4/5] Updated removal of buffer to just clearing it when a
 logging event triggers an SMTP message to be sent.

---
 .../ch/qos/logback/core/net/SMTPAppenderBase.java  |   22 +++++++---------
 .../net/SMTPAppenderBase_RemoveBufferTest.java     |   27 ++++++++++++++------
 2 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
index c8b2f8f..211ee6b 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
@@ -77,7 +77,7 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
   private int smtpPort = 25;
   private boolean starttls = false;
   private boolean ssl = false;
-	private boolean removeBufferOnTrigger = false;
+	private boolean clearBufferOnTrigger = false;
 
   String username;
   String password;
@@ -190,6 +190,9 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
         // perform actual sending asynchronously
         SenderRunnable senderRunnable = new SenderRunnable(new CyclicBuffer<E>(cb), eventObject);
         context.getExecutorService().execute(senderRunnable);
+				if(clearBufferOnTrigger) {
+					cb.clear();
+				}
       }
     } catch (EvaluationException ex) {
       errorCount++;
@@ -198,13 +201,8 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
       }
     }
 
-		if (
-			// immediately remove the buffer if the appender is configured
-			// to clear on a triggered event
-			(messageTriggered && removeBufferOnTrigger)
-				// -- OR --
-				// immediately remove the buffer if asked by the user
-				|| isEventMarkedForBufferRemoval(eventObject)) {
+		// immediately remove the buffer if asked by the user
+		if (isEventMarkedForBufferRemoval(eventObject)) {
 			cbTracker.removeBuffer(key);
 		}
 
@@ -368,16 +366,16 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
 	/**
 	 * Returns value of the <b>RemoveBufferOnTrigger</b> option.
 	 */
-	public boolean getRemoveBufferOnTrigger() {
-		return removeBufferOnTrigger;
+	public boolean getClearBufferOnTrigger() {
+		return clearBufferOnTrigger;
 	}
 
 	/**
 	 * The <b>RemoveBufferOnTrigger</b> option takes a boolean and if set
 	 * to true will remove the buffer when a triggering event occurs.
 	 */
-	public void setRemoveBufferOnTrigger(boolean removeBufferOnTrigger) {
-		this.removeBufferOnTrigger = removeBufferOnTrigger;
+	public void setClearBufferOnTrigger(boolean clearBufferOnTrigger) {
+		this.clearBufferOnTrigger = clearBufferOnTrigger;
 	}
 
   /**
diff --git a/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java b/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java
index 27643fd..7a2e528 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/net/SMTPAppenderBase_RemoveBufferTest.java
@@ -13,13 +13,15 @@ import ch.qos.logback.core.sift.Discriminator;
 import ch.qos.logback.core.spi.CyclicBufferTracker;
 import ch.qos.logback.core.status.StatusManager;
 
+import static groovy.util.GroovyTestCase.assertEquals;
 import static org.easymock.EasyMock.*;
 
 public final class SMTPAppenderBase_RemoveBufferTest {
 
 	@Test
-	public void testBufferNotRemovedIfEventTriggersAndUsingDefaultConfiguration() throws Exception {
+	public void testBufferNotClearedIfEventTriggersAndUsingDefaultConfiguration() throws Exception {
 		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+		buffer.add(new Object());
 
 		testSMTPAppender.setMarkedForRemoval(false);
 
@@ -39,14 +41,17 @@ public final class SMTPAppenderBase_RemoveBufferTest {
 		testSMTPAppender.append(testEvent);
 
 		verifyMocks();
+
+		assertEquals("Expected that the object would still be in the buffer", 1, buffer.length());
 	}
 
 	@Test
-	public void testBufferRemovedIfEventTriggersAndConfiguredToClear() throws Exception {
+	public void testBufferClearedIfEventTriggersAndConfiguredToClear() throws Exception {
 		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+		buffer.add(new Object());
 
 		testSMTPAppender.setMarkedForRemoval(false);
-		testSMTPAppender.setRemoveBufferOnTrigger(true);
+		testSMTPAppender.setClearBufferOnTrigger(true);
 
 		Object testEvent = new Object();
 
@@ -54,8 +59,6 @@ public final class SMTPAppenderBase_RemoveBufferTest {
 		expect(cbTracker.getOrCreate(eq("testEventKey"), anyLong())).andReturn(buffer);
 		expect(eventEvaluator.evaluate(testEvent)).andReturn(true); //Triggers Event
 		expect(context.getExecutorService()).andReturn(createNiceMock(ExecutorService.class));
-		cbTracker.removeBuffer("testEventKey");
-		expectLastCall();
 		cbTracker.clearStaleBuffers(anyLong());
 		expectLastCall();
 		expect(cbTracker.size()).andReturn(0);
@@ -66,14 +69,17 @@ public final class SMTPAppenderBase_RemoveBufferTest {
 		testSMTPAppender.append(testEvent);
 
 		verifyMocks();
+
+		assertEquals("Did not expect the object to still be in the buffer", 0, buffer.length());
 	}
 
 	@Test
-	public void testBufferNotRemovedIfEventTriggersAndNotConfiguredToClear() throws Exception {
+	public void testBufferNotClearedfEventTriggersAndNotConfiguredToClear() throws Exception {
 		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+		buffer.add(new Object());
 
 		testSMTPAppender.setMarkedForRemoval(false);
-		testSMTPAppender.setRemoveBufferOnTrigger(false);
+		testSMTPAppender.setClearBufferOnTrigger(false);
 
 		Object testEvent = new Object();
 
@@ -91,14 +97,17 @@ public final class SMTPAppenderBase_RemoveBufferTest {
 		testSMTPAppender.append(testEvent);
 
 		verifyMocks();
+
+		assertEquals("Expected that the object would still be in the buffer", 1, buffer.length());
 	}
 
 	@Test
 	public void testBufferRemovedIfEventIsMarkedForRemovalRegardlessOfConfigurationOrTriggering() throws Exception {
 		CyclicBuffer<Object> buffer = new CyclicBuffer<Object>(1);
+		buffer.add(new Object());
 
 		testSMTPAppender.setMarkedForRemoval(true);
-		testSMTPAppender.setRemoveBufferOnTrigger(false);
+		testSMTPAppender.setClearBufferOnTrigger(false);
 
 		Object testEvent = new Object();
 
@@ -117,6 +126,8 @@ public final class SMTPAppenderBase_RemoveBufferTest {
 		testSMTPAppender.append(testEvent);
 
 		verifyMocks();
+
+		assertEquals("Expected that the object would still be in the buffer", 1, buffer.length());
 	}
 
 	private TestSMTPAppender<Object> testSMTPAppender;
-- 
1.7.5.4


From 78e026484c9a401895e5a9cfeeba6565c7623471 Mon Sep 17 00:00:00 2001
From: Jacob Wu <jwu@digitalmeasures.com>
Date: Fri, 10 Feb 2012 16:14:56 -0600
Subject: [PATCH 5/5] Fixed javadocs

---
 .../ch/qos/logback/core/net/SMTPAppenderBase.java  |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
index 211ee6b..6d2dd31 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java
@@ -364,15 +364,15 @@ public abstract class SMTPAppenderBase<E> extends AppenderBase<E> {
   abstract protected void fillBuffer(CyclicBuffer<E> cb, StringBuffer sbuf);
 
 	/**
-	 * Returns value of the <b>RemoveBufferOnTrigger</b> option.
+	 * Returns value of the <b>ClearBufferOnTrigger</b> option.
 	 */
 	public boolean getClearBufferOnTrigger() {
 		return clearBufferOnTrigger;
 	}
 
 	/**
-	 * The <b>RemoveBufferOnTrigger</b> option takes a boolean and if set
-	 * to true will remove the buffer when a triggering event occurs.
+	 * The <b>ClearBufferOnTrigger</b> option takes a boolean and if set
+	 * to true will clear the buffer when a triggering event occurs.
 	 */
 	public void setClearBufferOnTrigger(boolean clearBufferOnTrigger) {
 		this.clearBufferOnTrigger = clearBufferOnTrigger;
-- 
1.7.5.4

