Skip to content

Commit d60132e

Browse files
committed
Handle null annotation case.
1 parent e90540b commit d60132e

File tree

1 file changed

+1
-0
lines changed
  • com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/util

1 file changed

+1
-0
lines changed

com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/util/Util.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public static String removeFileProtocolFromPath(String path) {
107107
* presented in the CAst.
108108
*/
109109
public static Collection<String> getNames(Collection<CAstAnnotation> annotations) {
110+
if (annotations == null) return emptyList();
110111
return annotations.stream().map(Util::getName).flatMap(Optional::stream).toList();
111112
}
112113

0 commit comments

Comments
 (0)