Skip to content

Commit

Permalink
make no value object serializable for use in model checker project
Browse files Browse the repository at this point in the history
  • Loading branch information
Zahra Samiei committed Sep 4, 2024
1 parent 14cbe16 commit f05a7ac
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
public abstract class AbstractSemanticCheck {
@Autowired
Expand All @@ -17,6 +19,14 @@ public abstract class AbstractSemanticCheck {
@Autowired
protected SymbolTable symbolTable;

public final static Object NO_VALUE = new Object();
public final static Object NO_VALUE = new NoValue();

private static class NoValue implements Serializable {
private static final long serialVersionUID = 1L;

// Ensure singleton instance
private Object readResolve() {
return NO_VALUE;
}
}
}

0 comments on commit f05a7ac

Please sign in to comment.