Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-17232: PropertiesOutputStream overrides write(byte[], int, int). #2400

Merged
merged 5 commits into from
Apr 12, 2024

Conversation

bruno-roustant
Copy link
Contributor

@epugh
Copy link
Contributor

epugh commented Apr 11, 2024

Some JavaDocs on this class would be nice.. I looked at it, and I still don't quite grok why it is needed for a properties file?

@bruno-roustant
Copy link
Contributor Author

I think PropertiesOutputStream could be renamed IndexOutputOutputStream because it is used to wrap an IndexOutput to expose it as an OutputStream.
I can add some JavaDoc. Do you agree to rename it to IndexOutputOutputStream?

@dsmiley
Copy link
Contributor

dsmiley commented Apr 11, 2024

Lets rename this in main; separate no-JIRA PR.

@epugh
Copy link
Contributor

epugh commented Apr 11, 2024

The name "IndexOutputOutputStream", while slightly funny, is fine, with just a bit of docs to highlight what you said "wrap an IndexOutput to expose it as an OutputStream" would have helped me grok it!

@bruno-roustant
Copy link
Contributor Author

Renamed. It was used only in two internal locations.

Copy link
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -20,11 +20,12 @@
import java.io.OutputStream;
import org.apache.lucene.store.IndexOutput;

public class PropertiesOutputStream extends OutputStream {
/** Wraps an {@link IndexOutput} to expose it as an {@link OutputStream}. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! Helps me understand what it's for (and why the double "Output" in the name!)...

@bruno-roustant bruno-roustant merged commit 5856581 into apache:main Apr 12, 2024
2 of 3 checks passed
@bruno-roustant bruno-roustant deleted the prop_stream branch April 12, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants