Skip to content

Commit 82e3e91

Browse files
committed
fix regression bug in printer
regenerate meta-/model
1 parent b89f51c commit 82e3e91

File tree

657 files changed

+7989
-7986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

657 files changed

+7989
-7986
lines changed

javaparser-core/src/main/java/com/github/javaparser/CommentsInserter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ void insertComments(Node node, TreeSet<Comment> commentsToAttribute) {
8282
2) be outside all children. They could be preceding nothing, a comment or a child.
8383
If they preceed a child they are assigned to it, otherwise they remain "orphans"
8484
*/
85-
List<Node> children = node.getChildNodes().stream().// Never attribute comments to modifiers.
86-
filter(n -> !(n instanceof Modifier)).collect(toList());
85+
// Never attribute comments to modifiers.
86+
List<Node> // Never attribute comments to modifiers.
87+
children = node.getChildNodes().stream().filter(n -> !(n instanceof Modifier)).collect(toList());
8788
boolean attributeToAnnotation = !(configuration.isIgnoreAnnotationsWhenAttributingComments());
8889
for (Node child : children) {
8990
TreeSet<Comment> commentsInsideChild = new TreeSet<>(NODE_BY_BEGIN_POSITION);

javaparser-core/src/main/java/com/github/javaparser/HasParentNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* An object that can have a parent node.
3030
*/
31-
public interface HasParentNode<T> extends Observable {
31+
public interface HasParentNode<T> extends Observable {
3232

3333
/**
3434
* Returns true if the parent has a parent

javaparser-core/src/main/java/com/github/javaparser/JavaParser.java

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

javaparser-core/src/main/java/com/github/javaparser/JavaParserAdapter.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import java.nio.file.Path;
4242
import java.util.Objects;
4343

44-
public class JavaParserAdapter {
44+
public class JavaParserAdapter {
4545

4646
/**
4747
* Wraps the {@link JavaParser}.
@@ -56,11 +56,11 @@ public static JavaParserAdapter of(JavaParser parser) {
5656

5757
private final JavaParser parser;
5858

59-
public JavaParserAdapter(JavaParser parser) {
59+
public JavaParserAdapter(JavaParser parser) {
6060
this.parser = Objects.requireNonNull(parser, "A non-null parser should be provided.");
6161
}
6262

63-
public JavaParser getParser() {
63+
public JavaParser getParser() {
6464
return parser;
6565
}
6666

@@ -80,119 +80,119 @@ private <T extends Node> T handleResult(ParseResult<T> result) {
8080
throw new ParseProblemException(result.getProblems());
8181
}
8282

83-
public ParserConfiguration getParserConfiguration() {
83+
public ParserConfiguration getParserConfiguration() {
8484
return parser.getParserConfiguration();
8585
}
8686

87-
public CompilationUnit parse(InputStream in) {
87+
public CompilationUnit parse(InputStream in) {
8888
return handleResult(getParser().parse(in));
8989
}
9090

91-
public CompilationUnit parse(File file) throws FileNotFoundException {
91+
public CompilationUnit parse(File file) throws FileNotFoundException {
9292
return handleResult(getParser().parse(file));
9393
}
9494

95-
public CompilationUnit parse(Path path) throws IOException {
95+
public CompilationUnit parse(Path path) throws IOException {
9696
return handleResult(getParser().parse(path));
9797
}
9898

99-
public CompilationUnit parse(Reader reader) {
99+
public CompilationUnit parse(Reader reader) {
100100
return handleResult(getParser().parse(reader));
101101
}
102102

103-
public CompilationUnit parse(String code) {
103+
public CompilationUnit parse(String code) {
104104
return handleResult(getParser().parse(code));
105105
}
106106

107-
public CompilationUnit parseResource(String path) throws IOException {
107+
public CompilationUnit parseResource(String path) throws IOException {
108108
return handleResult(getParser().parseResource(path));
109109
}
110110

111-
public BlockStmt parseBlock(String blockStatement) {
111+
public BlockStmt parseBlock(String blockStatement) {
112112
return handleResult(getParser().parseBlock(blockStatement));
113113
}
114114

115-
public Statement parseStatement(String statement) {
115+
public Statement parseStatement(String statement) {
116116
return handleResult(getParser().parseStatement(statement));
117117
}
118118

119-
public ImportDeclaration parseImport(String importDeclaration) {
119+
public ImportDeclaration parseImport(String importDeclaration) {
120120
return handleResult(getParser().parseImport(importDeclaration));
121121
}
122122

123-
public <T extends Expression> T parseExpression(String expression) {
123+
public <T extends Expression> T parseExpression(String expression) {
124124
return handleResult(getParser().parseExpression(expression));
125125
}
126126

127-
public AnnotationExpr parseAnnotation(String annotation) {
127+
public AnnotationExpr parseAnnotation(String annotation) {
128128
return handleResult(getParser().parseAnnotation(annotation));
129129
}
130130

131-
public BodyDeclaration<?> parseAnnotationBodyDeclaration(String body) {
131+
public BodyDeclaration<?> parseAnnotationBodyDeclaration(String body) {
132132
return handleResult(getParser().parseAnnotationBodyDeclaration(body));
133133
}
134134

135-
public BodyDeclaration<?> parseBodyDeclaration(String body) {
135+
public BodyDeclaration<?> parseBodyDeclaration(String body) {
136136
return handleResult(getParser().parseBodyDeclaration(body));
137137
}
138138

139-
public ClassOrInterfaceType parseClassOrInterfaceType(String type) {
139+
public ClassOrInterfaceType parseClassOrInterfaceType(String type) {
140140
return handleResult(getParser().parseClassOrInterfaceType(type));
141141
}
142142

143-
public Type parseType(String type) {
143+
public Type parseType(String type) {
144144
return handleResult(getParser().parseType(type));
145145
}
146146

147-
public VariableDeclarationExpr parseVariableDeclarationExpr(String declaration) {
147+
public VariableDeclarationExpr parseVariableDeclarationExpr(String declaration) {
148148
return handleResult(getParser().parseVariableDeclarationExpr(declaration));
149149
}
150150

151-
public Javadoc parseJavadoc(String content) {
151+
public Javadoc parseJavadoc(String content) {
152152
return JavadocParser.parse(content);
153153
}
154154

155-
public ExplicitConstructorInvocationStmt parseExplicitConstructorInvocationStmt(String statement) {
155+
public ExplicitConstructorInvocationStmt parseExplicitConstructorInvocationStmt(String statement) {
156156
return handleResult(getParser().parseExplicitConstructorInvocationStmt(statement));
157157
}
158158

159-
public Name parseName(String qualifiedName) {
159+
public Name parseName(String qualifiedName) {
160160
return handleResult(getParser().parseName(qualifiedName));
161161
}
162162

163-
public SimpleName parseSimpleName(String name) {
163+
public SimpleName parseSimpleName(String name) {
164164
return handleResult(getParser().parseSimpleName(name));
165165
}
166166

167-
public Parameter parseParameter(String parameter) {
167+
public Parameter parseParameter(String parameter) {
168168
return handleResult(getParser().parseParameter(parameter));
169169
}
170170

171-
public PackageDeclaration parsePackageDeclaration(String packageDeclaration) {
171+
public PackageDeclaration parsePackageDeclaration(String packageDeclaration) {
172172
return handleResult(getParser().parsePackageDeclaration(packageDeclaration));
173173
}
174174

175-
public TypeDeclaration<?> parseTypeDeclaration(String typeDeclaration) {
175+
public TypeDeclaration<?> parseTypeDeclaration(String typeDeclaration) {
176176
return handleResult(getParser().parseTypeDeclaration(typeDeclaration));
177177
}
178178

179-
public ModuleDeclaration parseModuleDeclaration(String moduleDeclaration) {
179+
public ModuleDeclaration parseModuleDeclaration(String moduleDeclaration) {
180180
return handleResult(getParser().parseModuleDeclaration(moduleDeclaration));
181181
}
182182

183-
public ModuleDirective parseModuleDirective(String moduleDirective) {
183+
public ModuleDirective parseModuleDirective(String moduleDirective) {
184184
return handleResult(getParser().parseModuleDirective(moduleDirective));
185185
}
186186

187-
public TypeParameter parseTypeParameter(String typeParameter) {
187+
public TypeParameter parseTypeParameter(String typeParameter) {
188188
return handleResult(getParser().parseTypeParameter(typeParameter));
189189
}
190190

191-
public MethodDeclaration parseMethodDeclaration(String methodDeclaration) {
191+
public MethodDeclaration parseMethodDeclaration(String methodDeclaration) {
192192
return handleResult(getParser().parseMethodDeclaration(methodDeclaration));
193193
}
194194

195-
public ArrayInitializerExpr parseArrayInitializerExpr(String arrayInitializerExpr) {
195+
public ArrayInitializerExpr parseArrayInitializerExpr(String arrayInitializerExpr) {
196196
return handleResult(getParser().parseArrayInitializerExpr(arrayInitializerExpr));
197197
}
198198
}

0 commit comments

Comments
 (0)