wrong condition on tdm rules or templates fixed

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@115395 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-06-15 15:00:03 +00:00
parent d5d306daab
commit 0b059aeb64
2 changed files with 3 additions and 2 deletions

View File

@ -838,7 +838,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
*/
@Override
public boolean notifyTDMObjectSharing(String userIdToNotify, NotificationType type, String tdmObjectName, String encodedTabularResourceParams) throws Exception {
if (type != NotificationType.TDM_RULE_SHARE || type != NotificationType.TDM_TEMPLATE_SHARE)
if (! (type == NotificationType.TDM_RULE_SHARE || type == NotificationType.TDM_TEMPLATE_SHARE))
throw new IllegalArgumentException("Type must be either TDM_RULE_SHARE or TDM_TEMPLATE_SHARE");
String notificationText = "shared the Tabular Data Manager";

View File

@ -6,6 +6,7 @@ import junit.framework.TestSuite;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.portal.databook.shared.NotificationType;
/**
* Unit test for simple App.
@ -51,6 +52,6 @@ extends TestCase
*
*/
public void testApp() throws Exception {
}
}