I'm just migrating a quite large app (about 300Kloc) to 1.5 and focus is using generics. In our case, app was split in several (6) layers, one is specialized in persistence. So, we make persistence layer return generyfied collections and add @SuppressWarnings(value={"unchecked"}) on these classes.

At the rest of application, is mandatory developers could not use @SuppressWarnings - except in real generic code (like window managers capable of deal with Window, JFrame and JInternalFrame transparently).

For the rest, generics rocks.

But, if you use OJB code directly inside your GUI, then you'll have to add @SuppressWarnings - I made this question some time ago on this list, and there is no support for generics inside OJB.

Best regards,

Richter



werner escreveu:

Hello!

I lately switched to Java 1.5 and get a lot of warnings like this:

Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E> should be parameterized

I know I can turn off those warnings. But is there a way to use Generics
with OJB (for example for 1:n relations)?

Thanks, Werner



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to