Simplified getAlertHistoryIndexNameForTime()

Original commit: elastic/x-pack-elasticsearch@08ce6daf75
This commit is contained in:
Martijn van Groningen 2014-11-26 22:38:40 +01:00
parent 4048bfe55c
commit 56a121109d

View File

@ -146,9 +146,7 @@ public class AlertActionManager extends AbstractComponent {
* Calculates the correct alert history index name for a given time using alertHistoryIndexTimeFormat
*/
public static String getAlertHistoryIndexNameForTime(DateTime time) {
StringBuffer sb = new StringBuffer(ALERT_HISTORY_INDEX_PREFIX);
alertHistoryIndexTimeFormat.printTo(sb, time);
return sb.toString();
return ALERT_HISTORY_INDEX_PREFIX + alertHistoryIndexTimeFormat.print(time);
}
private void doStart() {