Skip to content

Commit e65fd77

Browse files
committed
pref:获取插件私有配置优化 #50
1 parent fd86e68 commit e65fd77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/tencent/bk/devops/atom/AtomContext.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ private T readParam(Class<T> paramClazz) throws IOException {
8989
String json =
9090
FileUtils.readFileToString(new File(dataDir + "/" + inputFile), ATOM_FILE_ENCODING);
9191
T param = JsonUtil.fromJson(json, paramClazz);
92-
String atomCode = param.getAtomCode();
92+
String atomCode = null;
93+
if (param != null) {
94+
atomCode = param.getAtomCode();
95+
}
9396
if (atomCode == null || !atomCode.equals(System.getenv("BK_CI_ATOM_CODE"))) {
9497
// 本地测试环境不调蓝盾接口设置插件敏感信息
9598
return param;

0 commit comments

Comments
 (0)