- Notifications
You must be signed in to change notification settings - Fork2.5k
Call refreshScope() once when saving all contexts#8205
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Uh oh!
There was an error while loading.Please reload this page.
thc202 commentedNov 21, 2023
Be good to add tests. |
thc202 commentedNov 21, 2023
Do you have numbers? (Just curiosity.) |
double16 commentedNov 21, 2023
double16 commentedNov 21, 2023
|
thc202 commentedNov 21, 2023
Thank you. Agreed.
You can mock the |
double16 commentedNov 21, 2023
It looks like the only way to verify |
double16 commentedDec 12, 2023
Making |
double16 commentedFeb 23, 2024
recheck |
kingthorin commentedFeb 23, 2024
Is this old enough that it needs rebase to properly pickup CLA? |
thc202 commentedFeb 23, 2024
No. |
thc202 commentedFeb 23, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Exposing the method would not make much difference as we can't still tell if it's called or not, we should check that through Regarding the duplication, that should not be needed as |
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.
Should have a ZAP comment after the license header (same for Session class).
| publicstaticfinalStringREFRESH ="refresh"; | ||
| publicstaticfinalPatternpatternCRLF =Pattern.compile("\\r\\n",Pattern.MULTILINE); | ||
| publicstaticfinalPatternpatternLF =Pattern.compile("\\n",Pattern.MULTILINE); | ||
| privatestaticfinalPatternpatternHeaderLF =Pattern.compile("(?<!\\r)\\n",Pattern.MULTILINE); |
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.
PATTERN_NEWLINES
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.
As well as or instead of multi?
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.
That's for the name of the constant.
…mentSigned-off-by: Patrick Double <pat@patdouble.com>
Signed-off-by: Patrick Double <pat@patdouble.com>
5a40aa7 toc38b3dbComparedouble16 commentedMar 7, 2024
As far as I can tell testGui does not have visibility into test. IDEA doesn't recognize but it doesn't help. If you know, could you post the gradle code? |

When updating context information, ZAP calls saveAllContexts(). Each context save results in a call to refreshScope(). This is unnecessary. This PR calls refreshScope() after all contexts are saved.
In addition, a performance hit compiling a regex repeatedly was found and fixed.