fix: All user code input should be validated #199#200
Open
astubbs wants to merge 1 commit intoforge:masterfrom
Open
fix: All user code input should be validated #199#200astubbs wants to merge 1 commit intoforge:masterfrom
astubbs wants to merge 1 commit intoforge:masterfrom
Conversation
Member
|
Can you format the sources using the formatter in https://github.com/forge/core/blob/master/eclipse-code-formatter-profile.xml? |
Author
|
ok done, and replaced all the times I saw it in this file |
gastaldi
reviewed
Jul 29, 2021
impl/src/main/java/org/jboss/forge/roaster/model/impl/MethodImpl.java
Outdated
Show resolved
Hide resolved
Member
|
Can we have a test that verifies this is working as proposed? Also it would be nice if you could squash all commits from this PR |
Author
|
Interestingly, the source validator is failing all the code snippets from the test, if they don't have a trailing Previously the code was just calling |
Protect in one place for out of range.
f6bd15e to
595d32a
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.
You should not be able to pass in invalid code and get obscure errors like "index out of range" exceptions. I found one place for this but the code should be audited for it everywhere. Better to run slower and have excellent errors.
fixes #199