-
Bug
-
Resolution: Done
-
Major
-
None
-
-
Low
The getResult() method in JBossResponseContext prevents multiple Obligations from getting returned to the PEP. The code block:
//Obligations
Set<Obligation> obligationsSet = result.getObligations();
if(obligationsSet != null)
{
for(Obligation obl:obligationsSet)
}
Causes the obligations to constantly get overwritten with the last one read in.
--> resultType.setObligations(obligationsType)
To fix, do something more like:
// Obligations
Set<Obligation> obligationsSet = result.getObligations();
if (obligationsSet != null && obligationsSet.size() > 0) {
ObligationsType obligationsType = new ObligationsType();
for (Obligation obl : obligationsSet)
resultType.setObligations(obligationsType);
}