From c6014dc2d6564eb149bd70d57e0776bad1c7c6e3 Mon Sep 17 00:00:00 2001 From: Markus KARG Date: Wed, 13 Dec 2023 15:45:48 +0000 Subject: [PATCH] Fixed: A default fulfils requirement, but does not count as assignment. --- src/main/java/com/beust/jcommander/JCommander.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/beust/jcommander/JCommander.java b/src/main/java/com/beust/jcommander/JCommander.java index b257e7ef..13b84f87 100644 --- a/src/main/java/com/beust/jcommander/JCommander.java +++ b/src/main/java/com/beust/jcommander/JCommander.java @@ -852,7 +852,6 @@ else if (commands.isEmpty()) { // but the one assigned on the variable initialization), make it as assigned and // remove it from the list of parameters to be required if (parameterDescription.getDefault() != null && !parameterDescription.getParameterized().getType().isPrimitive()) { - fields.get(parameterDescription.getParameterized()).setAssigned(true); requiredFields.remove(parameterDescription.getParameterized()); } }