Commit 91dc127f authored by Matouš Skála's avatar Matouš Skála

fix getAuditedStartDate resetting startDate to null

parent a25b3993
...@@ -168,7 +168,7 @@ public class JdbcPersistenceManager implements PersistenceManager { ...@@ -168,7 +168,7 @@ public class JdbcPersistenceManager implements PersistenceManager {
public Date getAuditedStartDate(Date startDate) { public Date getAuditedStartDate(Date startDate) {
long maxRetrievable = JiveGlobals.getIntProperty("conversation.maxRetrievable", ConversationManager.DEFAULT_MAX_RETRIEVABLE) long maxRetrievable = JiveGlobals.getIntProperty("conversation.maxRetrievable", ConversationManager.DEFAULT_MAX_RETRIEVABLE)
* JiveConstants.DAY; * JiveConstants.DAY;
Date result = null; Date result;
if (maxRetrievable > 0) { if (maxRetrievable > 0) {
Date now = new Date(); Date now = new Date();
Date maxRetrievableDate = new Date(now.getTime() - maxRetrievable); Date maxRetrievableDate = new Date(now.getTime() - maxRetrievable);
...@@ -176,6 +176,8 @@ public class JdbcPersistenceManager implements PersistenceManager { ...@@ -176,6 +176,8 @@ public class JdbcPersistenceManager implements PersistenceManager {
result = maxRetrievableDate; result = maxRetrievableDate;
} else if (startDate.before(maxRetrievableDate)) { } else if (startDate.before(maxRetrievableDate)) {
result = maxRetrievableDate; result = maxRetrievableDate;
} else {
result = startDate;
} }
}else{ }else{
result = startDate; result = startDate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment