mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-05 18:25:26 +00:00
chore[func]: if can't get the property name corresponding to Func, an exception will be thrown
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
package com.zfoo.storage.manager;
|
||||
|
||||
import com.zfoo.protocol.collection.CollectionUtils;
|
||||
import com.zfoo.protocol.exception.RunException;
|
||||
import com.zfoo.protocol.util.*;
|
||||
import com.zfoo.storage.anno.Index;
|
||||
import com.zfoo.storage.interpreter.ResourceInterpreter;
|
||||
@@ -222,6 +223,11 @@ public abstract class AbstractStorage<K, V> implements IStorage<K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
// 所有的方法都取不到Func对应的属性名称则抛出异常
|
||||
if (indexName == null) {
|
||||
throw new RunException("can not get indexName from func:[{}]", func);
|
||||
}
|
||||
|
||||
funcCaches.put(func, indexName);
|
||||
return indexName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user