From 27b5ab3e3a484d476e7acd66466a8baf2e672d92 Mon Sep 17 00:00:00 2001 From: zapata Date: Mon, 17 Dec 2007 13:03:28 +0000 Subject: [PATCH] *** empty log message *** --- source/mir/storage/store/ObjectStore.java | 1 + source/mir/storage/store/StoreContainer.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/mir/storage/store/ObjectStore.java b/source/mir/storage/store/ObjectStore.java index eba9fdd8..11906f7e 100755 --- a/source/mir/storage/store/ObjectStore.java +++ b/source/mir/storage/store/ObjectStore.java @@ -170,6 +170,7 @@ public class ObjectStore { StoreContainerType stoc_type = sid.getStoreContainerType(); return getStoreContainerForStocType(stoc_type); } + return null; } diff --git a/source/mir/storage/store/StoreContainer.java b/source/mir/storage/store/StoreContainer.java index f115e7aa..acec906f 100755 --- a/source/mir/storage/store/StoreContainer.java +++ b/source/mir/storage/store/StoreContainer.java @@ -96,11 +96,11 @@ public class StoreContainer { return null; } - public boolean has(StoreIdentifier sid) { + public synchronized boolean has(StoreIdentifier sid) { return container.contains(sid); } - public void add(StoreIdentifier sid) { + public synchronized void add(StoreIdentifier sid) { if (sid != null && sid.hasReference()) { if (has(sid)) { moveToHead(sid); @@ -146,7 +146,7 @@ public class StoreContainer { * Description: readjusts StoreContainer size to value. * */ - public void setSize(int size) { + public synchronized void setSize(int size) { if (size < 0) return; shrinkToSize(size); @@ -157,7 +157,7 @@ public class StoreContainer { shrinkToSize(maxSize); } - private void shrinkToSize(int size) { + private synchronized void shrinkToSize(int size) { if (size < container.size()) { // shrink while (size < container.size()) { -- 2.11.0