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
Merge branch 'develop' into releases/Release_2_11_1_Branch
[jalview.git]
/
src
/
jalview
/
ws
/
rest
/
HttpResultSet.java
diff --git
a/src/jalview/ws/rest/HttpResultSet.java
b/src/jalview/ws/rest/HttpResultSet.java
index
8fdbcda
..
5bfe3b5
100644
(file)
--- a/
src/jalview/ws/rest/HttpResultSet.java
+++ b/
src/jalview/ws/rest/HttpResultSet.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-50,7
+50,7
@@
import org.apache.james.mime4j.parser.MimeStreamParser;
*
*/
*
*/
-public class HttpResultSet extends FileParse
+public class HttpResultSet extends FileParse implements AutoCloseable
{
private HttpRequestBase cachedRequest;
{
private HttpRequestBase cachedRequest;
@@
-89,7
+89,7
@@
public class HttpResultSet extends FileParse
*/
public List<DataProvider> createResultDataProviders()
{
*/
public List<DataProvider> createResultDataProviders()
{
- List<DataProvider> dp = new ArrayList<DataProvider>();
+ List<DataProvider> dp = new ArrayList<>();
for (JvDataType type : restJob.rsd.getResultDataTypes())
{
dp.add(new SimpleDataProvider(type, this, null));
for (JvDataType type : restJob.rsd.getResultDataTypes())
{
dp.add(new SimpleDataProvider(type, this, null));
@@
-106,14
+106,13
@@
public class HttpResultSet extends FileParse
*/
public Object[] parseResultSet() throws Exception, Error
{
*/
public Object[] parseResultSet() throws Exception, Error
{
- List<DataProvider> dp = new ArrayList<DataProvider>();
+ List<DataProvider> dp = new ArrayList<>();
Object[] results = null;
if (en == null)
{
Object[] results = null;
if (en == null)
{
- throw new Error(
- MessageManager
- .getString("error.implementation_error_need_to_have_httpresponse"));
+ throw new Error(MessageManager.getString(
+ "error.implementation_error_need_to_have_httpresponse"));
}
jalview.io.packed.JalviewDataset ds = restJob.newJalviewDataset();
// Decide how we deal with content.
}
jalview.io.packed.JalviewDataset ds = restJob.newJalviewDataset();
// Decide how we deal with content.
@@
-155,8
+154,8
@@
public class HttpResultSet extends FileParse
if (!(en instanceof MultipartEntity))
{
// assume content is simple text stream that can be read from
if (!(en instanceof MultipartEntity))
{
// assume content is simple text stream that can be read from
- String enc = (en.getContentEncoding() == null) ? null : en
- .getContentEncoding().getValue();
+ String enc = (en.getContentEncoding() == null) ? null
+ : en.getContentEncoding().getValue();
if (en.getContentType() != null)
{
Cache.log.debug("Result Type: " + en.getContentType().toString());
if (en.getContentType() != null)
{
Cache.log.debug("Result Type: " + en.getContentType().toString());
@@
-201,7
+200,7
@@
public class HttpResultSet extends FileParse
}
@Override
}
@Override
- protected void finalize() throws Throwable
+ public void close()
{
dataIn = null;
cachedRequest = null;
{
dataIn = null;
cachedRequest = null;
@@
-216,7
+215,8
@@
public class HttpResultSet extends FileParse
} catch (Error ex)
{
}
} catch (Error ex)
{
}
- super.finalize();
+ // no finalize for FileParse
+ // super.close();
}
/**
}
/**