You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.
The following code snippet fails to marshal as expected. If @xmlelement is
removed anything works like a charm.
class Order {
private HashMap<Integer, Integer> oi;
public Order() {}
public Order(HashMap<Integer, Integer> oi)
{ this.oi = oi;}
@xmlelement
public void setOi(HashMap<Integer, Integer> oi)
{ this.oi = oi; }
public HashMap<Integer, Integer> getOi()
{ return this.oi; }
public static void main(String[] args)
{ JAXBContext context = JAXBContext.newInstance(Order.class); Marshaller marshaller = context.createMarshaller(); HashMap<Integer, Integer> oi = new HashMap<Integer, Integer>(); oi.put(1,1); oi.put(2,2); Order order = new Order(oi); marshaller.marshal(order, new PrintWriter(System.out)); }
}
Environment
Operating System: All
Platform: All
Affected Versions
[2.2]
The text was updated successfully, but these errors were encountered:
The following code snippet fails to marshal as expected. If @xmlelement is
removed anything works like a charm.
class Order {
private HashMap<Integer, Integer> oi;
public Order() {}
public Order(HashMap<Integer, Integer> oi)
{ this.oi = oi;}
@xmlelement
public void setOi(HashMap<Integer, Integer> oi)
{ this.oi = oi; }
public HashMap<Integer, Integer> getOi()
{ return this.oi; }
public static void main(String[] args)
{ JAXBContext context = JAXBContext.newInstance(Order.class); Marshaller marshaller = context.createMarshaller(); HashMap<Integer, Integer> oi = new HashMap<Integer, Integer>(); oi.put(1,1); oi.put(2,2); Order order = new Order(oi); marshaller.marshal(order, new PrintWriter(System.out)); }
}
Environment
Operating System: All
Platform: All
Affected Versions
[2.2]
The text was updated successfully, but these errors were encountered: