Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
banq committed Oct 15, 2019
1 parent 0659a5c commit dd4bd1d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
import com.jdon.jivejdon.model.ForumMessage;
import com.jdon.jivejdon.model.ForumThread;
import com.jdon.jivejdon.repository.ForumFactory;
import com.jdon.jivejdon.repository.property.TagRepository;
import com.jdon.jivejdon.repository.dao.MessageDao;
import com.jdon.jivejdon.repository.dao.PropertyDao;
import com.jdon.jivejdon.repository.dao.SequenceDao;
import com.jdon.jivejdon.repository.property.TagRepository;
import com.jdon.jivejdon.util.ContainerUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
Expand All @@ -43,7 +44,7 @@ public class ForumAbstractFactory implements ForumFactory {

private final SequenceDao sequenceDao;

private final Map nullthreads ;
private final Map<Long,String> nullthreads ;

// define in component.xml

Expand Down Expand Up @@ -158,12 +159,12 @@ public Long getNextId(final int idType) throws Exception {


private static <K,V> Map<K,V> lruCache(final int maxSize) {
return new LinkedHashMap<K,V>(maxSize*4/3, 0.75f, true) {
return Collections.synchronizedMap(new LinkedHashMap<K,V>(maxSize*4/3, 0.75f, true) {
@Override
protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
return size() > maxSize;
}
};
});
}

}

0 comments on commit dd4bd1d

Please sign in to comment.