after #9889
We need to fix all existing cases of getFileContents() usage by usage on AST based logic.
|
/** |
|
* Returns the file contents associated with the tree. |
|
* |
|
* @return the file contents |
|
* @deprecated |
|
* Usage of this method is no longer accepted. |
|
* Please use AST based methods instead. |
|
* @noinspection WeakerAccess |
|
* @noinspectionreason WeakerAccess - we avoid 'protected' when possible |
|
*/ |
|
@Deprecated(since = "9.3") |
|
public final FileContents getFileContents() { |
The same is true for methods
getLine and
getLines that do allow to have access to not AST content.
Suppression
|
<!-- these are legacy use cases until #11166 --> |
cases:
it is better to resolve each case in separate PR. Each PR should remove the suppression to show the issue is fixed. haanhvu@1439170#diff-c1ffc75b7152435a4d5d40d7ee9b32b57402959b1ad471a41e753ea67554378b
For javadoc Check please see other issues, each Check in separate issue.
after #9889
We need to fix all existing cases of
getFileContents()usage by usage on AST based logic.checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java
Lines 195 to 206 in 1346ff9
The same is true for methods
getLineandgetLinesthat do allow to have access to not AST content.Suppression
checkstyle/config/suppressions.xml
Line 120 in 50aa685
cases:
RegexpCheck.java (not applicable as it is operates on text file, not java files, by design)RegexpSinglelineJavaCheck.java (this is by design match to raw string, same a RegexpCheck)it is better to resolve each case in separate PR. Each PR should remove the suppression to show the issue is fixed. haanhvu@1439170#diff-c1ffc75b7152435a4d5d40d7ee9b32b57402959b1ad471a41e753ea67554378b
For javadoc Check please see other issues, each Check in separate issue.