Fixes #195 by adding static initialisation of the maps rather then using the constructor
This commit is contained in:
parent
724c084abf
commit
77c4a04d3d
@ -119,10 +119,9 @@ public class HtmlEncoder
|
||||
};
|
||||
|
||||
/**
|
||||
* <p>Constructor for HtmlEncoder.</p>
|
||||
* Initialises the mappings between entities and characters
|
||||
*/
|
||||
public HtmlEncoder()
|
||||
{
|
||||
static {
|
||||
for (int i = 0; i < entities.length; i++)
|
||||
e2i.put((String) entities[i][0], (Integer) entities[i][1]);
|
||||
for (int i = 0; i < entities.length; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user