imagej / imagej-ops

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

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

Closed karlduderstadt closed 3 years ago

karlduderstadt commented 3 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 3 years ago

Doh! Thanks, @karlduderstadt!