LUCENE-2751: fix thread safety issue with FieldCacheImpl.get

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1055409 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-01-05 11:02:24 +00:00
parent d53692d45a
commit 570e19e579
6 changed files with 6 additions and 6 deletions

View File

@ -74,7 +74,7 @@ public class ByteValuesCreator extends CachedArrayCreator<ByteValues>
}
@Override
public ByteValues validate(ByteValues entry, IndexReader reader) throws IOException {
public synchronized ByteValues validate(ByteValues entry, IndexReader reader) throws IOException {
boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) {

View File

@ -74,7 +74,7 @@ public class DoubleValuesCreator extends CachedArrayCreator<DoubleValues>
}
@Override
public DoubleValues validate(DoubleValues entry, IndexReader reader) throws IOException {
public synchronized DoubleValues validate(DoubleValues entry, IndexReader reader) throws IOException {
boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) {

View File

@ -75,7 +75,7 @@ public class FloatValuesCreator extends CachedArrayCreator<FloatValues>
}
@Override
public FloatValues validate(FloatValues entry, IndexReader reader) throws IOException {
public synchronized FloatValues validate(FloatValues entry, IndexReader reader) throws IOException {
boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) {

View File

@ -75,7 +75,7 @@ public class IntValuesCreator extends CachedArrayCreator<IntValues>
}
@Override
public IntValues validate(IntValues entry, IndexReader reader) throws IOException {
public synchronized IntValues validate(IntValues entry, IndexReader reader) throws IOException {
boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) {

View File

@ -75,7 +75,7 @@ public class LongValuesCreator extends CachedArrayCreator<LongValues>
}
@Override
public LongValues validate(LongValues entry, IndexReader reader) throws IOException {
public synchronized LongValues validate(LongValues entry, IndexReader reader) throws IOException {
boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) {

View File

@ -75,7 +75,7 @@ public class ShortValuesCreator extends CachedArrayCreator<ShortValues>
}
@Override
public ShortValues validate(ShortValues entry, IndexReader reader) throws IOException {
public synchronized ShortValues validate(ShortValues entry, IndexReader reader) throws IOException {
boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) {