Browse Source

NPE处理方式

feature/big-screen
Maksim 5 years ago
parent
commit
b9f3b1b737
  1. 8
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

8
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -245,13 +245,13 @@ public class EnvChangeEntrance {
Set<Class> noExistServiceSet = getNoExistServiceSet(connectionInfo);
StringBuilder textBuilder = new StringBuilder();
for (Class clazz : noExistServiceSet) {
try {
WorkspaceAPI workspaceAPI = (WorkspaceAPI) clazz.getAnnotation(WorkspaceAPI.class);
String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description());
textBuilder.append(descriptionOfCN).append("\n");
}catch (NullPointerException e){
if(workspaceAPI == null){
FineLoggerFactory.getLogger().info("workspace service {} get annotation failed", clazz);
continue;
}
String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description());
textBuilder.append(descriptionOfCN).append("\n");
}
String areaText = textBuilder.toString();
if(StringUtils.isEmpty(areaText)){

Loading…
Cancel
Save