imagej / imagej-ops

ImageJ Ops: "Write once, run anywhere" image processing
https://imagej.net/libs/imagej-ops
BSD 2-Clause "Simplified" License
88 stars 42 forks source link

DefaultOpService: Fix setMaxThreads to check range of local variable #640

Closed karlduderstadt closed 2 years ago

karlduderstadt commented 2 years ago

The range of the global variable maxThreads is being checked in the setMaxThreads method, but the local variable should be checked. The global one is zero by default before being set so calling the function always triggers the IllegalArgumentException no matter what value is provided.

ctrueden commented 2 years ago

Doh! Thanks, @karlduderstadt!