fixed main test

This commit is contained in:
Francesco Mangiacrapa 2021-09-15 11:00:04 +02:00
parent 0c0163e8e4
commit 2af2059735
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;
}