Commit a4d047a3186f12a56cbff8b2b0d360d81b39f5af
1 parent
7486e4f5
Exists in
master
Use blocking call for some functions to avoid NPE.
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapConnection.java
@@ -125,7 +125,7 @@ public class EpnTapConnection implements EpnTapInterface { | @@ -125,7 +125,7 @@ public class EpnTapConnection implements EpnTapInterface { | ||
125 | @Override | 125 | @Override |
126 | public List<Granule> sendADQLQuery(String tapURL, String adqlQuery) throws VOTableException { | 126 | public List<Granule> sendADQLQuery(String tapURL, String adqlQuery) throws VOTableException { |
127 | VOTableCtrl voTableCtrl = new VOTableCtrl(); | 127 | VOTableCtrl voTableCtrl = new VOTableCtrl(); |
128 | - voTableCtrl.acquireVOTable(tapURL, adqlQuery); | 128 | + voTableCtrl.acquireVOTableBlocking(tapURL, adqlQuery); |
129 | VOTableData data = voTableCtrl.getVOTableData(); | 129 | VOTableData data = voTableCtrl.getVOTableData(); |
130 | 130 | ||
131 | List<Granule> granules; | 131 | List<Granule> granules; |
@@ -139,7 +139,7 @@ public class EpnTapConnection implements EpnTapInterface { | @@ -139,7 +139,7 @@ public class EpnTapConnection implements EpnTapInterface { | ||
139 | throws VOTableException { | 139 | throws VOTableException { |
140 | String query = String.format(enumeratedQuery.toString(), schemaName); | 140 | String query = String.format(enumeratedQuery.toString(), schemaName); |
141 | VOTableCtrl voTableCtrl = new VOTableCtrl(); | 141 | VOTableCtrl voTableCtrl = new VOTableCtrl(); |
142 | - voTableCtrl.acquireVOTable(tapURL, query); | 142 | + voTableCtrl.acquireVOTableBlocking(tapURL, query); |
143 | VOTableData data = voTableCtrl.getVOTableData(); | 143 | VOTableData data = voTableCtrl.getVOTableData(); |
144 | Debug.writeObject("data", data); | 144 | Debug.writeObject("data", data); |
145 | 145 |
src/main/java/eu/omp/irap/vespa/epntapclient/epntap/service/ServiceCtrl.java
@@ -152,7 +152,7 @@ public class ServiceCtrl { | @@ -152,7 +152,7 @@ public class ServiceCtrl { | ||
152 | */ | 152 | */ |
153 | public static VOTABLE getVoTable(String query) throws VOTableException { | 153 | public static VOTABLE getVoTable(String query) throws VOTableException { |
154 | VOTableCtrl voTableCtrl = new VOTableCtrl(); | 154 | VOTableCtrl voTableCtrl = new VOTableCtrl(); |
155 | - voTableCtrl.acquireVOTable(Consts.DEFAULT_REGISTRY_URL, query); | 155 | + voTableCtrl.acquireVOTableBlocking(Consts.DEFAULT_REGISTRY_URL, query); |
156 | return voTableCtrl.getVOTable(); | 156 | return voTableCtrl.getVOTable(); |
157 | } | 157 | } |
158 | 158 | ||
@@ -174,7 +174,7 @@ public class ServiceCtrl { | @@ -174,7 +174,7 @@ public class ServiceCtrl { | ||
174 | */ | 174 | */ |
175 | public static VOTableData getVoTableData(VOTABLE voTable) throws VOTableException { | 175 | public static VOTableData getVoTableData(VOTABLE voTable) throws VOTableException { |
176 | VOTableCtrl ctrl = new VOTableCtrl(); | 176 | VOTableCtrl ctrl = new VOTableCtrl(); |
177 | - ctrl.acquireVOTable(voTable); | 177 | + ctrl.acquireVOTableBlocking(voTable); |
178 | Table table = (Table) voTable.getRESOURCE().get(0).getLINKAndTABLEOrRESOURCE().get(0); | 178 | Table table = (Table) voTable.getRESOURCE().get(0).getLINKAndTABLEOrRESOURCE().get(0); |
179 | VOTableDataParser dataParser = new VOTableDataParser("Services list", table); | 179 | VOTableDataParser dataParser = new VOTableDataParser("Services list", table); |
180 | dataParser.parseData(); | 180 | dataParser.parseData(); |