minor fix
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/catalogue-sharing-widget@146761 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
76fe044e4a
commit
8af0ce8f17
|
@ -44,11 +44,12 @@ public class ShareServicesImpl extends RemoteServiceServlet implements ShareServ
|
|||
|
||||
String shortUrl = null;
|
||||
|
||||
UrlShortener shortener = new UrlShortener();
|
||||
if(shortener!=null && shortener.isAvailable())
|
||||
try{
|
||||
UrlShortener shortener = new UrlShortener();
|
||||
shortUrl = shortener.shorten(longUrl);
|
||||
else
|
||||
}catch(Exception e){
|
||||
logger.warn("Short url not available");
|
||||
}
|
||||
|
||||
return new ItemUrls(shortUrl, longUrl, uuid, dataset.getName(), dataset.getTitle());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue