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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 206cae7d3839c48e0d5463c12143a602de77d3fa
4
- data.tar.gz: 2d7215927a470c9ba7540970057b81365a975dd9
3
+ metadata.gz: ed0415e9a36b04db434dd09b655ac159ce062b2a
4
+ data.tar.gz: 868028f5e59ddaf23771a962b635ecc34c344f28
5
5
  SHA512:
6
- metadata.gz: d98845cbb8c6d71a464430c6758674fcbb68af5d632723be2289b07f3b69991b0074a1dbbeaa445fa7e4a1a171aa9a3e5b962df4670fb88ec32883348d5eb6f9
7
- data.tar.gz: d499db32c291a9abc349ea3b0969fb32eea164f06723323167aa9529cd9c2abfbf6135a275439da3d8597687525ff568f7133864674bd553d039be92cf58e407
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
@@ -17,7 +17,7 @@ configurations {
17
17
  sourceCompatibility = 1.7
18
18
  targetCompatibility = 1.7
19
19
 
20
- version = "0.2.3"
20
+ version = "0.2.4"
21
21
 
22
22
  dependencies {
23
23
  compile "org.embulk:embulk-core:0.8.2"
@@ -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
- statusCode = ((GoogleJsonResponseException) ex.getCause()).getDetails().getCode();
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.3
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: 2016-08-09 00:00:00.000000000 Z
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.3.jar
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