I was working on a project that missbehaved, for some reasons no exception was thrown even when it should have. Deep down I have found this kind of error handling:
try { m.invoke(parentObject, paramObj); } catch (IllegalArgumentException e) { new CaseLibException(e); } catch (IllegalAccessException e) { new CaseLibException(e); } catch (InvocationTargetException e) { new CaseLibException(e); }
My brain recognized that several exceptions were wrapped into another one, so that’s not so bad. But I had to stumble over this code at least 3 times to see what’s missing…
What is your most stupid bug you could not find?
I fixed a bug once where the application crashed every day at 6:12pm.
Turned out that someone had stored the number of seconds since the start of the day in a 16bit int.