Skip to content

Commit

Permalink
Merge pull request #501 from okta/ak_upgrade_to_jdk17
Browse files Browse the repository at this point in the history
prepare for 4.0.0 release
  • Loading branch information
arvindkrishnakumar-okta authored Aug 20, 2024
2 parents 5d26ab9 + e12cf6d commit c938ebc
Show file tree
Hide file tree
Showing 20 changed files with 489 additions and 434 deletions.
18 changes: 1 addition & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,7 @@ aliases:
- run: ./mvnw clean install -Pci

jobs:

jdk8:
docker:
- image: cimg/openjdk:8.0.402
environment:
JVM_OPTS: -Xmx3200m
steps: *build_steps

jdk11:
docker:
- image: cimg/openjdk:11.0.22
environment:
JVM_OPTS: -Xmx3200m
steps: *build_steps


jdk17:
docker:
- image: cimg/openjdk:17.0.11
Expand All @@ -49,8 +35,6 @@ jobs:
workflows:
"Circle CI Tests":
jobs:
- jdk8
- jdk11
- jdk17
- general-platform-helpers/job-semgrep-scan:
name: "Scan with Semgrep"
Expand Down
Binary file modified .mvn/wrapper/maven-wrapper.jar
100755 → 100644
Binary file not shown.
30 changes: 18 additions & 12 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#
# Copyright 2020-Present Okta, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=bin
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If you run into problems using the SDK, you can

### Prerequisites

- [JDK 8][jdk-8] or [JDK 11][jdk-11]
- [JDK 17][jdk-17] or later
- [Apache Maven][apache-maven] 3.6.x or later

To use this SDK, you will need to include the following dependencies:
Expand Down Expand Up @@ -324,8 +324,7 @@ We are happy to accept contributions and PRs! Please see the [contribution guide
[github-issues]: https://github.com/okta/okta-idx-java/issues
[github-releases]: https://github.com/okta/okta-idx-java/releases
[okta-library-versioning]: https://developer.okta.com/code/library-versions
[jdk-8]: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
[jdk-11]: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
[jdk-17]: https://www.oracle.com/java/technologies/downloads/#java17
[java-samples]: https://github.com/okta/okta-idx-java/tree/master/samples
[apache-maven]: https://maven.apache.org/download.cgi
[okta-identity-engine]: https://developer.okta.com/docs/guides/oie-intro/
Expand Down
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.okta.idx.sdk</groupId>
<artifactId>okta-idx-java-root</artifactId>
<version>3.0.8-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<artifactId>okta-idx-java-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public Map<String, String> parse(String source) {

@Override
public Map<String, String> parse(Resource resource) throws IOException {
InputStream is = resource.getInputStream();
Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name());
Scanner scanner;
try (InputStream is = resource.getInputStream()) {
scanner = new Scanner(is, StandardCharsets.UTF_8.name());
}
return parse(scanner);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ public YAMLPropertiesSource(Resource resource) {
@SuppressWarnings("unchecked")
public Map<String, String> getProperties() {
try {
InputStream in = resource.getInputStream();
// check to see if file exists
if (in != null) { // if we have a yaml file.
if (Classes.isAvailable("org.yaml.snakeyaml.Yaml")) {
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
Map config = yaml.load(in);
return getFlattenedMap(config);
} else {
log.warn("YAML not found in classpath, add 'org.yaml.snakeyaml' to support YAML configuration");
try (InputStream in = resource.getInputStream()) {
// check to see if file exists
if (in != null) { // if we have a yaml file.
if (Classes.isAvailable("org.yaml.snakeyaml.Yaml")) {
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
Map config = yaml.load(in);
return getFlattenedMap(config);
} else {
log.warn("YAML not found in classpath, add 'org.yaml.snakeyaml' to support YAML configuration");
}
}
}
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public String toString() {
static Map<String, AuthenticatorType> reverseLookupMap = new HashMap<>();

static {
AuthenticatorType[] values = AuthenticatorType.values();
AuthenticatorType[] values = values();

for (AuthenticatorType val : values) {
reverseLookupMap.put(val.getValue(), val);
Expand Down
2 changes: 1 addition & 1 deletion coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.okta.idx.sdk</groupId>
<artifactId>okta-idx-java-root</artifactId>
<version>3.0.8-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<artifactId>okta-idx-java-coverage</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.okta.idx.sdk</groupId>
<artifactId>okta-idx-java-root</artifactId>
<version>3.0.8-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<artifactId>okta-idx-java-integration-tests</artifactId>
Expand Down
Loading

0 comments on commit c938ebc

Please sign in to comment.