From ab337c20a8c7a41a439a602d687f1ba282e6428a Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Mon, 16 Mar 2015 12:51:27 -0500 Subject: [PATCH] Made the no-argument constructors of the VS* suite of Java classes public. --- trick_source/java/src/trick/common/utils/vs/VSBoolean.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSByte.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSDouble.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSFloat.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSInteger.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSLong.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSShort.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSString.java | 2 +- trick_source/java/src/trick/common/utils/vs/VSValue.java | 3 ++- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/trick_source/java/src/trick/common/utils/vs/VSBoolean.java b/trick_source/java/src/trick/common/utils/vs/VSBoolean.java index 41efc99e..960788d9 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSBoolean.java +++ b/trick_source/java/src/trick/common/utils/vs/VSBoolean.java @@ -2,7 +2,7 @@ package trick.common.utils.vs; public class VSBoolean extends VSValue { - protected VSBoolean() { + public VSBoolean() { this(false); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSByte.java b/trick_source/java/src/trick/common/utils/vs/VSByte.java index 1b49fbb4..9472cce3 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSByte.java +++ b/trick_source/java/src/trick/common/utils/vs/VSByte.java @@ -4,7 +4,7 @@ import java.math.BigInteger; public class VSByte extends VSValue { - protected VSByte() { + public VSByte() { this((byte)0); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSDouble.java b/trick_source/java/src/trick/common/utils/vs/VSDouble.java index fdf4728c..dc8e78b0 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSDouble.java +++ b/trick_source/java/src/trick/common/utils/vs/VSDouble.java @@ -2,7 +2,7 @@ package trick.common.utils.vs; public class VSDouble extends VSValue { - protected VSDouble() { + public VSDouble() { this(0); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSFloat.java b/trick_source/java/src/trick/common/utils/vs/VSFloat.java index cc0f3743..a1bf9759 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSFloat.java +++ b/trick_source/java/src/trick/common/utils/vs/VSFloat.java @@ -2,7 +2,7 @@ package trick.common.utils.vs; public class VSFloat extends VSValue { - protected VSFloat() { + public VSFloat() { this(0); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSInteger.java b/trick_source/java/src/trick/common/utils/vs/VSInteger.java index 92531e83..8871d5b1 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSInteger.java +++ b/trick_source/java/src/trick/common/utils/vs/VSInteger.java @@ -4,7 +4,7 @@ import java.math.BigInteger; public class VSInteger extends VSValue { - protected VSInteger() { + public VSInteger() { this(0); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSLong.java b/trick_source/java/src/trick/common/utils/vs/VSLong.java index 88c0f895..b1d0833f 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSLong.java +++ b/trick_source/java/src/trick/common/utils/vs/VSLong.java @@ -4,7 +4,7 @@ import java.math.BigInteger; public class VSLong extends VSValue { - protected VSLong() { + public VSLong() { this(0); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSShort.java b/trick_source/java/src/trick/common/utils/vs/VSShort.java index 65d857ed..1e331cb6 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSShort.java +++ b/trick_source/java/src/trick/common/utils/vs/VSShort.java @@ -4,7 +4,7 @@ import java.math.BigInteger; public class VSShort extends VSValue { - protected VSShort() { + public VSShort() { this((short)0); } diff --git a/trick_source/java/src/trick/common/utils/vs/VSString.java b/trick_source/java/src/trick/common/utils/vs/VSString.java index 3ab4d9a8..38c9aa39 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSString.java +++ b/trick_source/java/src/trick/common/utils/vs/VSString.java @@ -2,7 +2,7 @@ package trick.common.utils.vs; public class VSString extends VSValue { - protected VSString() {} + public VSString() {} public VSString(String value) { super(value); diff --git a/trick_source/java/src/trick/common/utils/vs/VSValue.java b/trick_source/java/src/trick/common/utils/vs/VSValue.java index 09b4eeee..bf05da7c 100644 --- a/trick_source/java/src/trick/common/utils/vs/VSValue.java +++ b/trick_source/java/src/trick/common/utils/vs/VSValue.java @@ -30,7 +30,8 @@ public abstract class VSValue implements VariableServerFluent, Cloneable { @Override public String toString() { - return value.toString(); + // This method works even when value is null. + return String.valueOf(value); } @Override