+ return list;
+ }
+ private List<LedgerTransaction> retrieveTransactionList()
+ throws ParseException, HTTPException, IOException, ApiNotSupportedException {
+ final API apiVersion = profile.getApiVersion();
+ if (apiVersion.equals(API.auto)) {
+ return retrieveTransactionListAnyVersion();
+ }
+ else if (apiVersion.equals(API.html)) {
+ Logger.debug("json",
+ "Declining using JSON API for /accounts with configured legacy API version");
+ return null;
+ }
+ else {
+ return retrieveTransactionListForVersion(apiVersion);
+ }
+
+ }
+ private List<LedgerTransaction> retrieveTransactionListAnyVersion()
+ throws ApiNotSupportedException {
+ for (API ver : API.allVersions) {
+ try {
+ return retrieveTransactionListForVersion(ver);
+ }
+ catch (Exception | HTTPException e) {
+ Logger.debug("json",
+ String.format(Locale.US, "Error during account list retrieval using API %s",
+ ver.getDescription()));
+ }
+
+ throw new ApiNotSupportedException();
+ }
+
+ throw new RuntimeException("This should never be reached");