From 904e2cc20fa6228c2cddd16d47c4b16f768a3eb5 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 21 Dec 2021 17:41:59 +0000 Subject: [PATCH] Use an iteration variable in walker --- meta/folder.groovy | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/meta/folder.groovy b/meta/folder.groovy index e1549fd..ac8fa23 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -935,8 +935,8 @@ class MetaInfo extends GISJsonSerialised { private boolean limiteddepth private int maxdepth - IterationInfo(ArrayList metacollection = new ArrayList(), - Map metamap = new Map(), + IterationInfo(ArrayList metacollection, + Map metamap, String comment = '', int level = 0, String gatheredpath = '', @@ -1056,11 +1056,15 @@ class MetaInfo extends GISJsonSerialised { } def allrelatedmeta(String metapath = '') { - return walkrelated(new IterationInfo(new ArrayList(), new Map(), '', 0, '', metapath)) + def ArrayList metacollection = new ArrayList() + def Map metamap = new Map() + return walkrelated(new IterationInfo(metacollection, metamap, '', 0, '', metapath)) } ArrayList releasewalker(int maxdepth, String startpath = '', String startmetapath = '') { - def results = walkrelated(new IterationInfo(new ArrayList(), new Map(), 'meta', 0, startpath, startmetapath, true, maxdepth)) + def ArrayList metacollection = new ArrayList() + def Map metamap = new Map() + def results = walkrelated(new IterationInfo(metacollection, metamap, 'meta', 0, startpath, startmetapath, true, maxdepth)) return results.metacollection }