java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

FileListIterator should not swallow exception and return null

Open wowxunyl opened this issue 4 years ago • 1 comments

https://github.com/qiniu/java-sdk/blob/28bf8496321e173f57d86afac0c2769e438293ec/src/main/java/com/qiniu/storage/BucketManager.java#L1271

        @Override
        public FileInfo[] next() {
            try {
                FileListing f = listFiles(bucket, prefix, marker, limit, delimiter);
                this.marker = f.marker == null ? "" : f.marker;
                return f.items;
            } catch (QiniuException e) {
                this.exception = e;
                return null;
            }
        }

here should fail fast so that user can know what happened

wowxunyl avatar Jun 09 '21 07:06 wowxunyl

PR: https://github.com/qiniu/java-sdk/pull/525/files

wowxunyl avatar Jun 09 '21 07:06 wowxunyl