Issue when parsing Java version #262

Closed
RyanTheAllmighty opened this Issue Mar 28, 2016 · 8 comments

Projects

Done in ATLauncher

3 participants

@RyanTheAllmighty
Member

As per the post at https://forums.atlauncher.com/thread-13000.html there seems to be an issue parsing some Java verisons:

[27/3/2016 15:56:30 PM] Loading Language: English
[27/3/2016 15:56:30 PM] Loading Language: English
[27/3/2016 15:56:30 PM] ATLauncher Version: 3.2.3.1
[27/3/2016 15:56:30 PM] Operating System: Linux
[27/3/2016 15:56:30 PM] RAM Available: 3943MB
[27/3/2016 15:56:30 PM] Java Version: Launcher: 9-ea, Minecraft: 9-ea
[27/3/2016 15:56:30 PM] Java Path: /usr/lib/jvm/java-9-oracle
[27/3/2016 15:56:30 PM] 64 Bit Java: true
[27/3/2016 15:56:30 PM] Launcher Directory: **USERSDIR**
[27/3/2016 15:56:30 PM] Using Theme: Default Theme by RyanTheAllmighty
[27/3/2016 15:56:30 PM] Showing splash screen and loading everything
[27/3/2016 15:56:30 PM] Checking for updated files!
[27/3/2016 15:56:31 PM] No updates found!
[27/3/2016 15:56:31 PM] Loading external library authlib-1.5.17.jar to classpath
[27/3/2016 15:56:31 PM] Loading external library log4j-api-2.0-beta9.jar to classpath
[27/3/2016 15:56:31 PM] Loading external library log4j-core-2.0-beta9.jar to classpath
[27/3/2016 15:56:31 PM] Loading external library guava-17.0.jar to classpath
[27/3/2016 15:56:31 PM] Loading external library commons-io-2.4.jar to classpath
[27/3/2016 15:56:31 PM] Loading external library commons-lang3-3.3.2.jar to classpath
[27/3/2016 15:56:32 PM] [Background] Checking Minecraft Versions Started
[27/3/2016 15:56:33 PM] Checking account UUID's!
[27/3/2016 15:56:33 PM] Checking For Username Changes
[27/3/2016 15:56:33 PM] Checking For Username Changes Complete
[27/3/2016 15:56:33 PM] For input string: "e"
[27/3/2016 15:56:33 PM] java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
[27/3/2016 15:56:33 PM] java.lang.Integer.parseInt(Integer.java:680)
[27/3/2016 15:56:33 PM] java.lang.Integer.parseInt(Integer.java:798)
[27/3/2016 15:56:33 PM] com.atlauncher.utils.Utils.isJava7OrAbove(Utils.java:1515)
[27/3/2016 15:56:33 PM] com.atlauncher.data.Settings.loadEverything(Settings.java:306)
[27/3/2016 15:56:33 PM] com.atlauncher.App.main(App.java:310)
[27/3/2016 15:56:34 PM] [Background] Checking Minecraft Versions Complete
@RyanTheAllmighty RyanTheAllmighty added this to the v3.2.3.2 milestone Mar 28, 2016
@flaw600
Contributor
flaw600 commented May 24, 2016

According to the post, this was an issue because we don't support Java 9 (as it's unreleased). Is this still a bug then?

@dgelessus
Contributor

@flaw600 @RyanTheAllmighty Just FYI, I have a local copy of the repo with improved code for the Java version parsing, which should be more future-proof (it basically matches the first valid integer and ignores the leading 1. if any). Unfortunately I already have another pull request open and forgot to make a new branch in my local repo, so I'm not sure how to make a new PR without breaking the old one.

@RyanTheAllmighty Don't want to pressure you or anything, but could you quickly look over #267? Then I could make a new PR with the Java version fixes.

@flaw600
Contributor
flaw600 commented May 24, 2016 edited

@dgelessus if you push to the branch that will be merged from in your PR, then whenever @RyanTheAllmighty accepts the PR it should take whatever changes are in that branch at merge time, so you shouldn't have to submit a new PR. That said, I don't remember if I already fixed the parsing problem (I have a vague memory of doing so earlier with a similar method to yours) but I don't recall exactly so could you confirm that this hasn't already been fixed in the official repo? Thanks!

@dgelessus
Contributor

Alright, PR has been submitted: #269

@dgelessus
Contributor

Should this be closed now that the PR is merged? @RyanTheAllmighty

@RyanTheAllmighty
Member

@dgelessus sorry to be a pain but can you backport this to 3.2.3.2 as I don't see 3.3.0.0 ever seeing the light of day

@dgelessus
Contributor

@RyanTheAllmighty I don't have a PC for the next few weeks, sorry. Will have a look when I can though.

@dgelessus dgelessus added a commit to dgelessus/ATLauncher that referenced this issue Aug 25, 2016
@dgelessus dgelessus Backport #267 and #269 to master, closes #262 9ccbde7
@RyanTheAllmighty
Member

Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment