Menu

#2 not thread safe

open
nobody
None
5
2006-07-11
2006-07-11
Anonymous
No

It looks like the code in the package is not thread-
safe. For example, the following variable are
declared static in nsCP1252Verifier:

static int[] cclass ;
static int[] states ;

But than these are re-initialized for every instance
of the class:

public nsCP1252Verifier() {
cclass = new int[256/8] ;
...
states = new int[3] ;
...
}

Either the variables should be made non-static or the
initialization should be moved to static block.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.