mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-30 06:37:36 +00:00
[Change][Document] Framework-API 调整 Framework 的部分文档内容, 更改相关细节;
[Document] Framework 修正 '<init>(PluginWrapper, File, FrameworkContext)' 和 'getDataFolder()' 方法的文档细节错误; [Change] Framework 更改 'getDataFolder()' 方法在数据目录创建失败时所输出的日志内容; [Change] Framework 更改 'getDescriptor()' 所抛出的异常类型;
This commit is contained in:
parent
10b36e5f80
commit
82759225b3
@ -67,7 +67,7 @@ public abstract class Framework extends Plugin {
|
|||||||
*/
|
*/
|
||||||
public final File getDataFolder() {
|
public final File getDataFolder() {
|
||||||
if (!dataFolder.exists() && !dataFolder.mkdirs()) {
|
if (!dataFolder.exists() && !dataFolder.mkdirs()) {
|
||||||
log.warn("框架 {} 数据目录创建失败.", getDescriptor().getPluginId());
|
log.warn("框架 {} 数据目录创建失败, 请检查是否为应用数据目录提供了读写权限.", getDescriptor().getPluginId());
|
||||||
}
|
}
|
||||||
return dataFolder;
|
return dataFolder;
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ public abstract class Framework extends Plugin {
|
|||||||
if (descriptor instanceof FrameworkDescriptor) {
|
if (descriptor instanceof FrameworkDescriptor) {
|
||||||
return (FrameworkDescriptor) descriptor;
|
return (FrameworkDescriptor) descriptor;
|
||||||
}
|
}
|
||||||
throw new IllegalStateException("无法转换 Descriptor 的类型, 框架管理器可能遭到修改!");
|
throw new ClassCastException("无法转换 Descriptor 的类型, 框架管理器可能遭到修改!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user