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 @Override
public ByteValues validate(ByteValues entry, IndexReader reader) throws IOException { public synchronized ByteValues validate(ByteValues entry, IndexReader reader) throws IOException {
boolean ok = false; boolean ok = false;
if( hasOption(OPTION_CACHE_VALUES) ) { if( hasOption(OPTION_CACHE_VALUES) ) {

View File

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

View File

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

View File

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

View File

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

View File

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