embulk-input-gcs 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/input/gcs/GcsAuthentication.java +11 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed0415e9a36b04db434dd09b655ac159ce062b2a
|
4
|
+
data.tar.gz: 868028f5e59ddaf23771a962b635ecc34c344f28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1d8f6ee7e69eddaad96547196bfd0b193c5c8141323aad8b84945f197fbe2f464feb273f20f7a6da6d978559ff8a3ce0e683e622984e76188a77d0f4ac82a91
|
7
|
+
data.tar.gz: f2c7f5db67082badf48838b6fc4b1af372cc525ca70b5668656e5d9faf8eadf0dbd346f010433a824ad220a8394ee86a5cbc2758f3ef70082e8c6b578340026a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.2.4 - 2017-03-16
|
2
|
+
* [maintenance] Fix possibility to throw NPE when authentication [#25](https://github.com/embulk/embulk-input-gcs/pull/25)
|
3
|
+
|
1
4
|
## 0.2.3 - 2016-08-09
|
2
5
|
* [new feature] Support `incremental` option [#24](https://github.com/embulk/embulk-input-gcs/pull/24)
|
3
6
|
|
data/build.gradle
CHANGED
@@ -133,6 +133,14 @@ public class GcsAuthentication
|
|
133
133
|
if (exception instanceof GoogleJsonResponseException || exception instanceof TokenResponseException) {
|
134
134
|
int statusCode;
|
135
135
|
if (exception instanceof GoogleJsonResponseException) {
|
136
|
+
if (((GoogleJsonResponseException) exception).getDetails() == null) {
|
137
|
+
String content = "";
|
138
|
+
if (((GoogleJsonResponseException) exception).getContent() != null) {
|
139
|
+
content = ((GoogleJsonResponseException) exception).getContent();
|
140
|
+
}
|
141
|
+
log.warn("Invalid response was returned : {}", content);
|
142
|
+
return true;
|
143
|
+
}
|
136
144
|
statusCode = ((GoogleJsonResponseException) exception).getDetails().getCode();
|
137
145
|
}
|
138
146
|
else {
|
@@ -170,7 +178,9 @@ public class GcsAuthentication
|
|
170
178
|
if (ex.getCause() instanceof GoogleJsonResponseException || ex.getCause() instanceof TokenResponseException) {
|
171
179
|
int statusCode = 0;
|
172
180
|
if (ex.getCause() instanceof GoogleJsonResponseException) {
|
173
|
-
|
181
|
+
if (((GoogleJsonResponseException) ex.getCause()).getDetails() != null) {
|
182
|
+
statusCode = ((GoogleJsonResponseException) ex.getCause()).getDetails().getCode();
|
183
|
+
}
|
174
184
|
}
|
175
185
|
else if (ex.getCause() instanceof TokenResponseException) {
|
176
186
|
statusCode = ((TokenResponseException) ex.getCause()).getStatusCode();
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-gcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Akama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- src/test/resources/secretkeys.tar.enc
|
68
68
|
- classpath/commons-codec-1.3.jar
|
69
69
|
- classpath/commons-logging-1.1.1.jar
|
70
|
-
- classpath/embulk-input-gcs-0.2.
|
70
|
+
- classpath/embulk-input-gcs-0.2.4.jar
|
71
71
|
- classpath/google-api-client-1.21.0.jar
|
72
72
|
- classpath/google-api-services-storage-v1-rev59-1.21.0.jar
|
73
73
|
- classpath/google-http-client-1.21.0.jar
|