okta / okta-sdk-java

A Java SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Apache License 2.0
149 stars 135 forks source link

Scala Compilation Issue #1572

Open parkerirving45 opened 1 month ago

parkerirving45 commented 1 month ago

Describe the bug?

On any version greater than 13.0.2 I get this compilation issue

[error]   bad constant pool index: 0 at pos: 1942
[error]      while compiling: /Staff.scala
[error]         during phase: globalPhase=typer, enteringPhase=parser
[error]      library version: version 2.12.16
[error]     compiler version: version 2.12.16
[error] == Source file context for tree position ==
[error] 
[error]     28         case _ => EmploymentType.Contigent;
[error]     29       },
[error]     30       managerEmail = user.getProfile.getManager,
[error]     31       employmentStatus = user.getStatus.toString match {
[error]     32         case "ACTIVE" => EmploymentStatus.Active;
[error]     33         case "DEPROVISIONED" => EmploymentStatus.Deprovisioned;
[error]     34         case "PROVISIONED" => EmploymentStatus.Provisioned;

I am on scala version 2.12 and using Java 11.0.18. In the docs it mentions you need to use Java 11+ which I am using. The compilation issue goes away if I remove any calls to UserStatus or getStatus when on version 19.0.2. It also goes away when I run version 13.0.2.

What is expected to happen?

Should compile successfully

What is the actual behavior?

Compilation fails with error above

Reproduction Steps?

Run a scala sbt project on scala 2.12 and java version 11 and then try and access User.getStatus

Additional Information?

No response

Java Version

11.0.18

SDK Version

19.0.2

OS version

No response

arvindkrishnakumar-okta commented 3 weeks ago

Could this be an IDE thing? which IDE are you using and can you refresh the dependencies and try reloading the project?

parkerirving45 commented 3 weeks ago

Could this be an IDE thing? which IDE are you using and can you refresh the dependencies and try reloading the project?

This is happening when running sbt compile from the command line not within an IDE