Skip to content

Commit f9e0dd9

Browse files
committed
AbstractModuleItem: mark items required by default
The required attribute of the @parameter annotation has a default value of true. The default value of ModuleItem#isRequired() is supposed to match that. This discrepancy (and hence bug) is probably a holdover from before all parameters were required by default, long ago. Without this change, all scripting parameters -- and really *all* other ModuleItem implementation besides CommandModuleItem -- report their parameters as required=false by default, which is inconsistent with commands. It also causes problems with certain forms of interoperability, such as OMERO, which does not bother to prompt for parameter values on the command line if they are marked optional.
1 parent 5b4fd55 commit f9e0dd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/module/AbstractModuleItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public boolean isAutoFill() {
118118

119119
@Override
120120
public boolean isRequired() {
121-
return false;
121+
return true;
122122
}
123123

124124
@Override

0 commit comments

Comments
 (0)