Load the option with the method that defaults to a given value when it does not exist, otherwise this will lead to NoSuchElementException until the option is set.
Also, use the primitive boolean which is the most appropriate type and prevents NullPointerExceptions as it was null by default.
e.g.
[ZAP-BootstrapGUI] ERROR org.parosproxy.paros.common.AbstractParam - 'fileupload.sendrequests' doesn't map to an existing object
java.util.NoSuchElementException: 'fileupload.sendrequests' doesn't map to an existing object
at org.apache.commons.configuration.AbstractConfiguration.getBoolean(AbstractConfiguration.java:644) ~[commons-configuration-1.10.jar:1.10]
at org.sasanlabs.fileupload.configuration.FileUploadConfiguration.parseImpl(FileUploadConfiguration.java:146) ~[?:?]
at org.zaproxy.zap.common.VersionedAbstractParam.parse(VersionedAbstractParam.java:76) ~[main/:?]
at org.parosproxy.paros.common.AbstractParam.load(AbstractParam.java:68) [main/:?]
[AWT-EventQueue-0] ERROR org.zaproxy.zap.ZAP.UncaughtExceptionLogger - Exception in thread "AWT-EventQueue-0"
java.lang.NullPointerException: null
at org.sasanlabs.fileupload.ui.FileUploadOptionsPanel.initParam(FileUploadOptionsPanel.java:263) ~[?:?]
at org.parosproxy.paros.view.AbstractParamContainerPanel.lambda$1(AbstractParamContainerPanel.java:662) ~[main/:?]
at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
at org.parosproxy.paros.view.AbstractParamContainerPanel.initParam(AbstractParamContainerPanel.java:662) ~[main/:?]
Load the option with the method that defaults to a given value when it does not exist, otherwise this will lead to
NoSuchElementException
until the option is set. Also, use the primitive boolean which is the most appropriate type and preventsNullPointerException
s as it was null by default.e.g.