Skip to content

The Unified and Autonomous Development Platform

Fix issue #874 - CodeIndexer exception - Indexing large repo with Lucene results in exception.

Robin Shenf41dac00eee1
diff --git a/pom.xml b/pom.xml
index 7c08273878..cdbe53c046 100644
--- a/pom.xml
+++ b/pom.xml
@@ -588,8 +588,8 @@
</repository>
</repositories>
<properties>
- <commons.version>2.2.7</commons.version>
- <agent.version>1.3.22</agent.version>
+ <commons.version>2.2.8</commons.version>
+ <agent.version>1.3.23</agent.version>
<slf4j.version>1.7.30</slf4j.version>
<logback.version>1.2.9</logback.version>
<antlr.version>4.7.2</antlr.version>
diff --git a/server-plugin/server-plugin-import-url/src/main/java/io/onedev/server/plugin/imports/url/ImportServer.java b/server-plugin/server-plugin-import-url/src/main/java/io/onedev/server/plugin/imports/url/ImportServer.java
index ed0ad0d9b7..a0f0d55847 100644
--- a/server-plugin/server-plugin-import-url/src/main/java/io/onedev/server/plugin/imports/url/ImportServer.java
+++ b/server-plugin/server-plugin-import-url/src/main/java/io/onedev/server/plugin/imports/url/ImportServer.java
@@ -78,7 +78,7 @@ public class ImportServer implements Serializable, Validatable {
private static String deriveProjectPath(String url) {
String hostAndPath = StringUtils.substringAfter(url, "//");
if (StringUtils.isNotBlank(hostAndPath)) {
- String path = StringUtils.substringAfter(hostAndPath, "/");
+ String path = StringUtils.stripEnd(StringUtils.substringAfter(hostAndPath, "/"), "/");
if (StringUtils.isNotBlank(path))
return path;
}