-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
[Dubbo-3625] Add constant 'MIN_PATH_ARRAY_LENGTH' #3680
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -329,9 +329,7 @@ private void doReceived(Response res) { | |
lock.lock(); | ||
try { | ||
response = res; | ||
if (done != null) { | ||
done.signal(); | ||
} | ||
done.signalAll(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, this change is irrelevant. And is addressed in #3681 . Please rebase with the master and send the pull request again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK,I will send the pull request again. |
||
} finally { | ||
lock.unlock(); | ||
} | ||
|
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.
It is better to make it static.
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.
It is better to be local, because it is only used in one method.
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.
No, it is not. As a local constant, it will be allocated every time the method is invoked. I don't think it should be local.
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 make an experiment.
After decompilation, I got
Every time the local constant need one more step ('
0: ldc #2
') and one more stack space than static constant.So you are right, I will make it static.