From 0b059aeb64c35fddd90e4ce02a15d37dfb104eef Mon Sep 17 00:00:00 2001 From: "massimiliano.assante" Date: Mon, 15 Jun 2015 15:00:03 +0000 Subject: [PATCH] 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 --- .../social/ApplicationNotificationsManager.java | 2 +- .../java/org/gcube/applicationsupportlayer/social/AppTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java index 647fb40..55c9a1a 100644 --- a/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java +++ b/src/main/java/org/gcube/applicationsupportlayer/social/ApplicationNotificationsManager.java @@ -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"; diff --git a/src/test/java/org/gcube/applicationsupportlayer/social/AppTest.java b/src/test/java/org/gcube/applicationsupportlayer/social/AppTest.java index 20dbfc7..6ef4243 100644 --- a/src/test/java/org/gcube/applicationsupportlayer/social/AppTest.java +++ b/src/test/java/org/gcube/applicationsupportlayer/social/AppTest.java @@ -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 { - + } }