Browse Source

Pull request #10830: REPORT-84965 插件-插件管理-插件id里有下划线,安装之后无法删除

Merge in DESIGN/design from ~LEO.QIN/design:release/11.0 to release/11.0

* commit 'e07f06b64924444f69ef3eda1b6831f6f8cb490c':
  REPORT-84965 插件-插件管理-插件id里有下划线,安装之后无法删除 【问题原因】后端解析'_'时,仅考虑有一个'_' 【改动思路】使用最后出现的'_'分隔id和version 【review建议】无
release/11.0
Leo.Qin-覃宇攀 2 years ago
parent
commit
68a055ab01
  1. 11
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

11
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -10,8 +10,8 @@ import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.PluginVerifyException;
import com.fr.plugin.basic.version.Version;
import com.fr.plugin.basic.version.VersionIntervalType;
import com.fr.plugin.basic.version.VersionIntervalFactory;
import com.fr.plugin.basic.version.VersionIntervalType;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.error.PluginBaseErrorCode;
@ -23,7 +23,7 @@ import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.JOptionPane;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@ -47,9 +47,10 @@ public class PluginUtils {
public static PluginMarker createPluginMarker(String pluginInfo) {
//todo 判空
String[] plugin = pluginInfo.split("_");
return PluginMarker.create(plugin[0], plugin[1]);
int splitIndex = pluginInfo.lastIndexOf("_");
String pluginID = pluginInfo.substring(0, splitIndex);
String version = pluginInfo.substring(splitIndex + 1);
return PluginMarker.create(pluginID, version);
}
public static JSONObject getLatestPluginInfo(String pluginID) throws Exception {

Loading…
Cancel
Save