From f6c6f15f628971dc7d618f847f114addd449ad7e Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 13 Oct 2022 20:32:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-76857=20=E4=BA=91=E7=AB=AF=E8=BF=90?= =?UTF-8?q?=E7=BB=B4=E6=8F=92=E4=BB=B6=E4=B9=9F=E4=BC=9A=E8=A2=AB=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=A3=80=E6=B5=8B=E6=A3=80=E6=B5=8B=E5=88=B0=20?= =?UTF-8?q?=E5=8F=AA=E6=A3=80=E6=B5=8B=20web-inf/lib=20=E5=92=8C=20designe?= =?UTF-8?q?r/lib=20=E4=B8=8B=E9=9D=A2=E7=9A=84=E3=80=82=20=E5=BF=BD?= =?UTF-8?q?=E8=A7=86=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/env/detect/impl/converter/ClassConflictConvertor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java b/designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java index 57c97326e5..6cd92e4039 100644 --- a/designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java +++ b/designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java @@ -48,6 +48,7 @@ public class ClassConflictConvertor implements ThrowableConverter { private static final String JAR_URL_SUFFIX = ".jar!"; private static final String JAR_FILE_SUFFIX = ".jar"; private static final String FILE_URL_PREFIX = "file:"; + private static final String PLUGINS_DIR_NAME = "plugins"; private final Map, ClassNameConverter> throwableMap = new HashMap<>(); @@ -108,6 +109,9 @@ public class ClassConflictConvertor implements ThrowableConverter { for (URL url : urlList) { String file = url.getFile(); String decodeFileStr = URLDecoder.decode(file, EncodeConstants.ENCODING_UTF_8); + if (decodeFileStr.contains(PLUGINS_DIR_NAME)) { + continue; + } if (decodeFileStr.contains(JAR_URL_SUFFIX)) { String jarPath = decodeFileStr.substring(FILE_URL_PREFIX.length(), decodeFileStr.indexOf(JAR_URL_SUFFIX) + JAR_FILE_SUFFIX.length()); String jar = new File(jarPath).getName(); From e6b332b9736bcf45edce6785a1875d5d5a9145c3 Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 13 Oct 2022 20:37:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-76857=20=E4=BA=91=E7=AB=AF=E8=BF=90?= =?UTF-8?q?=E7=BB=B4=E6=8F=92=E4=BB=B6=E4=B9=9F=E4=BC=9A=E8=A2=AB=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=A3=80=E6=B5=8B=E6=A3=80=E6=B5=8B=E5=88=B0=20?= =?UTF-8?q?=E5=88=A0=E6=8E=89=E4=B8=80=E4=B8=AA=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E3=80=82=E4=BE=9D=E8=B5=96=E4=BA=8E=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E7=A8=B3=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/converter/ClassConflictConvertorTest.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/designer-base/src/test/java/com/fr/env/detect/impl/converter/ClassConflictConvertorTest.java b/designer-base/src/test/java/com/fr/env/detect/impl/converter/ClassConflictConvertorTest.java index cdc789b015..20f370b7b1 100644 --- a/designer-base/src/test/java/com/fr/env/detect/impl/converter/ClassConflictConvertorTest.java +++ b/designer-base/src/test/java/com/fr/env/detect/impl/converter/ClassConflictConvertorTest.java @@ -1,5 +1,6 @@ package com.fr.env.detect.impl.converter; +import org.junit.Assert; import org.junit.Test; public class ClassConflictConvertorTest { @@ -10,14 +11,7 @@ public class ClassConflictConvertorTest { ClassNotFoundException ex1 = new ClassNotFoundException("Class 111.222.333 not found"); Iterable names = ClassConflictConvertor.Converter.CLASS.converter(ex1); - System.out.println(); - } - - @Test - public void testConverter() { - - ClassNotFoundException ex1 = new ClassNotFoundException("com.zaxxer.hikari.HikariConfig"); - ClassConflictConvertor convertor = new ClassConflictConvertor(); - convertor.convert(ex1); + String next = names.iterator().next(); + Assert.assertEquals("111.222.333", next); } } \ No newline at end of file