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()); } }