Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add locks to BundleWiringImpl. #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,7 @@ public URL getResourceByDelegation(String name)
private Object findClassOrResourceByDelegation(String name, boolean isClass)
throws ClassNotFoundException, ResourceNotFoundException
{
synchronized (this) {
Object result = null;

Set requestSet = (Set) m_cycleCheck.get();
Expand Down Expand Up @@ -1599,6 +1600,7 @@ private Object findClassOrResourceByDelegation(String name, boolean isClass)

return result;
}
}

private Object searchImports(String pkgName, String name, boolean isClass)
throws ClassNotFoundException, ResourceNotFoundException
Expand Down Expand Up @@ -1967,6 +1969,7 @@ public BundleImpl getBundle()
protected Class loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
synchronized (getClassLoadingLock(name)) {
Class clazz = findLoadedClass(name);

if (clazz == null)
Expand Down Expand Up @@ -2006,6 +2009,7 @@ protected Class loadClass(String name, boolean resolve)
}
return clazz;
}
}

@Override
protected Class findClass(String name) throws ClassNotFoundException
Expand Down