Skip to content

Commit dbde868

Browse files
author
Shakeel
committed
Release 1.6.3
2 parents b28d52d + 9db2128 commit dbde868

File tree

7 files changed

+39
-26
lines changed

7 files changed

+39
-26
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Build Status](https://travis-ci.org/splunk/splunk-sdk-java.svg?branch=master)](https://travis-ci.org/splunk/splunk-sdk-java)
22
# The Splunk Software Development Kit for Java
33

4-
#### Version 1.6.2
4+
#### Version 1.6.3
55

66
The Splunk Software Development Kit (SDK) for Java contains library code and
77
examples designed to enable developers to build applications using Splunk.
@@ -88,7 +88,7 @@ To add the Splunk SDK for Java `.JAR` file as a dependency:
8888
<repository>
8989
<id>splunk-artifactory</id>
9090
<name>Splunk Releases</name>
91-
<url>http://splunk.artifactoryonline.com/splunk/ext-releases-local</url>
91+
<url>http://splunk.jfrog.io/splunk/ext-releases-local</url>
9292
</repository>
9393
</repositories>
9494
```
@@ -101,7 +101,7 @@ To add the Splunk SDK for Java `.JAR` file as a dependency:
101101
<dependency>
102102
<groupId>com.splunk</groupId>
103103
<artifactId>splunk</artifactId>
104-
<version>1.5.0.0</version>
104+
<version>1.6.3.0</version>
105105
</dependency>
106106
</dependencies>
107107
```

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<project name="splunk-sdk-java" basedir="." default="dist" xmlns:jacoco="antlib:org.jacoco.ant"
2020
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="antlib:org.jacoco.ant ">
21-
<property name="version.number" value="1.6.2"/>
21+
<property name="version.number" value="1.6.3"/>
2222

2323
<!-- Paths within the repository that are referenced
2424
multiple times. -->

deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare -r scriptDirectory="$(dirname $(readlink -e $0))"
44
declare -r scriptName="$(basename $0)"
5-
declare -r version="1.6.2"
5+
declare -r version="1.6.3"
66

77
if [[ $# -ne 1 ]]; then
88
echo 1>&2 "Usage: ${scriptName} {local|staging||production}"

deploy.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ deploy \<repository-name>
99

1010
##DESCRIPTION
1111

12-
Deploy transmits **dist/splunk-1.6.2.jar**, **dist/splunk-1.6.2-javadoc.jar**, and
13-
**dist/splunk-1.6.2-sources.jar** to the **local**, **staging**, or **production**
12+
Deploy transmits **dist/splunk-1.6.3.jar**, **dist/splunk-1.6.3-javadoc.jar**, and
13+
**dist/splunk-1.6.3-sources.jar** to the **local**, **staging**, or **production**
1414
maven repository. Repository names are mapped to locations as follows.
1515

1616
| repository-name | location |
@@ -21,18 +21,18 @@ maven repository. Repository names are mapped to locations as follows.
2121

2222
After deployment you should find this tree structure at the location of your repository
2323

24-
com/splunk/splunk/1.6.2/
25-
├── splunk-1.6.2-javadoc.jar
26-
├── splunk-1.6.2-javadoc.jar.md5
27-
├── splunk-1.6.2-javadoc.jar.sha1
28-
├── splunk-1.6.2-sources.jar
29-
├── splunk-1.6.2-sources.jar.md5
30-
├── splunk-1.6.2-sources.jar.sha1
31-
├── splunk-1.6.2.jar
32-
├── splunk-1.6.2.jar.md5
33-
├── splunk-1.6.2.jar.sha1
34-
├── splunk-1.6.2.pom
35-
├── splunk-1.6.2.pom.md5
36-
└── splunk-1.6.2.pom.sha1
24+
com/splunk/splunk/1.6.3/
25+
├── splunk-1.6.3-javadoc.jar
26+
├── splunk-1.6.3-javadoc.jar.md5
27+
├── splunk-1.6.3-javadoc.jar.sha1
28+
├── splunk-1.6.3-sources.jar
29+
├── splunk-1.6.3-sources.jar.md5
30+
├── splunk-1.6.3-sources.jar.sha1
31+
├── splunk-1.6.3.jar
32+
├── splunk-1.6.3.jar.md5
33+
├── splunk-1.6.3.jar.sha1
34+
├── splunk-1.6.3.pom
35+
├── splunk-1.6.3.pom.md5
36+
└── splunk-1.6.3.pom.sha1
3737

3838
Verify this structure prior to release.

splunk/com/splunk/HttpService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public boolean verify(String s, SSLSession sslSession) {
7373
private String prefix = null;
7474

7575
static Map<String, String> defaultHeader = new HashMap<String, String>() {{
76-
put("User-Agent", "splunk-sdk-java/1.6.2");
76+
put("User-Agent", "splunk-sdk-java/1.6.3");
7777
put("Accept", "*/*");
7878
}};
7979

splunk/com/splunk/Resource.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package com.splunk;
1818

19-
19+
import java.util.Date;
2020
import java.util.Map;
2121

2222
/**
@@ -35,6 +35,7 @@ public abstract class Resource {
3535
/* Initialized by {@link #load()}. */
3636
protected Map<String, String> actions;
3737
protected String title;
38+
protected Date updated;
3839
private boolean maybeValid = false;
3940

4041
/**
@@ -128,6 +129,16 @@ public String getTitle() {
128129
return validate().title;
129130
}
130131

132+
/**
133+
* Return the last updated time of this resource, which corresponds to the Atom
134+
* {@code <updated>} element.
135+
*
136+
* @return The resource last updated time.
137+
*/
138+
public Date getUpdated() {
139+
return validate().updated;
140+
}
141+
131142
/**
132143
* Marks the local state of this resource as no longer current.
133144
*
@@ -152,6 +163,7 @@ Resource load(AtomObject value) {
152163
else {
153164
this.actions = value.links;
154165
this.title = value.title;
166+
this.updated = Value.toDate(value.updated);
155167
}
156168
this.maybeValid = true;
157169
return this;

splunk/com/splunk/Value.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ else if (value.endsWith("GB"))
8282
*/
8383
static Date toDate(String value) {
8484
if (dateFormat == null) {
85-
dateFormat = new SimpleDateFormat[4];
85+
dateFormat = new SimpleDateFormat[6];
8686
dateFormat[0] = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
8787
dateFormat[0].setLenient(true);
8888
dateFormat[1] = new SimpleDateFormat("E MMM d HH:mm:ss z y");
@@ -91,16 +91,17 @@ static Date toDate(String value) {
9191
dateFormat[2].setLenient(true);
9292
dateFormat[3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
9393
dateFormat[3].setLenient(true);
94+
dateFormat[4] = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
95+
dateFormat[4].setLenient(true);
96+
dateFormat[5] = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
97+
dateFormat[5].setLenient(true);
9498
}
9599
if (datePattern == null) {
96100
String pattern = "(.*)\\.\\d+([\\-+]\\d+):(\\d+)";
97101
datePattern = Pattern.compile(pattern);
98102
}
99103

100104
for (SimpleDateFormat simpleDateFormat: dateFormat) {
101-
// Must first remove the colon (':') from the timezone
102-
// field, or SimpleDataFormat will not parse correctly.
103-
// Eg: 2010-01-01T12:00:00+01:00 => 2010-01-01T12:00:00+0100
104105
try {
105106

106107
Matcher matcher = datePattern.matcher(value);

0 commit comments

Comments
 (0)