Create account / Log in

Custom Java class maintainers

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Custom Java class maintainers

Postby bobd » March 20th, 2011, 7:57 pm

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: Select all
new SequenceEncoder(null, delimiter);

has changed. If you use this constructor with an explicit null it should be changed to
Code: Select all
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: Select all
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
bobd
 
Posts: 20
Joined: March 6th, 2011, 11:09 pm

Re: [messages] [Module Design] Custom Java class maintainers

Postby mkiefte » March 22nd, 2011, 1:53 pm

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 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:
> viewtopic.php?p=22307#p22307
> _______________________________________________
> messages mailing list
> messages@vassalengine.org
> http://www.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
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Module Design] Custom Java class maintainers

Postby Tim M » March 22nd, 2011, 2:10 pm

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 :)




________________________________
From: Michael Kiefte
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 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:
>viewtopic.php?p=22307#p22307
>_______________________________________________
>messages mailing list
>messages@vassalengine.org
>http://www.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
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1812
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: [messages] [Module Design] Custom Java class maintainers

Postby mkiefte » March 22nd, 2011, 2:29 pm

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 wrote:

> 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 :)
>
> ------------------------------
> *From:* Michael Kiefte
> *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 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:
>> viewtopic.php?p=22307#p22307
>> _______________________________________________
>> messages mailing list
>> messages@vassalengine.org
>> http://www.vassalengine.org/mailman/listinfo/messages
>>
>>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Module Design] Custom Java class maintainers

Postby bobd » March 22nd, 2011, 7:27 pm

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
bobd
 
Posts: 20
Joined: March 6th, 2011, 11:09 pm

Re: [messages] [Module Design] Re: [Module Design] Custom Ja

Postby mkiefte » March 22nd, 2011, 8:03 pm

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 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
>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada


Return to Module Design

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron