Skip to content

Commit 25b588d

Browse files
Merge branch 'master' into rl-OKTA-789927
2 parents be224d9 + c938ebc commit 25b588d

20 files changed

Lines changed: 511 additions & 440 deletions

File tree

.circleci/config.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@ aliases:
1111
- run: ./mvnw clean install -Pci
1212

1313
jobs:
14-
15-
jdk8:
16-
docker:
17-
- image: cimg/openjdk:8.0.322
18-
environment:
19-
JVM_OPTS: -Xmx3200m
20-
steps: *build_steps
21-
22-
jdk11:
23-
docker:
24-
- image: cimg/openjdk:11.0.13
25-
environment:
26-
JVM_OPTS: -Xmx3200m
27-
steps: *build_steps
28-
14+
2915
jdk17:
3016
docker:
31-
- image: cimg/openjdk:17.0.4
17+
- image: cimg/openjdk:17.0.11
3218
environment:
3319
JVM_OPTS: -Xmx3200m
3420
steps: *build_steps
3521

22+
snyk-scan:
23+
docker:
24+
- image: cimg/openjdk:17.0.11
25+
steps:
26+
- checkout
27+
- run: ./mvnw clean install -Pci -Dlicense.skip=true -Dmaven.test.skip.exec=true
28+
- general-platform-helpers/step-load-dependencies
29+
- general-platform-helpers/step-run-snyk-monitor:
30+
scan-all-projects: false
31+
skip-unresolved: false
32+
run-on-non-main: true
33+
additional-arguments: "--maven-aggregate-project"
34+
3635
workflows:
37-
build_and_test:
36+
"Circle CI Tests":
3837
jobs:
39-
- jdk8
40-
- jdk11
4138
- jdk17
42-
# See OKTA-624788
43-
semgrep:
44-
jobs:
4539
- general-platform-helpers/job-semgrep-scan:
4640
name: "Scan with Semgrep"
4741
context:
4842
- static-analysis
43+
- snyk-scan:
44+
name: execute-snyk
45+
requires:
46+
- jdk17
47+
context:
48+
- static-analysis

.mvn/wrapper/maven-wrapper.jar

100755100644
14.3 KB
Binary file not shown.
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
#
22
# Copyright 2020-Present Okta, Inc.
33
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
4+
# Licensed to the Apache Software Foundation (ASF) under one
5+
# or more contributor license agreements. See the NOTICE file
6+
# distributed with this work for additional information
7+
# regarding copyright ownership. The ASF licenses this file
8+
# to you under the Apache License, Version 2.0 (the
9+
# "License"); you may not use this file except in compliance
10+
# with the License. You may obtain a copy of the License at
711
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
12+
# http://www.apache.org/licenses/LICENSE-2.0
913
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
14+
# Unless required by applicable law or agreed to in writing,
15+
# software distributed under the License is distributed on an
16+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
# KIND, either express or implied. See the License for the
18+
# specific language governing permissions and limitations
19+
# under the License.
20+
wrapperVersion=3.3.2
21+
distributionType=bin
22+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
23+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If you run into problems using the SDK, you can
5050

5151
### Prerequisites
5252

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

5656
To use this SDK, you will need to include the following dependencies:
@@ -324,8 +324,7 @@ We are happy to accept contributions and PRs! Please see the [contribution guide
324324
[github-issues]: https://github.com/okta/okta-idx-java/issues
325325
[github-releases]: https://github.com/okta/okta-idx-java/releases
326326
[okta-library-versioning]: https://developer.okta.com/code/library-versions
327-
[jdk-8]: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
328-
[jdk-11]: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
327+
[jdk-17]: https://www.oracle.com/java/technologies/downloads/#java17
329328
[java-samples]: https://github.com/okta/okta-idx-java/tree/master/samples
330329
[apache-maven]: https://maven.apache.org/download.cgi
331330
[okta-identity-engine]: https://developer.okta.com/docs/guides/oie-intro/

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>com.okta.idx.sdk</groupId>
2323
<artifactId>okta-idx-java-root</artifactId>
24-
<version>3.0.8-SNAPSHOT</version>
24+
<version>4.0.0-SNAPSHOT</version>
2525
</parent>
2626

2727
<artifactId>okta-idx-java-api</artifactId>

api/src/main/java/com/okta/idx/sdk/api/config/DefaultPropertiesParser.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ public Map<String, String> parse(String source) {
4545

4646
@Override
4747
public Map<String, String> parse(Resource resource) throws IOException {
48-
InputStream is = resource.getInputStream();
49-
Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name());
48+
Scanner scanner;
49+
try (InputStream is = resource.getInputStream()) {
50+
scanner = new Scanner(is, StandardCharsets.UTF_8.name());
51+
}
5052
return parse(scanner);
5153
}
5254

api/src/main/java/com/okta/idx/sdk/api/config/YAMLPropertiesSource.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ public YAMLPropertiesSource(Resource resource) {
4646
@SuppressWarnings("unchecked")
4747
public Map<String, String> getProperties() {
4848
try {
49-
InputStream in = resource.getInputStream();
50-
// check to see if file exists
51-
if (in != null) { // if we have a yaml file.
52-
if (Classes.isAvailable("org.yaml.snakeyaml.Yaml")) {
53-
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
54-
Map config = yaml.load(in);
55-
return getFlattenedMap(config);
56-
} else {
57-
log.warn("YAML not found in classpath, add 'org.yaml.snakeyaml' to support YAML configuration");
49+
try (InputStream in = resource.getInputStream()) {
50+
// check to see if file exists
51+
if (in != null) { // if we have a yaml file.
52+
if (Classes.isAvailable("org.yaml.snakeyaml.Yaml")) {
53+
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
54+
Map config = yaml.load(in);
55+
return getFlattenedMap(config);
56+
} else {
57+
log.warn("YAML not found in classpath, add 'org.yaml.snakeyaml' to support YAML configuration");
58+
}
5859
}
5960
}
6061
} catch (IOException e) {

api/src/main/java/com/okta/idx/sdk/api/model/AuthenticatorType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public String toString() {
5050
static Map<String, AuthenticatorType> reverseLookupMap = new HashMap<>();
5151

5252
static {
53-
AuthenticatorType[] values = AuthenticatorType.values();
53+
AuthenticatorType[] values = values();
5454

5555
for (AuthenticatorType val : values) {
5656
reverseLookupMap.put(val.getValue(), val);

coverage/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>com.okta.idx.sdk</groupId>
2323
<artifactId>okta-idx-java-root</artifactId>
24-
<version>3.0.8-SNAPSHOT</version>
24+
<version>4.0.0-SNAPSHOT</version>
2525
</parent>
2626

2727
<artifactId>okta-idx-java-coverage</artifactId>

0 commit comments

Comments
 (0)