users@codemodel.java.net

Re: possible bug in com.sun.codemodel.JDefinedClass.field(int, JType, String, JExpression) v2.4

From: Martin Grebac <martin.grebac_at_oracle.com>
Date: Tue, 8 Feb 2011 17:19:03 +0100

Hi,
 thanks, fixed it,
  MartiNG
--
Martin Grebac
GlassFish/Metro/JAXB/Tooling at Oracle
http://blogs.sun.com/mgrebac
ICQ: 93478885
On Feb 8, 2011, at 4:17 PM, Schmidt, Mathias wrote:
> Hello there,
> thanks for your great API.
>  
> In com.sun.codemodel.JDefinedClass.field(int, JType, String, JExpression)
> You throw an IllegalArgumentException if a field with same name is allready in the map. But the field is still replaced by the new one. So possible characteristics of the object are lost.
> 
> 
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> HERMES Einrichtungs Service GmbH & Co.KG * Essener Straße 89 * D-22419 Hamburg * AG Hamburg HRA  100286 *
> Komplementär: Verwaltungsgesellschaft HERMES Einrichtungs Service mbH * AG Hamburg HRB 79507 * Geschäftsführer: Dirk Rahn, Michael Dildey
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------