users@codemodel.java.net

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

From: Schmidt, Mathias <Mathias.Schmidt_at_hesgdv.de>
Date: Tue, 8 Feb 2011 16:17:14 +0100

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<http://dict.leo.org/ende?lp=ende&p=HpZR0yYAA&search=characteristics&trestr=0x8001> 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
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------