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

Default configurations are not loaded from okta.properties resource file #1556

Closed
tdemarchi opened this issue Sep 13, 2024 · 1 comment
Closed
Assignees

Comments

@tdemarchi
Copy link

tdemarchi commented Sep 13, 2024

Describe the bug?

Since version 18.0.0, the default configurations are not loaded from the okta.properties file provided by the library.

The error was introduced in this commit, file impl/src/main/java/com/okta/sdk/impl/config/DefaultPropertiesParser.java, line 49, where it was added a try block to close the input stream, but this close happens before the stream can be read (which is done in the parse() method called right after). If you debug the code, you will notice that inside of the parse() method, the scanner will have an silenced error about the stream being closed.

What is expected to happen?

When instantiating the ApiClient class, the default configurations should be loaded.

What is the actual behavior?

No default configuration is loaded, and if we don't set the configuration, it will be off/zeroed - the in-memoery cache is disabled, and the timeouts are 0 (infinite), for instance.

Reproduction Steps?

Just instantiate the ApiClient.

new Clients.builder()
  .setOrgUrl(orgUrl)
  .setClientCredentials(TokenClientCredentials(clientToken))
  .build()

You will notice that this client does not have in-memory cache and the timeouts are zeroed.

Additional Information?

No response

Java Version

openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)

SDK Version

18.0.0

OS version

No response

@arvindkrishnakumar-okta
Copy link
Contributor

Reverted and fixed this issue - 962f364

Fix will be available in next release 19.0.0

arvindkrishnakumar-okta added a commit that referenced this issue Sep 20, 2024
* Upgrade to OASv3 2024.08.3

* Fix DefaultPropertiesParser resource close issue #1556

* Updated ReadmeSnipppets

* Bump Snakeyaml from 2.2 to 2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants