users@jaxb.java.net

JMethod.varParam generating array instead of object definition

From: Fabian Ritzmann <Fabian.Ritzmann_at_Sun.COM>
Date: Thu, 01 Jun 2006 18:04:48 +0200

Hi,

I found that this code:

com.sun.codemodel.JMethod formatArgs = myClass.method(JMod.PUBLIC,
String.class, "format");
formatArgs.varParam(Object.class, "args");

is producing this output:

public String format(Object[]... args)

I had expected to get an "Object..." instead of "Object[]...". Am I
doing something wrong or is this a bug? I'm using a jaxb-xjc.jar with
this manifest entry:
Build-Id: 04/27/2006 03:14 PM(hudson)

Fabian