Skip to content

Commit e161674

Browse files
committed
fix(core): add volatile to SiftBuilder cache fields
1 parent cd0115f commit e161674

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sift-core/src/main/java/com/mirkoddd/sift/core/SiftBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class SiftBuilder implements QuantifierStep, ConnectorStep, VariableConnectorSte
3030
final PatternAssembler assembler;
3131
private final FixedType fixedType;
3232
private final VariableType variableType;
33-
private String cachedRegex = null;
34-
private Pattern cachedPattern = null;
33+
private volatile String cachedRegex = null;
34+
private volatile Pattern cachedPattern = null;
3535
/**
3636
* Default constructor for standard builder.
3737
*/

0 commit comments

Comments
 (0)