File tree Expand file tree Collapse file tree 6 files changed +8
-10
lines changed
main/java/ru/bozaro/gitlfs/common
test/java/ru/bozaro/gitlfs/common/data Expand file tree Collapse file tree 6 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ tasks.wrapper {
15
15
plugins {
16
16
id(" com.github.ben-manes.versions" ) version " 0.21.0"
17
17
id(" de.marcphilipp.nexus-publish" ) version " 0.2.0" apply false
18
- id(" io.codearte.nexus-staging" ) version " 0.20 .0"
18
+ id(" io.codearte.nexus-staging" ) version " 0.21 .0"
19
19
idea
20
20
}
21
21
Original file line number Diff line number Diff line change 1
1
description = " Java Git-LFS common structures"
2
2
3
3
dependencies {
4
- compile(" com.fasterxml.jackson.core:jackson-databind:2.9.8 " )
4
+ compile(" com.fasterxml.jackson.core:jackson-databind:2.9.9 " )
5
5
}
Original file line number Diff line number Diff line change 6
6
import com .fasterxml .jackson .databind .DeserializationFeature ;
7
7
import com .fasterxml .jackson .databind .ObjectMapper ;
8
8
import com .fasterxml .jackson .databind .SerializationFeature ;
9
- import com .fasterxml .jackson .databind .util .ISO8601DateFormat ;
9
+ import com .fasterxml .jackson .databind .util .StdDateFormat ;
10
10
import org .jetbrains .annotations .NotNull ;
11
11
12
12
import java .text .DateFormat ;
17
17
* Json utility class.
18
18
*
19
19
* @author Artem V. Navrotskiy
20
- * @author Marat Radchenko <marat@slonopootamus .org>
20
+ * @author Marat Radchenko <marat@slonopotamus .org>
21
21
*/
22
22
public final class JsonHelper {
23
23
24
24
/**
25
- * git-lfs is broken and doesn't properly parse output of {@link com.fasterxml.jackson.databind.util.StdDateFormat}.
25
+ * git-lfs cannot parse timezone without colon: {@link com.fasterxml.jackson.databind.util.StdDateFormat}.
26
26
* <p/>
27
27
* See https://github.com/git-lfs/git-lfs/issues/3660
28
28
*/
29
29
@ NotNull
30
- public static final DateFormat dateFormat = new ISO8601DateFormat ( );
30
+ public static final DateFormat dateFormat = StdDateFormat . instance . withColonInTimeZone ( true );
31
31
32
32
@ NotNull
33
33
public static final ObjectMapper mapper = new ObjectMapper ();
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public final class DateTest {
10
10
11
11
@ Test
12
12
public void format () throws ParseException {
13
- final String str = "2006-01-02T15:04:05Z " ;
13
+ final String str = "2006-01-02T15:04:05.123+00:00 " ;
14
14
Assert .assertEquals (JsonHelper .dateFormat .format (JsonHelper .dateFormat .parse (str )), str );
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ dependencies {
5
5
compile(" javax.servlet:javax.servlet-api:4.0.1" )
6
6
7
7
testCompile(project(" :gitlfs-client" ))
8
- testCompile(" org.eclipse.jetty:jetty-servlet:9.4.15.v20190215 " )
8
+ testCompile(" org.eclipse.jetty:jetty-servlet:9.4.18.v20190429 " )
9
9
testRuntimeOnly(" org.slf4j:slf4j-simple:1.7.26" )
10
10
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments