add rangeLimit to JinjavaConfig (1000 by default)#658
Merged
Conversation
boulter
requested changes
Apr 29, 2021
boulter
left a comment
Contributor
There was a problem hiding this comment.
A few comments, otherwise looks good. Thanks!
| @@ -1,6 +1,8 @@ | |||
| package com.hubspot.jinjava.lib.fn; | |||
|
|
|||
| import static com.hubspot.jinjava.interpret.JinjavaInterpreter.getCurrent; | |||
Contributor
There was a problem hiding this comment.
any reason for the static import here? It's only used once.
Contributor
Author
There was a problem hiding this comment.
Indeed, I remove it
| RANGE_LIMIT + | ||
| " values.", | ||
| DEFAULT_RANGE_LIMIT + | ||
| " values by default, but this integer value is configurable.", |
Contributor
There was a problem hiding this comment.
it is configurable, but not by the user which is who this documentation is targeted to.
Suggested change
| " values by default, but this integer value is configurable.", | |
| " values.", |
| ) | ||
| public static List<Integer> range(Object arg1, Object... args) { | ||
| int rangeLimit = requireNonNull( | ||
| JinjavaInterpreter.getCurrent(), |
Contributor
There was a problem hiding this comment.
I think it's only possible for this to be null in tests if you forget to push an interpreter onto the stack.
Contributor
Author
There was a problem hiding this comment.
I remove it, I just don't like when my IDE is screaming at me when something can be null.
27cf68c to
53cf9c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes: