git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-32423 tidying
[jalview.git]
/
src
/
jalview
/
javascript
/
web
/
WebResource.java
diff --git
a/src/jalview/javascript/web/WebResource.java
b/src/jalview/javascript/web/WebResource.java
index
c55e9ba
..
1896b65
100644
(file)
--- a/
src/jalview/javascript/web/WebResource.java
+++ b/
src/jalview/javascript/web/WebResource.java
@@
-2,8
+2,10
@@
package jalview.javascript.web;
import jalview.util.Platform;
import jalview.util.Platform;
+import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
/*
* A JavaScript-only proxy for com.sun.jersey.api.client.WebResource
/*
* A JavaScript-only proxy for com.sun.jersey.api.client.WebResource
@@
-64,8
+66,13
@@
public class WebResource
*/
public ClientResponse get(Class<?> c)
{
*/
public ClientResponse get(Class<?> c)
{
- return new ClientResponse(Platform.getFileAsString(uri.toString()),
- encoding);
+ try
+ {
+ return new ClientResponse(new URL(uri.toString()), encoding);
+ } catch (MalformedURLException e)
+ {
+ return null;
+ }
}
}
}
}