-
Notifications
You must be signed in to change notification settings - Fork 607
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-16803: Remove dependencies on SimplePostTool from Solr Core classes.. #1805
Conversation
import java.nio.BufferOverflowException; | ||
import java.nio.ByteBuffer; | ||
|
||
public class BinaryUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is similar code in
solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java:87: public static class BAOS extends ByteArrayOutputStream {
Might make sense to use this class there as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change to combine them in c486782, and it ended up being a bit more intrusive then I expected. All tests pass. Can you give it a quick look?
Great feedback @risdenk, especially on coming up with a better name ;-) |
…tils Required a move to the solrj/../common package in order to be used by solrj and core modules.
solr/solrj/src/java/org/apache/solr/common/InputStreamUtils.java
Outdated
Show resolved
Hide resolved
…ses.. (#1805) Classes through solr/core and solr/solrj depended on methods defined in the SimplePostTool, a auxillary class that isn't really "part" of the core Solr offering. Relocate those methods to the common Utils.java class.
https://issues.apache.org/jira/browse/SOLR-16803
Description
Over time various classes through out Solr have dependencies on methods in the SimplePostTool class. However, this is sort of an ancillary class, and it shouldn't be relied upon.
Solution
Extract methods that are used into a new BinaryUtils.java file. I could also see the three methods being added to the existing "Utils.java" too....
Tests
Rerunning tests and bats.
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.