chore[func]: if can't get the property name corresponding to Func, an exception will be thrown

This commit is contained in:
godotg
2024-02-27 19:28:01 +08:00
parent 341b384017
commit 27b3902772
@@ -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;
}