You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by et...@apache.org on 2008/02/11 23:21:22 UTC

svn commit: r620646 - /incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/MessageBundleSubstituter.java

Author: etnu
Date: Mon Feb 11 14:21:21 2008
New Revision: 620646

URL: http://svn.apache.org/viewvc?rev=620646&view=rev
Log:
Fixed broken previous commit due to using the wrong svn revision.


Modified:
    incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/MessageBundleSubstituter.java

Modified: incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/MessageBundleSubstituter.java
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/MessageBundleSubstituter.java?rev=620646&r1=620645&r2=620646&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/MessageBundleSubstituter.java (original)
+++ incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/MessageBundleSubstituter.java Mon Feb 11 14:21:21 2008
@@ -20,6 +20,7 @@
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.util.List;
 import java.util.Locale;
@@ -86,9 +87,10 @@
         bundle = context.getMessageBundleCache().get(uri.toString());
         if (bundle == null) {
           RemoteContent data = null;
-          data = context.getHttpFetcher().fetch(new RemoteContentRequest(uri),
-                                                context.getOptions());
-          if (data.getHttpStatusCode() != RemoteContent.SC_OK) {
+          try {
+            data = context.getHttpFetcher().fetch(uri.toURL(),
+                                                  context.getOptions());
+          } catch (MalformedURLException e) {
             throw new GadgetException(
                 GadgetException.Code.FAILED_TO_RETRIEVE_CONTENT,
                 String.format("Malformed message bundle URL: %s",