Remove an unneeded use of the LoggingAdvisingAppendable api
The Soy rendering apis can accept an Appendable/Writer directly.
Change-Id: I106220b1f4a3c02817af4cbf0b8e59ea17cbbecb
diff --git a/java/com/google/gitiles/LogSoyData.java b/java/com/google/gitiles/LogSoyData.java
index 4292bc9..b3afa04 100644
--- a/java/com/google/gitiles/LogSoyData.java
+++ b/java/com/google/gitiles/LogSoyData.java
@@ -22,7 +22,6 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gitiles.CommitData.Field;
-import com.google.template.soy.data.LoggingAdvisingAppendable;
import com.google.template.soy.jbcsrc.api.SoySauce;
import java.io.IOException;
import java.io.Writer;
@@ -78,8 +77,7 @@
variant = firstNonNull(config.getString("logFormat", pretty, "variant"), pretty);
}
- private void renderHtml(SoySauce.Renderer renderer, LoggingAdvisingAppendable out)
- throws IOException {
+ private void renderHtml(SoySauce.Renderer renderer, Appendable out) throws IOException {
if (!renderer.renderHtml(out).result().isDone()) {
throw new IOException("failed to render HTML");
}
@@ -93,29 +91,28 @@
DateFormatter df,
FooterBehavior footerBehavior)
throws IOException {
- LoggingAdvisingAppendable out = LoggingAdvisingAppendable.delegating(writer);
renderHtml(
renderer
.newRenderer("com.google.gitiles.templates.LogDetail.logEntriesHeader")
.setData(toHeaderSoyData(paginator, revision)),
- out);
+ writer);
SoySauce.Renderer entryRenderer =
renderer.newRenderer("com.google.gitiles.templates.LogDetail.logEntryWrapper");
boolean renderedEntries = false;
for (RevCommit c : paginator) {
- renderHtml(entryRenderer.setData(toEntrySoyData(paginator, c, df)), out);
+ renderHtml(entryRenderer.setData(toEntrySoyData(paginator, c, df)), writer);
renderedEntries = true;
}
if (!renderedEntries) {
- renderHtml(renderer.newRenderer("com.google.gitiles.templates.LogDetail.emptyLog"), out);
+ renderHtml(renderer.newRenderer("com.google.gitiles.templates.LogDetail.emptyLog"), writer);
}
renderHtml(
renderer
.newRenderer("com.google.gitiles.templates.LogDetail.logEntriesFooter")
.setData(toFooterSoyData(paginator, revision, footerBehavior)),
- out);
+ writer);
}
private Map<String, Object> toHeaderSoyData(Paginator paginator, @Nullable String revision) {