Skip to content

Commit

Permalink
SMGCPA: fix restricted by checkstyle usage of ImmutableList.Builder
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.sosy-lab.org/software/cpachecker/trunk@39608 4712c6d2-40bb-43ae-aa4b-fec3f1bdfe4c
  • Loading branch information
vasilyev committed Feb 28, 2022
1 parent f8cf2fb commit c4f5f04
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/org/sosy_lab/cpachecker/cpa/smg/SMGBuiltins.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package org.sosy_lab.cpachecker.cpa.smg;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
import com.google.common.collect.Sets;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -948,11 +947,11 @@ List<SMGAddressValueAndState> handleUnknownFunction(

private boolean isSafeFunction(String calledFunctionName) {
if (safeUnknownFunctionCompiledPatterns == null) {
Builder<Pattern> builder = new Builder<>();
List<Pattern> list = new ArrayList<>();
for (String safeUnknownFunctionPattern : options.getSafeUnknownFunctionsPatterns()) {
builder.add(Pattern.compile(safeUnknownFunctionPattern));
list.add(Pattern.compile(safeUnknownFunctionPattern));
}
safeUnknownFunctionCompiledPatterns = builder.build();
safeUnknownFunctionCompiledPatterns = ImmutableList.copyOf(list);
}
for (Pattern safeUnknownFunctionPattern : safeUnknownFunctionCompiledPatterns) {
if (safeUnknownFunctionPattern.matcher(calledFunctionName).matches()) {
Expand Down

0 comments on commit c4f5f04

Please sign in to comment.