Browse Source

verify Fixed tapestry's db test

Mike Smith 11 years ago
parent
commit
b650355e53
1 changed files with 8 additions and 1 deletions
  1. 8 1
      tapestry/hello/src/main/java/hello/pages/HelloDB.java

+ 8 - 1
tapestry/hello/src/main/java/hello/pages/HelloDB.java

@@ -55,7 +55,14 @@ public class HelloDB
     String response = "";
     String response = "";
     try
     try
     {
     {
-      response = HelloDB.mapper.writeValueAsString(worlds);
+      if (queries == 1)
+      {
+        response = HelloDB.mapper.writeValueAsString(worlds[0]); 
+      }
+      else
+      {
+        response = HelloDB.mapper.writeValueAsString(worlds);
+      }
     }
     }
     catch (IOException ex)
     catch (IOException ex)
     {
     {