From 69211a1c35a808e7a236c88b76bea4ebbbe8d243 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 22 Jul 2016 10:28:39 +0000 Subject: [PATCH] ConstantList: move initialisation to the variable definitions git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11546 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/parser/ast/ConstantList.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/prism/src/parser/ast/ConstantList.java b/prism/src/parser/ast/ConstantList.java index 02dc16bf..4f892269 100644 --- a/prism/src/parser/ast/ConstantList.java +++ b/prism/src/parser/ast/ConstantList.java @@ -42,24 +42,19 @@ import parser.type.*; public class ConstantList extends ASTElement { // Name/expression/type triples to define constants - private Vector names; - private Vector constants; // these can be null, i.e. undefined - private Vector types; + private Vector names = new Vector(); + private Vector constants = new Vector(); // these can be null, i.e. undefined + private Vector types = new Vector(); // We also store an ExpressionIdent to match each name. // This is to just to provide positional info. - private Vector nameIdents; + private Vector nameIdents = new Vector(); // Constructor public ConstantList() { - // initialise - names = new Vector(); - constants = new Vector(); - types = new Vector(); - nameIdents = new Vector(); } - + // Set methods public void addConstant(ExpressionIdent n, Expression c, Type t)