grouper-users - [grouper-users] Rule : problem with ruleThenEnum assignMembershipDisabledDaysForOwnerGroupId
Subject: Grouper Users - Open Discussion List
List archive
[grouper-users] Rule : problem with ruleThenEnum assignMembershipDisabledDaysForOwnerGroupId
Chronological Thread
- From: SIAD <>
- To:
- Subject: [grouper-users] Rule : problem with ruleThenEnum assignMembershipDisabledDaysForOwnerGroupId
- Date: Thu, 05 Sep 2013 16:05:52 +0200
Hello, I use a rule to assign disabled date on a membership. My configuration :
But, when i try this, the disabled date is set to 22/09/2013 and not to 05/09/2014 (+365 days). I think, the problem is located in RuleElUtils class in the method assignMembershipDisabledDaysForGroupId. More specifically, this line : membership.setDisabledTime(new Timestamp(System.currentTimeMillis() + (daysInFuture * 24 * 60 * 60 * 1000))); daysInFuture is an integer, so Java think that the result of daysInFuture * 24 * 60 * 60 * 1000 will be an Integer too. But with daysInFuture = 365, the result is too large for an integer. i think, the problem can be resolve if we add (long) just before daysInFuture : membership.setDisabledTime(new Timestamp(System.currentTimeMillis() + ((long)daysInFuture * 24 * 60 * 60 * 1000))); Am i correct ? Thanks for your help :-) Yoann. --
|
- [grouper-users] Rule : problem with ruleThenEnum assignMembershipDisabledDaysForOwnerGroupId, SIAD, 09/05/2013
- RE: [grouper-users] Rule : problem with ruleThenEnum assignMembershipDisabledDaysForOwnerGroupId, Chris Hyzer, 09/08/2013
Archive powered by MHonArc 2.6.16.