@@ -40,8 +40,8 @@ public void serialize(CompilationUnit cu, JsonGenerator jG, SerializerProvider p
40
40
jG .writeEndObject ();
41
41
}
42
42
43
- private void serializeAll (CompilationUnit cu , ASTNode node , JsonGenerator jG ,
44
- SerializerProvider provider ) throws IOException {
43
+ private void serializeAll (CompilationUnit cu , ASTNode node , JsonGenerator jG , SerializerProvider provider )
44
+ throws IOException {
45
45
List <StructuralPropertyDescriptor > descriptorList = node .structuralPropertiesForType ();
46
46
jG .writeStartObject ();
47
47
@@ -72,9 +72,10 @@ private void serializeAll(CompilationUnit cu, ASTNode node, JsonGenerator jG,
72
72
jG .writeFieldName ("comments" );
73
73
jG .writeStartArray ();
74
74
75
- for (Comment c : ( List < Comment >) cu . getCommentList () ) {
76
- if (c .getParent () != null )
75
+ for (Comment c : cl ) {
76
+ if (c .getParent () != null ) {
77
77
continue ;
78
+ }
78
79
79
80
CommentVisitor visitor = new CommentVisitor (cu , contentLines );
80
81
c .accept (visitor );
@@ -86,7 +87,7 @@ private void serializeAll(CompilationUnit cu, ASTNode node, JsonGenerator jG,
86
87
jG .writeString (name );
87
88
jG .writeFieldName ("text" );
88
89
jG .writeString (visitor .getCommentText ());
89
- serializePosition (cu , (ASTNode )c , jG );
90
+ serializePosition (cu , (ASTNode ) c , jG );
90
91
jG .writeEndObject ();
91
92
}
92
93
jG .writeEndArray ();
@@ -96,10 +97,8 @@ private void serializeAll(CompilationUnit cu, ASTNode node, JsonGenerator jG,
96
97
jG .writeEndObject ();
97
98
}
98
99
99
- private void serializeChildList (CompilationUnit cu , List <ASTNode > children ,
100
- JsonGenerator jG ,
101
- StructuralPropertyDescriptor descriptor ,
102
- SerializerProvider provider ) throws IOException {
100
+ private void serializeChildList (CompilationUnit cu , List <ASTNode > children , JsonGenerator jG ,
101
+ StructuralPropertyDescriptor descriptor , SerializerProvider provider ) throws IOException {
103
102
jG .writeFieldName (descriptor .getId ());
104
103
if (children .size () < 1 ) {
105
104
jG .writeNull ();
@@ -112,7 +111,8 @@ private void serializeChildList(CompilationUnit cu, List<ASTNode> children,
112
111
jG .writeEndArray ();
113
112
}
114
113
115
- private void serializeChild (CompilationUnit cu , ASTNode child , JsonGenerator jG , StructuralPropertyDescriptor descriptor , SerializerProvider provider ) throws IOException {
114
+ private void serializeChild (CompilationUnit cu , ASTNode child , JsonGenerator jG ,
115
+ StructuralPropertyDescriptor descriptor , SerializerProvider provider ) throws IOException {
116
116
jG .writeFieldName (descriptor .getId ());
117
117
serializeAll (cu , child , jG , provider );
118
118
}
@@ -133,7 +133,8 @@ private void serializePosition(CompilationUnit cu, ASTNode node, JsonGenerator j
133
133
jG .writeEndObject ();
134
134
}
135
135
136
- private void serializePositionFields (CompilationUnit cu , JsonGenerator jG , int pos , String name ) throws IOException {
136
+ private void serializePositionFields (CompilationUnit cu , JsonGenerator jG , int pos , String name )
137
+ throws IOException {
137
138
jG .writeFieldName (name );
138
139
jG .writeStartObject ();
139
140
0 commit comments