You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jx sun <jy...@gmail.com> on 2006/07/21 13:18:24 UTC
var 'enum' which is a reserved word in jdk1.5
At least 2 classes of velocity1.4 has var 'enum' which is a left word in
jdk1.5
1, org.apache.velocity.texen.Generator 's
protected void fillContextHash (Context context, Hashtable objs)
{
Enumeration enum_ = objs.keys();
while (enum_.hasMoreElements())
{
String key = enum_.nextElement().toString();
context.put (key, objs.get(key));
}
}
2,org.apache.velocity.util.EnumerationIterator's
private Enumeration enum = null;
at least Eclipse 3.1 with jdk1.5 will say : "Synax error on token
"enum",delete the token" to you .
------------------------------
jyanshine - Shanghai
jyanshine@gmail.com
2006-07-21
Re: var 'enum' which is a reserved word in jdk1.5
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"jx sun" <jy...@gmail.com> writes:
Yes, that is a known problem. Thanks for pointing out. Velocity-1.4 is
only up to JDK 1.4.x. The current HEAD does work under JDK 5.
Best regards
Henning
>------=_Part_93558_21418520.1153480704707
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline
>At least 2 classes of velocity1.4 has var 'enum' which is a left word in
>jdk1.5
>1, org.apache.velocity.texen.Generator 's
>protected void fillContextHash (Context context, Hashtable objs)
> {
> Enumeration enum_ = objs.keys();
> while (enum_.hasMoreElements())
> {
> String key = enum_.nextElement().toString();
> context.put (key, objs.get(key));
> }
> }
>2,org.apache.velocity.util.EnumerationIterator's
>private Enumeration enum = null;
>at least Eclipse 3.1 with jdk1.5 will say : "Synax error on token
>"enum",delete the token" to you .
> ------------------------------
> jyanshine - Shanghai
>jyanshine@gmail.com
>2006-07-21
>------=_Part_93558_21418520.1153480704707--
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
hps@intermeta.de +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
Social behaviour: Bavarians can be extremely egalitarian and folksy.
-- http://en.wikipedia.org/wiki/Bavaria
Most Franconians do not like to be called Bavarians.
-- http://en.wikipedia.org/wiki/Franconia
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: var 'enum' which is a reserved word in jdk1.5
Posted by Will Glass-Husain <wg...@forio.com>.
This is fixed in the source control head. If you are compiling from
scratch, download with svn or take the nightly snapshot. It's pretty
stable.
WILL
jx sun wrote:
> At least 2 classes of velocity1.4 has var 'enum' which is a left word in
> jdk1.5
>
> 1, org.apache.velocity.texen.Generator 's
> protected void fillContextHash (Context context, Hashtable objs)
> {
> Enumeration enum_ = objs.keys();
> while (enum_.hasMoreElements())
> {
> String key = enum_.nextElement().toString();
> context.put (key, objs.get(key));
> }
> }
> 2,org.apache.velocity.util.EnumerationIterator's
> private Enumeration enum = null;
>
> at least Eclipse 3.1 with jdk1.5 will say : "Synax error on token
> "enum",delete the token" to you .
>
> ------------------------------
> jyanshine - Shanghai
> jyanshine@gmail.com
> 2006-07-21
>
--
Forio Business Simulations
Will Glass-Husain
phone (415) 440-7500 x89
mobile (415) 235-4293
wglass@forio.com
www.forio.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org