!1046 修复issues:I7PHNT( JDK17下,PinyinUtil的 debug日志报错问题)

Merge pull request !1046 from 三斤/v6-dev
This commit is contained in:
Looly 2023-08-03 10:01:46 +00:00 committed by Gitee
commit 0ffaf47952
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -32,7 +32,9 @@ public class PinyinEngineFactory {
* @return 单例的PinyinEngine * @return 单例的PinyinEngine
*/ */
public static PinyinEngine getEngine(){ public static PinyinEngine getEngine(){
return Singleton.get(PinyinEngine.class.getName(), PinyinEngineFactory::createEngine); final PinyinEngine engine = Singleton.get(PinyinEngine.class.getName(), PinyinEngineFactory::createEngine);
LogUtil.debug("Use [{}] Engine As Default.", StrUtil.removeSuffix(engine.getClass().getSimpleName(), "Engine"));
return engine;
} }
/** /**
@ -42,9 +44,7 @@ public class PinyinEngineFactory {
* @return {@link PinyinEngine} * @return {@link PinyinEngine}
*/ */
public static PinyinEngine createEngine() { public static PinyinEngine createEngine() {
final PinyinEngine engine = doCreateEngine(); return doCreateEngine();
LogUtil.debug("Use [{}] Engine As Default.", StrUtil.removeSuffix(engine.getClass().getSimpleName(), "Engine"));
return engine;
} }
/** /**