fixed bug

This commit is contained in:
Massimiliano Assante 2023-03-08 15:54:02 +01:00
parent dc8566939d
commit d9a57200c7
1 changed files with 1 additions and 1 deletions

View File

@ -26,6 +26,7 @@ public class Utils {
String[] splits = urlContainingGroupId.split("=");
long groupId = -1;
try {
toReturn.setFriendlyURL(urlContainingGroupId);
if (splits.length > 0) {
groupId = Long.parseLong(splits[1]);
GroupManager gm = new LiferayGroupManager();
@ -39,7 +40,6 @@ public class Utils {
toReturn.setFriendlyURL(GCubePortalConstants.PREFIX_GROUP_URL +GroupLocalServiceUtil.getGroup(groupId).getFriendlyURL());
}
}
toReturn.setFriendlyURL(urlContainingGroupId);
} catch (Exception e) {
_log.error("Something is wrong in the url passed: " + urlContainingGroupId);
return toReturn;