[jira] [Commented] (JCLOUDS-1581) NullPointerException when parsing Cors object for GCE list buckets request

2021-06-30 Thread Lukasz Rek (Jira)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17372275#comment-17372275
 ] 

Lukasz Rek commented on JCLOUDS-1581:
-

Thank you for fixing this fast. Do you know when this can be released?

> NullPointerException when parsing Cors object for GCE list buckets request
> --
>
> Key: JCLOUDS-1581
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1581
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-blobstore
>Affects Versions: 2.3.0
>Reporter: Lukasz Rek
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: google-cloud-storage
> Fix For: 2.4.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> NullPointerException is thrown when requesting 
> GoogleCloudStorageBlobStore.list for specific buckets.
> Stack trace:
> {code:java}
> java.lang.NullPointerException: Null maxAgeSeconds
>   at 
> org.jclouds.googlecloudstorage.domain.AutoValue_Bucket_Cors.(AutoValue_Bucket_Cors.java:33)
>   at 
> org.jclouds.googlecloudstorage.domain.Bucket$Cors.create(Bucket.java:52)
>   at jdk.internal.reflect.GeneratedMethodAccessor188.invoke(Unknown 
> Source)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>   at 
> com.google.common.reflect.Invokable$MethodInvokable.invokeInternal(Invokable.java:200)
>   at com.google.common.reflect.Invokable.invoke(Invokable.java:101)
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.newInstance(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:227)
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:207)
>   at 
> org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:96)
>   at 
> org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:84)
>   at 
> org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:63)
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:275)
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:187)
>   at 
> org.jclouds.googlecloud.config.ListPageAdapterFactory$ListPageAdapter.readItems(ListPageAdapterFactory.java:73)
>   at 
> org.jclouds.googlecloud.config.ListPageAdapterFactory$ListPageAdapter.read(ListPageAdapterFactory.java:56)
>   at 
> org.jclouds.googlecloud.config.ListPageAdapterFactory$ListPageAdapter.read(ListPageAdapterFactory.java:36)
>   at com.google.gson.Gson.fromJson(Gson.java:932)
>   at com.google.gson.Gson.fromJson(Gson.java:897)
>   at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:56)
>   at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:83)
>   at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:77)
>   at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:62)
>   at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:42)
>   at 
> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
>   at 
> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
>   at 
> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
>   at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
>   at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86)
>   at com.sun.proxy.$Proxy231.listBucket(Unknown Source)
>   at 
> org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.list(GoogleCloudStorageBlobStore.java:119)
>  {code}
>  
> Bucket that is causing exception has following configuration (i removed ids 
> from json):
> {code:java}
> {
>   "kind": "storage#bucket",
>   "selfLink": "",
>   "id": "",
>   "name": "",
>   "projectNumber": "",
>   "metageneration": "1",
>   "location": "US-CENTRAL1",
>   "storageClass": "STANDARD",
>   "etag": "CAE=",
>   "timeCreated": "2020-10-

[jira] [Created] (JCLOUDS-1581) NullPointerException when parsing Cors object for GCE list buckets request

2021-06-29 Thread Lukasz Rek (Jira)
Lukasz Rek created JCLOUDS-1581:
---

 Summary: NullPointerException when parsing Cors object for GCE 
list buckets request
 Key: JCLOUDS-1581
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1581
 Project: jclouds
  Issue Type: Bug
  Components: jclouds-blobstore
Affects Versions: 2.3.0
Reporter: Lukasz Rek


NullPointerException is thrown when requesting GoogleCloudStorageBlobStore.list 
for specific buckets.

Stack trace:
{code:java}
java.lang.NullPointerException: Null maxAgeSeconds
at 
org.jclouds.googlecloudstorage.domain.AutoValue_Bucket_Cors.(AutoValue_Bucket_Cors.java:33)
at 
org.jclouds.googlecloudstorage.domain.Bucket$Cors.create(Bucket.java:52)
at jdk.internal.reflect.GeneratedMethodAccessor188.invoke(Unknown 
Source)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
com.google.common.reflect.Invokable$MethodInvokable.invokeInternal(Invokable.java:200)
at com.google.common.reflect.Invokable.invoke(Invokable.java:101)
at 
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.newInstance(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:227)
at 
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:207)
at 
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:96)
at 
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:84)
at 
org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:63)
at 
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:275)
at 
org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:187)
at 
org.jclouds.googlecloud.config.ListPageAdapterFactory$ListPageAdapter.readItems(ListPageAdapterFactory.java:73)
at 
org.jclouds.googlecloud.config.ListPageAdapterFactory$ListPageAdapter.read(ListPageAdapterFactory.java:56)
at 
org.jclouds.googlecloud.config.ListPageAdapterFactory$ListPageAdapter.read(ListPageAdapterFactory.java:36)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:56)
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:83)
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:77)
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:62)
at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:42)
at 
org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
at 
org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
at 
org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at 
com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86)
at com.sun.proxy.$Proxy231.listBucket(Unknown Source)
at 
org.jclouds.googlecloudstorage.blobstore.GoogleCloudStorageBlobStore.list(GoogleCloudStorageBlobStore.java:119)
 {code}
 

Bucket that is causing exception has following configuration (i removed ids 
from json):
{code:java}

{
  "kind": "storage#bucket",
  "selfLink": "",
  "id": "",
  "name": "",
  "projectNumber": "",
  "metageneration": "1",
  "location": "US-CENTRAL1",
  "storageClass": "STANDARD",
  "etag": "CAE=",
  "timeCreated": "2020-10-26T13:54:23.835Z",
  "updated": "2020-10-26T13:54:23.835Z",
  "cors": [
{
  "origin": [
"https://*.cloud.google.com";,
"https://*.corp.google.com";,
"https://*.corp.google.com:*";
  ],
  "method": [
"GET"
  ]
}
  ],
  "iamConfiguration": {
"bucketPolicyOnly": {
  "enabled": true,
  "lockedTime": "2021-01-24T13:54:23.835Z"
},
"uniformBucketLevelAccess": {
  "enabled": true,
  "lockedTime": "2021-01-24T13:54:23.835Z"