From aa804c12dad1df989418f54dd583de4b5470d4f1 Mon Sep 17 00:00:00 2001 From: Fanon Jupkwo Date: Tue, 5 Mar 2024 20:48:17 +0000 Subject: [PATCH] update: Issue #240 updating the counter initial value from 0 to 1 - PR #264 workflow bug --- .../core/internal/TypeBasedVariableNameStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsgenerator-core/src/main/java/com/osscameroon/jsgenerator/core/internal/TypeBasedVariableNameStrategy.java b/jsgenerator-core/src/main/java/com/osscameroon/jsgenerator/core/internal/TypeBasedVariableNameStrategy.java index 8e6249ea..143b6cbd 100644 --- a/jsgenerator-core/src/main/java/com/osscameroon/jsgenerator/core/internal/TypeBasedVariableNameStrategy.java +++ b/jsgenerator-core/src/main/java/com/osscameroon/jsgenerator/core/internal/TypeBasedVariableNameStrategy.java @@ -31,6 +31,6 @@ public String nextName(@NonNull String type) { } } - return format("%s_%03d", identifier, counters.computeIfAbsent(type, __ -> new AtomicLong()).getAndIncrement()); + return format("%s_%03d", identifier, counters.computeIfAbsent(type, __ -> new AtomicLong(1)).getAndIncrement()); } }