Skip to content

Commit 6bdf644

Browse files
authored
Merge pull request #5 from CycloneDX/master
Merge from upstream
2 parents 4e629e1 + a452407 commit 6bdf644

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
# Initializes the CodeQL tools for scanning.
4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v2
41+
uses: github/codeql-action/init@v3
4242
with:
4343
languages: ${{ matrix.language }}
4444
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -49,7 +49,7 @@ jobs:
4949
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5050
# If this step fails, then you should remove it and run the build manually (see below)
5151
- name: Autobuild
52-
uses: github/codeql-action/autobuild@v2
52+
uses: github/codeql-action/autobuild@v3
5353

5454
# ℹ️ Command-line programs to run using the OS shell.
5555
# 📚 https://git.io/JvXDl
@@ -63,4 +63,4 @@ jobs:
6363
# make release
6464

6565
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@v2
66+
uses: github/codeql-action/analyze@v3

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/[email protected]
1616
- name: Set up JDK 8
17-
uses: actions/setup-java@v3
17+
uses: actions/setup-java@v4
1818
with:
1919
distribution: temurin
2020
java-version: 8

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/[email protected]
1616
- name: Set up JDK ${{ matrix.java-version }}
17-
uses: actions/setup-java@v3
17+
uses: actions/setup-java@v4
1818
with:
1919
distribution: ${{ matrix.distro }}
2020
java-version: ${{ matrix.java-version }}

pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@
8484
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8585
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
8686
<!-- Maven Plugin Versions -->
87-
<maven.cyclonedx.plugin.version>2.7.9</maven.cyclonedx.plugin.version>
88-
<maven.javadoc.plugin.version>3.6.0</maven.javadoc.plugin.version>
87+
<maven.cyclonedx.plugin.version>2.7.10</maven.cyclonedx.plugin.version>
88+
<maven.javadoc.plugin.version>3.6.3</maven.javadoc.plugin.version>
8989
<maven.source.plugin.version>3.3.0</maven.source.plugin.version>
9090
<maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
91-
<maven.github.release.plugin.version>1.4.0</maven.github.release.plugin.version>
91+
<maven.github.release.plugin.version>1.6.0</maven.github.release.plugin.version>
9292
<project.build.outputTimestamp>2023-10-25T16:32:28Z</project.build.outputTimestamp>
9393
</properties>
9494

@@ -166,28 +166,28 @@
166166
<dependency>
167167
<groupId>commons-io</groupId>
168168
<artifactId>commons-io</artifactId>
169-
<version>2.14.0</version>
169+
<version>2.15.1</version>
170170
</dependency>
171171
<dependency>
172172
<groupId>org.apache.commons</groupId>
173173
<artifactId>commons-lang3</artifactId>
174-
<version>3.13.0</version>
174+
<version>3.14.0</version>
175175
</dependency>
176176

177177
<!-- Package URL -->
178178

179179
<dependency>
180180
<groupId>com.github.package-url</groupId>
181181
<artifactId>packageurl-java</artifactId>
182-
<version>1.4.1</version>
182+
<version>1.5.0</version>
183183
</dependency>
184184

185185
<!-- XML Parser, Generator, JSON Parser -->
186186

187187
<dependency>
188188
<groupId>com.fasterxml.jackson.dataformat</groupId>
189189
<artifactId>jackson-dataformat-xml</artifactId>
190-
<version>2.15.3</version>
190+
<version>2.16.1</version>
191191
</dependency>
192192

193193
<!-- JSON Schema library -->
@@ -210,7 +210,7 @@
210210
<dependency>
211211
<groupId>org.junit.jupiter</groupId>
212212
<artifactId>junit-jupiter-engine</artifactId>
213-
<version>5.10.0</version>
213+
<version>5.10.1</version>
214214
<scope>test</scope>
215215
</dependency>
216216
</dependencies>
@@ -291,7 +291,7 @@
291291
<plugin>
292292
<groupId>org.apache.maven.plugins</groupId>
293293
<artifactId>maven-surefire-plugin</artifactId>
294-
<version>3.2.1</version>
294+
<version>3.2.2</version>
295295
</plugin>
296296
</plugins>
297297
</pluginManagement>

src/main/java/org/cyclonedx/util/LicenseResolver.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
public final class LicenseResolver {
3434

35+
private static LicenseList licenses;
36+
3537
/**
3638
* Private constructor.
3739
*/
@@ -101,9 +103,11 @@ static LicenseChoice resolve(final String licenseString, final LicenseTextSettin
101103
private static LicenseChoice resolveLicenseString(String licenseString, LicenseTextSettings licenseTextSettings, final ObjectMapper mapper)
102104
throws IOException
103105
{
104-
final InputStream is = LicenseResolver.class.getResourceAsStream("/licenses/licenses.json");
106+
if (licenses == null) {
107+
final InputStream is = LicenseResolver.class.getResourceAsStream("/licenses/licenses.json");
105108

106-
final LicenseList licenses = mapper.readValue(is, LicenseList.class);
109+
licenses = mapper.readValue(is, LicenseList.class);
110+
}
107111

108112
if (licenses != null && licenses.licenses != null && !licenses.licenses.isEmpty()) {
109113
for (LicenseDetail licenseDetail : licenses.licenses) {

0 commit comments

Comments
 (0)