categoryCheck: {
for (String allowedCategory : allowedCategories) {
if (evt.getLoggerName().startsWith(allowedCategory)) {
break categoryCheck;
}
}
return false;
}
Is it any ideas how to rewrite this code without using labels and without considerable increasing of it?
I’d probably put it into its own method:
Then change the calling code to simply call the method: