You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Whenever I try to delete a line or block comment while using the LexicalPreservingPrinter, I get an UnsupportedOperationException. Javadoc comments seem to work fine.
Example:
FileInputStream in = new FileInputStream(path);
CompilationUnit compilationUnit = LexicalPreservingPrinter.setup(JavaParser.parse(in));
List<Comment> comments = compilationUnit.getAllContainedComments();
for (Comment comment : comments) {
// throws UnsupportedOperationException unless it's a Javadoc comment
comment.remove();
}
The text was updated successfully, but these errors were encountered:
JustinKissling
changed the title
LexicalPreservationPrinter throw UnsupportedOperationException when removing comments
LexicalPreservationPrinter throws UnsupportedOperationException when removing comments
Jan 14, 2019
JustinKissling
changed the title
LexicalPreservationPrinter throws UnsupportedOperationException when removing comments
LexicalPreservingPrinter throws UnsupportedOperationException when removing comments
Jan 14, 2019
Hi,
Whenever I try to delete a line or block comment while using the LexicalPreservingPrinter, I get an UnsupportedOperationException. Javadoc comments seem to work fine.
Example:
The text was updated successfully, but these errors were encountered: