unofficial import from https://svn.java.net/svn/jawr~svn/branches/3.5.x_development/core/