Java 5.0 generics and idlj

Hi all,

Does anyone know how to make the idlj generate proper Java 5.0 collections code. i could not figure it out and at some point the idlj compiler generates

the following in my interface's corresponding POA class:

public abstract class MyInterfacePOA extends org.omg.PortableServer.Servant

implements MyInterfaceOperations, org.omg.CORBA.portable.InvokeHandler

{

// Constructors

private static java.util.Hashtable _methods = new java.util.Hashtable ();

static

{

_methods.put ("method1", new java.lang.Integer (0));

_methods.put ("method2", new java.lang.Integer (1));

_methods.put ("method3", new java.lang.Integer (2));

_methods.put ("method4", new java.lang.Integer (3));

_methods.put ("method5", new java.lang.Integer (4));

_methods.put ("method6", new java.lang.Integer (5));

_methods.put ("method7", new java.lang.Integer (6));

}

...

The hashtable should be parameterized - that's the warning. I do not want to disable the warnings. Maybe anyone has found an alternative solution!

Thanks

[1131 byte] By [Afflicteda] at [2007-11-26 16:03:25]
# 1
Hopefully you follow the de-facto best practice of putting generated source code into a different tree to your main code. If so, could you not compile the two separately with different warning settings?
dannyyatesa at 2007-7-8 22:25:16 > top of Java-index,Core,Core APIs...
# 2

I'm having the same problem. Did you come up with a solution?

I'm getting 51 warnings ALL of which could be solved in one line by adding <String, Integer>

Are there some cases where it isn't a String / Integer?

Is there a reason the version of idlj shipping w/ Java 5 doesn't do this?

Eric-Fredericha at 2007-7-8 22:25:16 > top of Java-index,Core,Core APIs...
# 3
what's the problem? can't you just ignore the warnings? most code projects have them all over the place
CarrieHunta at 2007-7-8 22:25:16 > top of Java-index,Core,Core APIs...