[Yanel-dev] Migrating from Java 8 to Java 9 - Base 64
Michael Wechner
michael.wechner at wyona.com
Mon Mar 5 09:02:39 EST 2018
Dear Balz
Am 05.03.18 um 10:18 schrieb basZero:
> Dear Michael,
>
> sounds good, but can you explain the reason why you upgrade to Java 9?
> I think it only makes sense to upgrade, if you also upgrade to Tomcat
> 9 (see http://tomcat.apache.org/whichversion.html )
Because the laptop of my son is using Java 9 :-)
> If somebody runs Yanel on Tomcat 8, Yanel won't work anymore.
why not? I am not sure anymore whether you mentioned that before, but if
so, can you tell me once again.
>
> In general, I'd appreciate a lot if Yanel would provide a branch for
> each tomcat version.
> The master branch will still (as today) contain the very latest code
> and yanel users can choose what they want.
>
> So before you make the upgrade, please create a branch tomcat8 (or
> something like that) so that the current tomcat8 version before your
> upgrade is still easily available in future
The only difference will be the Base64 implementation inside
YanelServlet, so I think it will be backwards compatible.
I will make a branch first anyway and let you know, such that you can
test it as well.
All the best
Michael
>
> Cheers
> Balz
>
> On Sun, Mar 4, 2018 at 1:12 PM, Michael Wechner
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
> Hi
>
> I noticed that Java 9 on Mac does not provide anymore
> sun.misc.BASE64Decoder and that we have to replace it by
> java.util.Base64
>
> - sun.misc.BASE64Decoder dec = new
> sun.misc.BASE64Decoder();
> - String userpassDecoded = new
> String(dec.decodeBuffer(userpassEncoded));
> + //sun.misc.BASE64Decoder dec = new
> sun.misc.BASE64Decoder();
> + //String userpassDecoded = new
> String(dec.decodeBuffer(userpassEncoded));
> + // TODO: Migrate to java.util.Base64
> + java.util.Base64.Decoder decoder =
> java.util.Base64.getMimeDecoder();
> + String userpassDecoded = new
> String(decoder.decode(userpassEncoded));
>
> I am currently testing this and if successful, would like to replace
> it...also see
>
> https://stackoverflow.com/questions/35301409/migrating-from-sun-misc-base64-to-java-8-java-util-base64
> <https://stackoverflow.com/questions/35301409/migrating-from-sun-misc-base64-to-java-8-java-util-base64>
>
> Any objections?
>
> All the best
>
> Michael
> --
> Yanel-development mailing list Yanel-development at wyona.com
> <mailto:Yanel-development at wyona.com>
> http://mx2.wyona.com/cgi-bin/mailman/listinfo/yanel-development
> <http://mx2.wyona.com/cgi-bin/mailman/listinfo/yanel-development>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mx2.wyona.com/pipermail/yanel-development/attachments/20180305/bca90f35/attachment.html>
More information about the Yanel-development
mailing list