-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jerry,
The issue you've mentioned doesn't not affect the Neethi2-1.0 release
since Neethi2-1.0 distribution should contain only the org.apache.neethi.*
class files and not the org.apache.ws.policy.* class files.
Anyway this is still an issue that should be fixed which I will do
shortly ..
Best,
Sanka
Preissler, Z 1903, BN wrote:
> Yesterday I noticed one small issue that maybe could be fixed
> beforehand:
>
> In org.apache.ws.policy.PrimitiveAssertion, the method addAttribute
> accepts any Object as attribute value, but when reading the value
> with getAttribute, it is cast to String.
>
> public void addAttribute(QName qname, Object value) {
> attributes.put(qname, value); }
>
> public String getAttribute(QName qname) { return (String)
> attributes.get(qname); }
>
> In org.apache.ws.policy.Policy, only String values are accepted:
>
> /** * Adds an attribute to the Policy. * * @param qname *
> The QName of the attribute. * @param value * The value
> of attribute expressed as a String. */ public void
> addAttribute(QName qname, String value) { if (value != null) {
> attributes.put(qname, value); } }
>
> Sorry about the bad timing, I literally saw this yesterday evening.
> I've created https://issues.apache.org/jira/browse/WSCOMMONS-116
> for this and attached an updated source for PrimitiveAssertion.
>
> It might be useful to look into this issue later on and refactor
> the attribute-related behaviour in a common superclass for Policy
> and PrimitiveAssertion like this:
>
> public abstract class AttributedAssertion extends AbstractAssertion
> {
>
> public void addAttribute(QName qname, String value) {...} public
> String getAttribute(QName name) {...} }
>
> kind regards
>
> Jerry Preissler
- --
Sanka Samaranayake
WSO2 Inc.
T:+94-77-3506382 F:+94-11-2424304
http://sankas.blogspot.com/
http://www.wso2.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
iD8DBQFFRtFL/Hd0ETKdgNIRAohkAKCI7s04KE+0idXZDBv6N7B1hkZhUwCfSYFG
Cq1qnNOYzHiTw4ofN8GBMXY=
=Flto
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]