BaseEncoding.encodingStream().close() is non-idempotent
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start at BaseEncoding.encodingStream() and reproduce the issue with the StringWriter and OutputStream sequence shown in the report. Trace the close behavior and verify that calling close() a second time leaves the writer unchanged, while the existing encoding output still remains correct.
Written by the indexing model from the issue text.
Description
Closeable.close says:
If the stream is already closed then invoking this method has no effect.
Code:
StringWriter w = new StringWriter();
OutputStream out = BaseEncoding.base64().encodingStream(w);
out.write(0);
out.close();
System.out.println(w);
out.close();
System.out.println(w);
Output:
AA==
AA==A===
- Dominant language
- Java
- Stars
- 51.9k
- Forks
- 11.2k
- Avg merge
- 2h 38m
- Merged PRs (30d)
- 43
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/guava
-
P3 package=eventbus type=enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Improve documentation of LoadingCache.get() to note blocking behavior on slow CacheLoader.reload() OpenP3 package=cache status=triaged type=api-docs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
P3 package=reflect status=triaged type=api-docs type=enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
P3 package=collect status=research type=addition
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
P3 package=net type=addition
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100