经过长时间的搜索,由于缺乏理解,我没有找到好的回应。
我想了解 Java 的 Eclipse (indigo) 中的这些选项。这些选项:
我了解 Java 编译或 Javadoc 中的注释过程,但不了解标签 @forbidden 或 @discouraged。
为什么 Eclipse 知道是禁止引用还是不鼓励引用?
Where is these access rules ? Is Java process or Eclipse process?
IMPORTANT : I don't develop a plugin and I am not in PDE Eclipse.
Can you help me to understand the process and theory logic for these options?
希望有人能指出我在这里做错了什么。我有一个读取文件访问规则的进程,我正在尝试并行运行它。
这是我到目前为止的代码:
public List<FolderAccessRule> GetSecurityGroupsForFolder(long importId, string subdirectory, bool includeInherited)
{
ConcurrentQueue<FolderAccessRule> groups = new ConcurrentQueue<FolderAccessRule>();
ConcurrentQueue<Exception> exceptions = new ConcurrentQueue<Exception>();
DirectoryInfo dInfo = new DirectoryInfo(subdirectory);
DirectorySecurity dSecurity = dInfo.GetAccessControl();
AuthorizationRuleCollection authorizationRuleCollection = dSecurity.GetAccessRules(true, includeInherited, typeof(NTAccount));
Parallel.ForEach( authorizationRuleCollection,
fsar =>
{
try
{
FolderAccessRule group = this.GetGroup(fsar);
if (group != null)
{
groups.Enqueue(group);
}
}
catch (Exception e)
{
exceptions.Enqueue(e);
}
});
foreach (Exception e in exceptions)
{
string message = string.Concat(e.GetType(), "Exception getting Directory info for ", subdirectory);
this.RecordException(message, …Run Code Online (Sandbox Code Playgroud)