wstrange / GoogleAuth

Google Authenticator Server side code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java 6

twankogels opened this issue · comments

Hi @wstrange

Is it possible to support java 6?
This library currently is compiled with java 7 (see pom.xml 1.7)
I looked in the source code and saw a few java 7 code constructs (about 8 or 9):

  • a few empty <> for example new ArrayList<>() this should be easily converted to new ArrayList<Integer>()
  • underscore in number, removing underscore makes it compatible with java 6.

Dependency httpclient supports java6 if i'm correct.

Hope you consider it.

Hi @twankogels,

Java 6 is more than 10 years old and not even available for download from Oracle since January 2016. Is it really worth the trouble doing this now? I don't think so.

Also, what's the problem exactly? Not being able to modify the code because you use a Java 6 compiler or not being able to execute the library?

A possible solution could be cross-compiling, but it needs testing and, most importantly, nobody asked for this.

Hi @wstrange

We are currently still stuck on java6. I can indeed do it myself, it's not that much work, problem here is maintenance. When you or another contributor changes something, for example fix a bug, in this library than i need to download the library again and make my changes again so that it runs on java6.

Looking at the source code i did see only a few java 7 constructs. If you need it i can give you the changes to make it compatible with java6? (i need to do it anyway)

Note that java6 is still supported and updated/patched by oracle through the advanced java program, although i must admit this is not often used by many people.

Either way thanks for the library!

Look it the other way round: you are asking me (and you currently are the only one asking for it) to support so old a language level. That implies for me to install that JDK, develop with it and perform tests with it. It's not just a few java constructs, it's a change that comes with a price.

(As far as Oracle advanced java program is concerned: yeah, let's not use that as an argument in favour of the backport since numbers talk here: nobody's asking for backporting this library, and I foresee typical users of this library probably don't even know what that is.)

No harm done, it was just a request. You are the author of the library and know what the internal consequences are of such a change. If it is too much work i wouldn't do it either, i only looked at the library source code.
I can do the changes, which aren't many as i noted, in a copy of the library.
For maintenance it is more difficult but I'm already happy about the existence of this library.