As explained in my previous post, after introducing a fix as shown below Intent resolvedRequiredIntent = resolver.resolveModel(Intent.class, requiredIntent); if (!resolvedRequiredIntent.isUnresolved()) { requiredIntents.add(resolvedRequiredIntent);
for the unreachable code, noticed that not always this condition holds good to validate. The above fix holds good if all the simple intents were defined at the top of the definitions.xml as shown below. <!-- simple intent --> <intent name="confidentiality" constrains="sca:binding"></intent> <intent name="integrity" constrains="sca:binding"></intent><intent name="messageProtection" constrains="sca:binding" requires="test:confidentiality test:integrity"> </intent> Instead when the simple intents are placed at the bottom of the definitions.xml as shown below, <intent name="messageProtection" constrains="sca:binding" requires="test:confidentiality test:integrity"> </intent> <!-- simple intent --> <intent name="confidentiality" constrains="sca:binding"></intent> <intent name="integrity" constrains="sca:binding"></intent> then the code does not seem to work as required. This is because SCADefinitionsProcessor.java tries to resolve the policies in the order as it was read. I believe this should not happen and needs a rewriting for resolving the policies. Can anyone suggest if this is the right approach? -- Thanks & Regards, Ramkumar Ramalingam