From 2df635c6adf8696c6de8f72a6abfc02847ba7093 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Wed, 2 Dec 2020 12:46:33 +0100 Subject: [PATCH] patching the method getShortUrl --- .../gcube/application/geoportalcommon/GeoportalCommon.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java b/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java index 04e3776..b60eac2 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java +++ b/src/main/java/org/gcube/application/geoportalcommon/GeoportalCommon.java @@ -118,10 +118,10 @@ public class GeoportalCommon { if (longUrl == null) return longUrl; - UrlShortener shortener = new UrlShortener(); - try { - + + UrlShortener shortener = new UrlShortener(); + if (shortener != null && shortener.isAvailable()) { String toShort = longUrl; String[] splitted = toShort.split("\\?");