Current Checkout Protocol for Eclipse

You’ll see a very large amount of warnings from the adc2 importer as
well. I’m slowly working on cleaning up the code as we speak.

  • M.

On 01/02/2008, Joel Uckelman uckelman@nomic.net wrote:


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

No, I hadn’t actually tried it.

Known issue with Java - See:

bugs.sun.com/bugdatabase/view_bu … id=5105887

I’ll look after VASSAL.counters

BTW This annotation is supported by the 1.5 compiler to suppress a warning:

@SuppressWarnings("unchecked") public Class[] getAllowableConfigureComponents() { return new Class[0]; }

Brent.

Joel,

More easy ones done:

swampwallaby-merge@2968 fixes all:

  • Unused imports
  • Missing serial id’s in serializable classes
  • Type problems in VASSAL.counters

I’m down to 247 warnings, first 100 are all

Class is a raw type. References to generic type Class should be parameterized

Brent.

Thus spake “Brent Easton”:

By “should” above, I mean not that I believe it is possible, but rather
that it’s stupid that it’s not. Type erasure is annoying. Sigh.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I don’t know what to do about the ones which come from
getAllowableConfugreComponents(). We really should return a
Class, except that the language doesn’t seem to permit
that. Returning Class<?> won’t save us any casts, and the suggested
solution in that Bug you cited is an abomination.

Also, I wouldn’t bother with the ones left in the org tree, since we
might soon not be using the Wizard stuff.

In Deck, is there a reason why AvailablePiece implments Comparable
instead of Comparable<? extends GamePiece>?

In PieceIterator, should the Enumerations be Enumeration?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Can you verify that this doesn’t break any existing code that overrides the old method signature. If we can only fix these warnings by breaking custom code, then better to just add @SuppressWarnings, which Eclipse can do automatically.

rk

Post generated using Mail2Forum (mail2forum.com)

I suggest we just override these ones.

Your right, I should have been more specific.

I did some testing as I have a fair bit of custom code and as far as I can see, this is all compile-time warning stuff. If it actually causes custom code to fail to compile, then it is likely that either the custom code was already ‘silently’ broken, or the core modification is incorrect.

Brent.

What we need to check is that custom code that was compiled against v3.0 still runs against the new code. For example, if you change the signature of a method to one that uses generics, and a custom class overrides that method, there could a runtime error when you call that method, or maybe the runtime won’t find the overriden implementation.

rk

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Rodney Kinney”:

Class and Class<?> look the same to the JVM due to type erasure. This
only matters to the compiler. It should not result in any problems with
custom code.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I did some refactoring to make PieceIterator use a real Iterator internally,
so that issue is gone now.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

How does this look from the Eclipse side now? What warnings are left?

uckelman wrote:

248 warnings left, still all look to be generics-related.

The bulk of the ‘top 100’ seem to be getAllowableConfigureComponents()
returning Class - one warning for every class that extends
AbstractConfigurable?

Cheers,
Tim.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)