# Eliminating uses of deprecated code in VASL6.6.2

**URL:** <https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549>\
**Category:** Module Discussion\
**Created:** [January 14, 2021, 8:46pm UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549 "2021-01-14T20:46:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![drimmer](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@drimmer](https://forum.vassalengine.org/u/drimmer)\
**Post date:** [January 14, 2021, 8:46pm UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549/1 "2021-01-14T20:46:05Z")

</div>

I now have VASL6.6.2 working on VASSAL3.5.0-beta2. I see some additional references to deprecated code when I build with maven.

I am going to start eliminating those. A large number relate to the boardPicker classes in VASL and I will need some help there. I have discussed this previously with Joel on Github. In particular, we are having a problem with the getImageSize() function. Joel wrote: “I see what the problem is in Overlay: It looks like you’re reading the overlay images from a file which isn’t the module file. I hadn’t known you were doing that. This is going to require some thought about how to proceed. I may need to make some additions to how image loading works in VASSAL to accommodate this.” Any suggestions on how to proceed yet?

---

<div class="post-metadata">

**Author:** ![drimmer](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@drimmer](https://forum.vassalengine.org/u/drimmer)\
**Post date:** [January 14, 2021, 9:01pm UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549/2 "2021-01-14T21:01:36Z")

</div>

In addition, VASL includes a number of references to VASSAL.tools.io.IOUtils which has been deprecated and marked for removal. On looking at the class in VASSAL3.5.0-beta2, there is no indication as to an alternate class which should be used instead?

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [January 14, 2021, 10:25pm UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549/3 "2021-01-14T22:25:23Z")

</div>

Thus spake drimmer:

> In addition, VASL includes a number of references to  
> VASSAL.tools.io.IOUtils which has been deprecated and marked for  
> removal. On looking at the class in VASSAL3.5.0-beta2, there is no  
> indication as to an alternate class which should be used instead?

Use org.apache.commons.io.IOUtils.

VASSAL.tools.io.IOUtils subclassed that. It’s likely you’ll need to  
adjust only the import.

–  
J.

---

<div class="post-metadata">

**Author:** ![drimmer](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@drimmer](https://forum.vassalengine.org/u/drimmer)\
**Post date:** [January 15, 2021, 4:19am UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549/4 "2021-01-15T04:19:37Z")

</div>

> [@uckelman](#):
>
> Use org.apache.commons.io.IOUtils.
> 
> VASSAL.tools.io.IOUtils subclassed that. It’s likely you’ll need to  
> adjust only the import.
> 
> –  
> J.

That seems to work. The methods in org.apache.commons.io.IOUtils are themselves deprecated but are not marked for removal so we should be ok for a while at least.

There were about half a dozen VASL classes using VASSAL.tools.io.IOUTILS. I have replaced all the imports with org.apache.commons.io.IOUtils and VASL is building and running ok so far. Maven is showing a small number of methods marked deprecated and marked for removal in the VASL build. Mainly getImageSize, getImageInputStream, and getCurrentImage() in VASSAL.counters.Embellishment.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [January 24, 2021, 10:23pm UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549/5 "2021-01-24T22:23:42Z")

</div>

I gather everything is sorted now, following my replies on GitHub?

---

<div class="post-metadata">

**Author:** ![drimmer](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@drimmer](https://forum.vassalengine.org/u/drimmer)\
**Post date:** [January 25, 2021, 1:41pm UTC](https://forum.vassalengine.org/t/eliminating-uses-of-deprecated-code-in-vasl6-6-2/11549/6 "2021-01-25T13:41:58Z")

</div>

> [@uckelman](#):
>
> I gather everything is sorted now, following my replies on GitHub?

Yes. Thanks for the help.
