more code review.. I'm so sorry to keep asking so many detailed questions about the code.. but it needs to happen I suppose..


QueryImpl.java has an internal property called _compiling. It is set to true when the Query is actively compiling the query ( compileForCompilation ).

Alright, what I'm confused about, is that it's being used as a short-circuit flag on "isUnique" and "getParameterDeclaration". Such that if you call isUnique while the query is being compiled, they both return the current value ( could be false or null ).

This just seems a little complicated. At first thought, it looks like it's trying to protect the method going and calling compileForCompilation recursively, but I would think there are better ways.. or that the check for recursive calls should be within compileForCompilation.. etc etc..

I'm just getting lost in the logic as to why it's there, wondering if it needs to be there, or something else that could simplify this code. My ultimate goal is to move the if statements within those two methods that use _compiling, outside the lock, thus increasing lock granularity...

Reply via email to