-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix issues reported by findbugs #153
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks @praste for your PR. Looks like you spent some time on this. Reason it has not got attention is probably because it only lives in GitHub, but we use JIRA as main issue tracker. Also we normally don't commit big common changes to unrelated classes like in this one, so I'll not merge it for you.
I'll encourage you to split this up in one JIRA issue per distinct bug, and create one PR for each of those, starting the PR title with the JIRA code, e.g. "SOLR-1234 Risk of NPE in component foo".
I can see some potentially real bugs in your list of fixes so this is valuable feedback!
solr/contrib/analytics/src/java/org/apache/solr/analytics/util/MedianCalculator.java
Show resolved
Hide resolved
@@ -357,7 +357,7 @@ public void writeArray(String name, Iterator val) throws IOException { | |||
if (v instanceof IndexableField) { | |||
IndexableField f = (IndexableField)v; | |||
if (v instanceof Date) { | |||
output.append(((Date) val).toInstant().toString() + "; "); | |||
output.append(((Date) v).toInstant().toString() + "; "); |
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.
This looks legitimate - Would cause a classCastException. But have we ever seen it in the wild?
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 have not seen this in the logs.
I hit some weird error a few years back and I couldn’t believe how that we have such blatant bugs in the code all over that I ran findbugs and started wack-a-mole game for all the bugs reported.
I don’t remember what the original bug was anymore. I will give this a second shot and I will put small patches for each type of error reported by findbugs
No description provided.