{
name += postfix;
}
}
}
Permission source = createPermission(new PermissionInfo(
FilePermission.class.getName(), name,
m_permissionInfos[i].getActions()), targetClass);
if (source.implies(target))
{
return true;
}
}
}
return false;
}
Object current = m_stack.get();
if (current == null)
{
m_stack.set(targetClass);
}
else
{
if (current instanceof HashSet)
{
if (((HashSet) current).contains(targetClass))
{
return false;
}
((HashSet) current).add(targetClass);
}
else
{
if (current == targetClass)
{
return false;
}
HashSet frame = new HashSet();
frame.add(current);
frame.add(targetClass);
m_stack.set(frame);
current = frame;
}
}
try
{
SoftReference collectionEntry = null;
PermissionCollection collection = null;
synchronized (m_cache)
{
collectionEntry = (SoftReference) m_cache.get(targetClass);
}
if (collectionEntry != null)
{
collection = (PermissionCollection) collectionEntry.get();
}
if (collection == null)
{
collection = target.newPermissionCollection();
if (collection == null)
{
collection = new DefaultPermissionCollection();
}
for (int i = 0; i < m_permissionInfos.length; i++)
{
PermissionInfo permissionInfo = m_permissionInfos[i];
String infoType = permissionInfo.getType();
String permissionType = targetClass.getName();
if (infoType.equals(permissionType))
{
Permission permission = createPermission(