Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not support Java 19 #406

Open
lancehudson opened this issue Nov 1, 2022 · 0 comments
Open

Does not support Java 19 #406

lancehudson opened this issue Nov 1, 2022 · 0 comments

Comments

@lancehudson
Copy link

Describe the bug
Does not support Java 19

To Reproduce
Steps to reproduce the behavior:

java -classpath ../okta-aws-cli-3.0.0.jar com.okta.tools.WithOkta aws sts get-caller-identity

Returns

Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.okta.tools.OktaAwsConfig.runProgram(OktaAwsConfig.java:91)
	at com.okta.tools.OktaAwsConfig.lambda$deferProgram$2(OktaAwsConfig.java:86)
	at com.okta.tools.authentication.OktaAuthentication.getPassword(OktaAuthentication.java:169)
	at com.okta.tools.authentication.OktaAuthentication.getPrimaryAuthResponse(OktaAuthentication.java:127)
	at com.okta.tools.authentication.OktaAuthentication.getOktaSessionToken(OktaAuthentication.java:51)
	at com.okta.tools.saml.OktaSaml.getSamlResponse(OktaSaml.java:47)
	at com.okta.tools.OktaAwsCliAssumeRole.doRequest(OktaAwsCliAssumeRole.java:132)
	at com.okta.tools.OktaAwsCliAssumeRole.run(OktaAwsCliAssumeRole.java:102)
	at com.okta.tools.WithOkta.main(WithOkta.java:28)
Caused by: java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 2
	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
	at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602)
	at java.base/java.lang.String.substring(String.java:2715)
	at org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:1133)
	at org.apache.commons.lang.SystemUtils.<clinit>(SystemUtils.java:818)
	... 9 more

when using

openjdk version "19" 2022-09-20
OpenJDK Runtime Environment Homebrew (build 19)
OpenJDK 64-Bit Server VM Homebrew (build 19, mixed mode, sharing)

Expected behavior
Not Error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant