com.ctc.wstx.compat
Class Jdk14Impl

java.lang.Object
  extended by com.ctc.wstx.compat.JdkImpl
      extended by com.ctc.wstx.compat.Jdk12Impl
          extended by com.ctc.wstx.compat.Jdk13Impl
              extended by com.ctc.wstx.compat.Jdk14Impl

public class Jdk14Impl
extends Jdk13Impl

JDK 1.4 compatible implementation; adds support for setting Exception root cause, as well as for java.util.LinkedHashMap.


Constructor Summary
  Jdk14Impl()
          Constructor used for creating 'real' instance.
protected Jdk14Impl(boolean dummy)
          Constructor derived classes call to avoid creation of helper Objects 'real' instance needs (if any)
 
Method Summary
 java.util.HashMap getInsertOrderedMap()
          Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.
 java.util.HashMap getInsertOrderedMap(int initialSize)
          Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.
 java.util.HashMap getLRULimitMap(int maxSize)
          1.2 doesn't have LinkedHashMap, so as usual, let's just create a HashMap
 boolean leakingThreadLocal()
          1.4 finally has correct AND fast ThreadLocal implementation.
 boolean setInitCause(java.lang.Throwable newT, java.lang.Throwable rootT)
          Too bad it's only 1.4+ that can set the root cause...
 
Methods inherited from class com.ctc.wstx.compat.Jdk13Impl
getEmptyList, getEmptyMap, getEmptySet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jdk14Impl

public Jdk14Impl()
Constructor used for creating 'real' instance.


Jdk14Impl

protected Jdk14Impl(boolean dummy)
Constructor derived classes call to avoid creation of helper Objects 'real' instance needs (if any)

Method Detail

leakingThreadLocal

public final boolean leakingThreadLocal()
1.4 finally has correct AND fast ThreadLocal implementation. (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4414045 for details); and following versions should be fine.

Overrides:
leakingThreadLocal in class Jdk13Impl
Returns:
True if using ThreadLocal is safe, and should not (in itself) be able to cause memory leaks; false if it is possible

getInsertOrderedMap

public java.util.HashMap getInsertOrderedMap()
Description copied from class: Jdk12Impl
Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.

Overrides:
getInsertOrderedMap in class Jdk12Impl

getInsertOrderedMap

public java.util.HashMap getInsertOrderedMap(int initialSize)
Description copied from class: Jdk12Impl
Alas, 1.2 doesn't have LinkedHashMap; only available from 1.4+, so let's just create a standard HashMap.

Overrides:
getInsertOrderedMap in class Jdk12Impl

getLRULimitMap

public java.util.HashMap getLRULimitMap(int maxSize)
Description copied from class: Jdk12Impl
1.2 doesn't have LinkedHashMap, so as usual, let's just create a HashMap

Overrides:
getLRULimitMap in class Jdk12Impl

setInitCause

public boolean setInitCause(java.lang.Throwable newT,
                            java.lang.Throwable rootT)
Description copied from class: Jdk12Impl
Too bad it's only 1.4+ that can set the root cause...

Overrides:
setInitCause in class Jdk12Impl
Returns:
True if call succeeds, false if not.