@@ -64,14 +64,16 @@ public class Definitions implements Serializable {
64
64
public static class LineTagMap implements Serializable {
65
65
66
66
private static final long serialVersionUID = 1191703801007779481L ;
67
- private final Map <String , Set <Tag >> symTags ; //NOPMD
67
+ @ SuppressWarnings ("java:S116" )
68
+ private final Map <String , Set <Tag >> sym_tags ; //NOPMD
68
69
69
70
protected LineTagMap () {
70
- this .symTags = new HashMap <>();
71
+ this .sym_tags = new HashMap <>();
71
72
}
72
73
}
73
74
// line number -> tag map
74
- private final Map <Integer , LineTagMap > lineMaps ;
75
+ @ SuppressWarnings ("java:S116" )
76
+ private final Map <Integer , LineTagMap > line_maps ;
75
77
76
78
/**
77
79
* Map from symbol to the line numbers on which the symbol is defined.
@@ -84,7 +86,7 @@ protected LineTagMap() {
84
86
85
87
public Definitions () {
86
88
symbols = new HashMap <>();
87
- lineMaps = new HashMap <>();
89
+ line_maps = new HashMap <>();
88
90
tags = new ArrayList <>();
89
91
}
90
92
@@ -134,9 +136,9 @@ public boolean hasDefinitionAt(String symbol, int lineNumber, String[] strs) {
134
136
.filter (lines -> lines .contains (lineNumber ))
135
137
.isPresent ();
136
138
if (isDefinitionPresent ) {
137
- LineTagMap lineMap = lineMaps .get (lineNumber );
139
+ LineTagMap lineMap = line_maps .get (lineNumber );
138
140
if (lineMap != null ) {
139
- for (Tag tag : lineMap .symTags .get (symbol )) {
141
+ for (Tag tag : lineMap .sym_tags .get (symbol )) {
140
142
if (tag .used ) {
141
143
continue ;
142
144
}
@@ -189,8 +191,8 @@ public List<Tag> getTags() {
189
191
* @return list of tags or null
190
192
*/
191
193
public @ Nullable List <Tag > getTags (int line ) {
192
- return Optional .ofNullable (lineMaps .get (line ))
193
- .map (lineMap -> lineMap .symTags .values ().stream ()
194
+ return Optional .ofNullable (line_maps .get (line ))
195
+ .map (lineMap -> lineMap .sym_tags .values ().stream ()
194
196
.flatMap (Collection ::stream )
195
197
.collect (Collectors .toList ())
196
198
)
@@ -274,14 +276,14 @@ public void addTag(int line, String symbol, String type, String text,
274
276
lines .add (aLine );
275
277
276
278
// Get per line map
277
- LineTagMap lineMap = lineMaps .computeIfAbsent (aLine ,
279
+ LineTagMap lineMap = line_maps .computeIfAbsent (aLine ,
278
280
key -> new LineTagMap ());
279
281
280
282
// Insert sym->tag map for this line
281
- Set <Tag > ltags = lineMap .symTags .get (symbol );
283
+ Set <Tag > ltags = lineMap .sym_tags .get (symbol );
282
284
if (ltags == null ) {
283
285
ltags = new HashSet <>();
284
- lineMap .symTags .put (symbol , ltags );
286
+ lineMap .sym_tags .put (symbol , ltags );
285
287
}
286
288
ltags .add (newTag );
287
289
}
0 commit comments