1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge pull request #861 from zhaoyuguang/zhaoyuguang/dev_0

Optional value should only be accessed after calling isPresent()
This commit is contained in:
format 2019-08-20 11:42:25 +08:00 committed by GitHub
commit e9c7778876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,7 +157,7 @@ public class OssStorageResource implements Resource {
public Bucket getBucket() {
return this.oss.listBuckets().stream()
.filter(bucket -> bucket.getName().equals(this.bucketName)).findFirst()
.get();
.orElse(null);
}
/**