Looks like it to me, also appears in the 1.2 branch.
Is className typically null, resulting in the offending path only
taken with a custom level? If not, could checks for
"org.apache.log4j.Level" and "org.apache.log4j.Priority" avoiding the
reflection overhead except where really needed?
I've got to think the cost of a "new Integer[1]" in anything later
than JDK 1.1 has got to be trivial compared to the method invocation
overhead. Unfortunately, you can't eliminate PARAM_ARRAY since it
wasn't declared private, but you aren't required to use it. You
should mark it deprecated however.
On Dec 1, 2005, at 11:39 PM, Paul Smith wrote:
Umm, am I missing something or is this thread unsafe in LoggingEvent?
static final Integer[] PARAM_ARRAY = new Integer[1];
....
in readLevel(ObjectInputStream){.
....
PARAM_ARRAY[0] = new Integer(p);
level = (Level)m.invoke(null, (Object[]) PARAM_ARRAY);
Is there some synchronization done here? If not, wouldn't the
PARAM_ARRAY be shared? If this was the case and one had multiple
Receivers reading data from multiple sources, then there is a
possibility of data corruption?
Thoughts?
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]