()
| 201 | try { |
| 202 | return moduleIds.get(modelId, new Callable<String>() { |
| 203 | @Override |
| 204 | public String call() throws Exception { |
| 205 | HttpURLConnection connection = null; |
| 206 | BufferedReader reader = null; |
| 207 | try { |
| 208 | connection = (HttpURLConnection) new URL(BASE_URL + "models/" + PLAYER_RESOURCE_VERSION + "/" + modelId).openConnection(); |
| 209 | if (connection.getResponseCode() != 200) { |
| 210 | return null; |
| 211 | } |
| 212 | reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
| 213 | return reader.readLine(); |
| 214 | } finally { |
| 215 | IOUtils.closeQuietly(reader); |
| 216 | if (connection != null) { |
| 217 | connection.disconnect(); |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | }); |
| 222 | } catch (ExecutionException e) { |
| 223 | MinecraftFactory.getClassProxyCallback().getLogger().warn("Could not load model data with id " + modelId, e); |
nothing calls this directly
no test coverage detected