Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,11 +12,12 @@ jobs:
name: Java SDK Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
java-version: 17
distribution: oracle
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
server-id: splunk-artifactory
Expand All@@ -36,7 +37,7 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: java_sdk_docs
path: splunk/target/apidocs
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-latest
java-version:
- 1.8
- 17
splunk-version:
- "8.2"
- "latest"
Expand All@@ -35,14 +35,15 @@ jobs:
- 10668:10668/udp

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: oracle
java-version: 17

- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,8 +9,8 @@
<version.number>1.9.5</version.number>
<maven.resources.overwrite>true</maven.resources.overwrite>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<groupId>com.splunk</groupId>
Expand Down
4 changes: 2 additions & 2 deletions splunk/src/main/java/com/splunk/Args.java
Original file line numberDiff line numberDiff line change
Expand Up@@ -154,8 +154,8 @@ public String encode() {
if (builder.length() > 0) builder.append('&');
String key = entry.getKey();
Object value = entry.getValue();
if (value instanceof String[]) {
encodeValues(builder, key, (String[])value);
if (value instanceof String[] valueInst) {
encodeValues(builder, key, valueInst);
}
else {
builder.append(encode(key));
Expand Down
3 changes: 1 addition & 2 deletions splunk/src/main/java/com/splunk/AtomFeed.java
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,14 +20,13 @@
import java.util.*;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamConstants;

/**
* The {@code AtomFeed} class represents an Atom feed.
*/
public class AtomFeed extends AtomObject {
/** The list of Atom entries contained in this {@code AtomFeed} object. */
public ArrayList<AtomEntry> entries = new ArrayList<AtomEntry>();
public ArrayList<AtomEntry> entries = new ArrayList<>();

/** The value of the Atom feed's {@code <itemsPerPage>} element. */
public String itemsPerPage = null;
Expand Down
2 changes: 1 addition & 1 deletion splunk/src/main/java/com/splunk/AtomObject.java
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,7 +34,7 @@ public class AtomObject {
public String id;

/** The value of the {@code <link>} elements in this {@code AtomObject}. */
public Map<String, String> links = new HashMap<String, String>();
public Map<String, String> links = new HashMap<>();

/** The value of the Atom {@code <title>} element. */
public String title;
Expand Down
Loading