From 1bd7b96ade934aa3adc48b4baf779d99777bba7c Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Tue, 8 Aug 2017 13:43:30 -0700 Subject: [PATCH] Fix a typo (#794) --- .../java/com/example/appengine/standard/GaeInfoServlet.java | 5 +++-- .../com/example/appengine/flex_compat/GaeInfoServlet.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GaeInfoServlet.java b/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GaeInfoServlet.java index be190c197c2..1cfdabe74f8 100644 --- a/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GaeInfoServlet.java +++ b/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GaeInfoServlet.java @@ -67,6 +67,7 @@ public class GaeInfoServlet extends HttpServlet { }; private final String metadata = "http://metadata.google.internal"; + private TemplateEngine templateEngine; // Use OkHttp from Square as it's quite easy to use for simple fetches. @@ -88,7 +89,7 @@ String fetchMetadata(String key) throws IOException { .addHeader("Metadata-Flavor", "Google") .get() .build(); - + Response response = ok.newCall(request).execute(); return response.body().string(); } @@ -193,7 +194,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc m = new TreeMap<>(); for (String k : metaPath) { - m.put(k, fetchMetadata(key)); + m.put(k, fetchMetadata(k)); } ctx.setVariable("Metadata", m.descendingMap()); diff --git a/flexible/gaeinfo/src/main/java/com/example/appengine/flex_compat/GaeInfoServlet.java b/flexible/gaeinfo/src/main/java/com/example/appengine/flex_compat/GaeInfoServlet.java index a0bebe998f2..46fef25d50d 100644 --- a/flexible/gaeinfo/src/main/java/com/example/appengine/flex_compat/GaeInfoServlet.java +++ b/flexible/gaeinfo/src/main/java/com/example/appengine/flex_compat/GaeInfoServlet.java @@ -193,7 +193,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc m = new TreeMap<>(); for (String k : metaPath) { - m.put(k, fetchMetadata(key)); + m.put(k, fetchMetadata(k)); } ctx.setVariable("Metadata", m.descendingMap());