From 2af2059735d4b9785b2e659d3cd2899a33ce0159 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Wed, 15 Sep 2021 11:00:04 +0200 Subject: [PATCH] fixed main test --- .../gcube/application/geoportalcommon/GeoportalCommon.java | 6 +++--- src/test/java/org/gcube/application/TestGeonaReader.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java b/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java index fd33e20..5a00505 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java +++ b/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java @@ -45,11 +45,11 @@ public class GeoportalCommon { * Gets the public links for. * * @param item the item - * @param alsoShort the also short + * @param createShortURL creates and returns the short URL also. * @return the public links for * @throws Exception the exception */ - public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item, boolean alsoShortURL) throws Exception { + public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item, boolean createShortURL) throws Exception { LOG.info("getPublicLinksFor called for: " + item); try { @@ -73,7 +73,7 @@ public class GeoportalCommon { String shortUrl = link; try { - if(alsoShortURL) + if(createShortURL) shortUrl = getShortUrl(link); } catch (Exception e) { LOG.warn("Error on shortening the URL: ", e); diff --git a/src/test/java/org/gcube/application/TestGeonaReader.java b/src/test/java/org/gcube/application/TestGeonaReader.java index 83f7ec6..e5d470b 100644 --- a/src/test/java/org/gcube/application/TestGeonaReader.java +++ b/src/test/java/org/gcube/application/TestGeonaReader.java @@ -36,7 +36,7 @@ public class TestGeonaReader { ScopeProvider.instance.set(scope); GeoportalCommon gc = new GeoportalCommon(); GeoNaItemRef item = new GeoNaItemRef("", "concessione"); - GeoNaItemRef links = gc.getPublicLinksFor(item); + GeoNaItemRef links = gc.getPublicLinksFor(item,true); return links; }