m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/model
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-12 16:38:03 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-12 16:38:03 +0100
commite01887358628321b423dbbc5be5bc5d7e2504d99 (patch)
tree601da8499d17b4656f08432b3bc134e5d89b7c36 /src/main/java/pl/edu/mimuw/cloudatlas/model
parentf2841b8bfe142a2d6643cfe9bb9aca99cb8f6d23 (diff)
Fix type collection serialization
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/model')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/model/Type.java2
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/model/TypePrimitive.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/model/Type.java b/src/main/java/pl/edu/mimuw/cloudatlas/model/Type.java
index 0994cba..4453aea 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/model/Type.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/model/Type.java
@@ -49,6 +49,8 @@ public abstract class Type implements Serializable {
this.primaryType = primaryType;
}
+ public Type() { this.primaryType = PrimaryType.NULL; };
+
/**
* Returns the primary type of this type.
*
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/model/TypePrimitive.java b/src/main/java/pl/edu/mimuw/cloudatlas/model/TypePrimitive.java
index ad07c0a..a17cafa 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/model/TypePrimitive.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/model/TypePrimitive.java
@@ -78,6 +78,8 @@ public class TypePrimitive extends Type {
*/
public static final TypePrimitive QUERY = new TypePrimitive(PrimaryType.QUERY);
+ private TypePrimitive() {}
+
private TypePrimitive(PrimaryType primaryType) {
super(primaryType);
switch(primaryType) {