-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
add new SLF4J_GET_STACK_TRACE detector (fixes #70) #72
base: master
Are you sure you want to change the base?
Conversation
@KengoTODA this fails locally for me with this message, which makes no sense to me, can you help:
That bug-pattern-1.4.1-SNAPSHOT.jar DOES contain findbugs.xml, so not sure what it's trying to tell me... 😃 |
@KengoTODA I've written the test differently in the 3rd commit (like the existing ones), so now it passes. |
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.
Update CHANGELOG.md
and README.md
.
I will read implementation changes carefully, later. At least I don't like naming like AbstractDetectorForParameterArray2
.
done.
thanks!
how would you name it? |
@KengoTODA how is this coming along - any chance we can wrap this up soon-ish? |
} | ||
|
||
@Override | ||
protected int getIsOfInterestKind() { |
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.
please annotate this method with @Item.SpecialKind
public class ManualGetStackTraceDetector extends AbstractDetectorForParameterArray2 { | ||
|
||
@Item.SpecialKind | ||
private final int isGetStackTrace = Item.defineNewSpecialKind("use of throwable getStackTrace"); |
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.
isXxx
is common naming for boolean, better to rename...
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.
done
|
||
@Override | ||
protected boolean isWhatWeWantToDetect(int seen) { | ||
// return false; |
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.
delete needless comment
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.
done
|
||
abstract protected boolean isWhatWeWantToDetect(int seen); | ||
|
||
abstract protected int getIsOfInterestKind(); |
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.
getIsOf
sounds strange, please rename...
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.
done
import javax.annotation.Nullable; | ||
import jp.skypencil.findbugs.slf4j.parameter.ArrayDataHandler.Strategy; | ||
|
||
public abstract class AbstractDetectorForParameterArray2 extends AbstractDetectorForParameterArray { |
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.
here we still have bad naming
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.
how would you name it?
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.
done
@KengoTODA I've taken all your previous code review feedback (thank you) into account. OK for you now? |
@KengoTODA would you be willing to finally merge this if I resolved the conflicts? (Those appeared after.) |
65fae45
to
7c819fa
Compare
@KengoTODA I've rebased and resolved conflicts and squased this now - how about finally merging? |
@vorburger could you rebase your branch? I've updated |
7c819fa
to
b0d7d80
Compare
done |
@KengoTODA I had taken all your previous code review feedback into account. How about merging? |
@KengoTODA are you willing to merge this if I resolve conflicts now? I am asking because I have done that twice in the past, and can't keep spending time to rebase a PR I'm unclear about whether you even consider merging it, and have thus ignored this. |
Thought about this again when I found a |
6eedefb
to
287cdfd
Compare
so that in the next commit the upcoming ManualGetStackTraceDetector for a SLF4J_GET_STACK_TRACE (issue KengoTODA#70) does not have to copy/paste 3/4 of the ManualMessageDetector
incl. adjustments for code review feedback * delete useless inline comment * add @Item.SpecialKind annotation * rename getIsOfInterestKind to getKindOfInterest * rename isGetStackTrace to getStackTraceKind * rename AbstractDetectorForParameterArray2 to AbstractExtendedDetectorForParameterArray
2801d1a
to
0841ad7
Compare
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.
If you need to change existing classes (ManualMessageDetector.java
), could you separate PR into two parts: 1. changing existing classes and 2. adding new detector based on it? It will help me to focus on purpose of review.
Hello @KengoTODA I'm doing a year end clean up of my personal https://github.com/pulls and wanted to ask if you would still consider merging this very old Pull Request if I rebased it, or if we should forget about and close this? (This is a bulk message I'm posting to many issues to gauge what is still revelant.) |
for #70