Custom Java class maintainers

Calling all Vassal module maintainers who have custom Java classes in their modules, there is a bug fix in the next Vassal release that could affect your custom Java code.

The behaviour of

new SequenceEncoder(null, delimiter);

has changed. If you use this constructor with an explicit null it should be changed to

new SequenceEncoder(delimiter);

You can make this change now as the two calls behave identically in the current Vassal release.

If you have code that relies on

new SequenceEncoder(var, delimiter);

to create an empty sequence when var is null then you will have to modify your code as this will no longer hold true in future Vassal releases (a sequence with one token of “” will be created).

Thanks,
Bob

That will likely have consequences for the ADC2 import code. Have you done
a search for this in the branch?

And why do we need to change this?

  • M.

On 20 March 2011 16:57, bobd bob__davison@hotmail.com wrote:

Calling all Vassal module maintainers who have custom Java classes in
their modules, there is a bug fix in the next Vassal release that could
affect your custom Java code.

The behaviour of

Code:
new SequenceEncoder(null, delimiter);

has changed. If you use this constructor with an explicit null it
should be changed to

Code:
new SequenceEncoder(delimiter);

You can make this change now as the two calls behave identically in the
current Vassal release.
If you have code that relies on

Code:
new SequenceEncoder(var, delimiter);

to create an empty sequence when var is null then you will have to
modify your code as this will no longer hold true in future Vassal
releases (a sequence with one token of “” will be created).
Thanks,
Bob


Read this topic online here:
Custom Java class maintainers


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages


Michael Kiefte, Ph.D.
Associate Professor
School of Human Communication Disorders
Dalhousie University
Halifax, Nova Scotia, Canada
tel: +1 902 494 5150
fax: +1 902 494 5151

Most of the custom class stuff can be found in the VQSL branch because Brent
wrote most of it. That covers about 70% of the modules with custom code. My
stuff and Dominik’s stuff is hiding there too. The only other modules with
custom code not there is Mike’s, George’s, Torsten’s and the Warhammer stuff. We
could reverse the Warhammer classes if we had to check them seeing as they have
been driven underground if necessary

That would cover about 95% of the custom stuff I’d say. The other 5% is for the
unknown oddballs not aware of :slight_smile:


From: Michael Kiefte mkiefte@dal.ca
To: messages@vassalengine.org
Sent: Tue, March 22, 2011 8:47:46 AM
Subject: Re: [messages] [Module Design] Custom Java class maintainers

That will likely have consequences for the ADC2 import code. Have you done a
search for this in the branch?

And why do we need to change this?

  • M.

On 20 March 2011 16:57, bobd bob__davison@hotmail.com wrote:

Calling all Vassal module maintainers who have custom Java classes in

their modules, there is a bug fix in the next Vassal release that could
affect your custom Java code.

The behaviour of

Code:
new SequenceEncoder(null, delimiter);

has changed. If you use this constructor with an explicit null it
should be changed to

Code:
new SequenceEncoder(delimiter);

You can make this change now as the two calls behave identically in the
current Vassal release.
If you have code that relies on

Code:
new SequenceEncoder(var, delimiter);

to create an empty sequence when var is null then you will have to
modify your code as this will no longer hold true in future Vassal
releases (a sequence with one token of “” will be created).
Thanks,
Bob


Read this topic online here:
Custom Java class maintainers


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages


Michael Kiefte, Ph.D.
Associate Professor
School of Human Communication Disorders
Dalhousie University
Halifax, Nova Scotia, Canada
tel: +1 902 494 5150
fax: +1 902 494 5151

You might be surprised about how much custom stuff is in the Twilight
Struggle module. I’ll check as SequenceEncoder occurs there a few times.

The ADC2 importer uses it a lot. It’s fundamentally the way it creates a
module from scratch.

Can someone quickly explain the consequences of the change?

  • M.

On 22 March 2011 11:10, Timothy Mccarron timothy.mccarron@sbcglobal.netwrote:

Most of the custom class stuff can be found in the VQSL branch because
Brent wrote most of it. That covers about 70% of the modules with custom
code. My stuff and Dominik’s stuff is hiding there too. The only other
modules with custom code not there is Mike’s, George’s, Torsten’s and the
Warhammer stuff. We could reverse the Warhammer classes if we had to check
them seeing as they have been driven underground if necessary

That would cover about 95% of the custom stuff I’d say. The other 5% is for
the unknown oddballs not aware of :slight_smile:


From: Michael Kiefte mkiefte@dal.ca
To: messages@vassalengine.org
Sent: Tue, March 22, 2011 8:47:46 AM
Subject: Re: [messages] [Module Design] Custom Java class maintainers

That will likely have consequences for the ADC2 import code. Have you done
a search for this in the branch?

And why do we need to change this?

  • M.

On 20 March 2011 16:57, bobd bob__davison@hotmail.com wrote:

Calling all Vassal module maintainers who have custom Java classes in
their modules, there is a bug fix in the next Vassal release that could
affect your custom Java code.

The behaviour of

Code:
new SequenceEncoder(null, delimiter);

has changed. If you use this constructor with an explicit null it
should be changed to

Code:
new SequenceEncoder(delimiter);

You can make this change now as the two calls behave identically in the
current Vassal release.
If you have code that relies on

Code:
new SequenceEncoder(var, delimiter);

to create an empty sequence when var is null then you will have to
modify your code as this will no longer hold true in future Vassal
releases (a sequence with one token of “” will be created).
Thanks,
Bob


Read this topic online here:
Custom Java class maintainers


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

All of the Vassal code has been checked.

currently new SequencerEncoder(val1, delim).append(val2) will create two tokens if val1 is not null but only one if val1 is null. When this happens decoders unexpectedly run out of tokens, this has caused quite a few bugs reports in the tracker (see bug 3465)

Bob

Okay, thanks. I’ve checked everything I’ve got, and I’m good. The good
news is that I’ve never, ever done that.

  • M.

On 22 March 2011 16:27, bobd bob__davison@hotmail.com wrote:

“mkiefte” wrote:

That will likely have consequences for the ADC2 import code. Have you
done
a search for this in the branch?

All of the Vassal code has been checked.

“mkiefte” wrote:

And why do we need to change this?

currently new SequencerEncoder(val1, delim).append(val2) will create two
tokens if val1 is not null but only one if val1 is null. When this
happens decoders unexpectedly run out of tokens, this has caused quite a
few bugs reports in the tracker (see bug 3465)

Bob