I'm updating the lib org.apache.ws.commons.axiom:axiom-impl from version 1.3.0 to 1.4.0.
After the update the class org.apache.axiom.om.impl.llom.OMAttributeImpl does not exist anymore.
From the release notes the change is maybe indirect mentioned as internal refactoring. Inside the GitHub project I can not find the class anymore.
The question which arises for me, how can I modifiy this code that it works as expected?
if (element != null) {
OMAttribute attribute = new OMAttributeImpl();
attribute.setLocalName("localName");
attribute.setAttributeValue("1");
element.addAttribute(attribute);
Thanks in advance, Markus
The problem here is that the code directly refers to the implementation class of the
OMAttributeinterface. That's an internal implementation detail. Instead, eitherOMAttributeinstance using thecreateOMAttributemethod defined byOMFactory,element.addAttribute("localName", "1", null).