Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ if test "x${COMPILE_JNI}" = xyes; then
gethostbyname_r localtime_r \
strerror_r \
fcntl \
statvfs \
statvfs \
mmap munmap mincore msync madvise getpagesize sysconf \
lstat readlink \
inet_aton inet_addr inet_pton \
Expand Down
7 changes: 5 additions & 2 deletions java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public class Thread implements Runnable
/** Thread local storage. Package accessible for use by
* InheritableThreadLocal.
*/
final ThreadLocalMap locals;
ThreadLocalMap locals;

/** The uncaught exception handler. */
UncaughtExceptionHandler exceptionHandler;
Expand Down Expand Up @@ -1073,7 +1073,10 @@ synchronized void die()
*/
static ThreadLocalMap getThreadLocals()
{
return currentThread().locals;
Thread t = currentThread();
if (t.locals == null)
t.locals = new ThreadLocalMap();
return t.locals;
}

/**
Expand Down
21 changes: 11 additions & 10 deletions java/net/ResolverCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@
*/
class ResolverCache
{
/**
* The cache itself. It is declared before the TTLs: computing them can
* load classes that resolve names, and the cache must exist by then.
*/
private static HashMap<Object, Entry> cache = new HashMap<Object, Entry>();

/**
* List of entries which may expire.
*/
private static LinkedList<Entry> killqueue = new LinkedList<Entry>();

/**
* The time in seconds for which successful lookups are cached.
*/
Expand All @@ -94,16 +105,6 @@ private static int getTTL(String propName, int defaultValue)
return Integer.parseInt(propValue);
}

/**
* The cache itself.
*/
private static HashMap<Object, Entry> cache = new HashMap<Object, Entry>();

/**
* List of entries which may expire.
*/
private static LinkedList<Entry> killqueue = new LinkedList<Entry>();

/**
* Return the hostname for the specified IP address.
*
Expand Down
4 changes: 4 additions & 0 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ resources: copy-vmresources.sh
if ! test -d "$$dirname"; then @mkdir_p@ "$$dirname"; fi; \
cp $(top_srcdir)/resource/$$p $$p; \
done
@list=`cd $(top_srcdir)/resource && $(FIND) META-INF -name \*\.in -print`; for p in $$list; do \
f=`echo $$p | sed -e 's/\.in$$//'`; \
if test -f $(top_builddir)/resource/$$f; then cp $(top_builddir)/resource/$$f $$f; fi; \
done
@$(SHELL) ./copy-vmresources.sh
@list=`cd $(top_srcdir) && $(FIND) gnu/javax/swing/plaf/gtk/icons -name *.png -type f -print`; for p in $$list; do \
dirname=`dirname $$p`; \
Expand Down