LexicalPreservingPrinter will remove comments when using ASTTransforms.wrapIntoResource
#338
Labels
bug
Something isn't working
ASTTransforms.wrapIntoResource
#338
Consider the following snippet:
This will output:
Notice how the comments disappears if we print it with the
LexicalPreservingPrinter
, despite being there if we chose not to use it.This affects all codemods that uses this transform, mainly those using the
ResourceLeakFixer
transform:codeql:java/input-resource-leak
,codeql:java/output-resource-leak
,codeql:java/database-resource-leak
,pixee:java/prevent-filewriter-leak-with-nio
,pixee:java/resource-leak
.The text was updated successfully, but these errors were encountered: