Skip to Content.
Sympa Menu

grouper-dev - Re: [grouper-dev] bug in Group.getAttributeValue

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] bug in Group.getAttributeValue


Chronological Thread 
  • From: Shilen Patel <>
  • To: Jim Fox <>, Grouper Dev <>
  • Subject: Re: [grouper-dev] bug in Group.getAttributeValue
  • Date: Wed, 6 Aug 2014 02:30:58 +0000
  • Accept-language: en-US

I think the intent was for the behavior to be the same as it was in 2.1.
That is, the exception is thrown regardless of the third parameter if the
attribute is not valid for the group.

2.1 example:

gsh 0% group = addGroup("etc", "group", "group")
group: name='etc:group' displayName='etc:group'
uuid='df37c0fa5cb24b1cbab095af1e49e727'
gsh 1% group.getAttributeValue("attr", false, false)
// Error: unable to evaluate command: Sourced file: inline evaluation of:
``group.getAttributeValue("attr", false, false);'' : Method Invocation
group.getAttributeValue
// See error log for full stacktrace
// caused by:
edu.internet2.middleware.grouper.exception.AttributeNotFoundException:
// Cant find attribute: attr
gsh 2% type = typeAdd("testType")
type: 'testType'
gsh 3% typeAddAttr("testType", "attr", AccessPrivilege.READ,
AccessPrivilege.UPDATE, false)
attribute: 'attr'
gsh 4% group.getAttributeValue("attr", false, false)
// Error: unable to evaluate command: Sourced file: inline evaluation of:
``group.getAttributeValue("attr", false, false);'' : Method Invocation
group.getAttributeValue
// See error log for full stacktrace
// caused by:
edu.internet2.middleware.grouper.exception.AttributeNotFoundException:
// group does not have group type:
GroupType[creatorUuid=9edd81cdc3054b01914db28bfaab0d49,createTime=140729125
6579,fields=1,isAssignable=true,isInternal=false,name=testType,uuid=2356fcd
575394db89b4d10d60aa750d5]
gsh 5% group.addType(type)
gsh 6% group.getAttributeValue("attr", false, false)

gsh 7%



2.2 example:

gsh 0% group = addGroup("etc", "group", "group")
group: name='etc:group' displayName='etc:group'
uuid='44f61ca9041e411ba1d35381a4d6f935'
gsh 1% group.getAttributeValue("attr", false, false)
// Error: unable to evaluate command: Sourced file: inline evaluation of:
``group.getAttributeValue("attr", false, false);'' : Method Invocation
group.getAttributeValue
// See error log for full stacktrace
// caused by:
edu.internet2.middleware.grouper.exception.AttributeNotFoundException:
// Cant find attribute: attr
gsh 2% type = typeAdd("testType")
type: 'testType'
gsh 3% typeAddAttr("testType", "attr")
edu.internet2.middleware.grouper.attr.AttributeDefName:
AttributeDefName[name=etc:legacy:attribute:legacyAttribute_attr,uuid=754f3f
fb8d284377931cd05c6bd26e2b]
gsh 4% group.getAttributeValue("attr", false, false)
// Error: unable to evaluate command: Sourced file: inline evaluation of:
``group.getAttributeValue("attr", false, false);'' : Method Invocation
group.getAttributeValue
// See error log for full stacktrace
// caused by:
edu.internet2.middleware.grouper.exception.AttributeNotFoundException:
// Group etc:group doesn't have attribute: attr
gsh 5% group.addType(type)
gsh 6% group.getAttributeValue("attr", false, false)

gsh 7%



Are you seeing a difference in the behavior between the two versions? Or
given the above, do you think this is an issue in 2.1 as well. Just
checking..

Thanks!

-- Shilen

On 8/5/14 8:14 PM, "Jim Fox"
<>
wrote:

>
>version 2.2.0+
>
>Group.getAttributeValue throws a 'not found' exception even when the 3rd
>parameter (exceptionIfNotFound) is false.
>
>I'll file a jira bug if someone can point out the correct version to file
>it against.
>
>Jim
>




Archive powered by MHonArc 2.6.16.

Top of Page