mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-57766 - assert: UsageTrigger.doTrigger
This commit is contained in:
+6
-1
@@ -160,7 +160,12 @@ public class ConvertUsagesUtil {
|
||||
*/
|
||||
@NotNull
|
||||
public static String escapeDescriptorName(@NotNull final String name) {
|
||||
return name.replace(" ", "_").replace(GROUP_SEPARATOR, '_').replace(GROUPS_SEPARATOR, '_').replace(GROUP_VALUE_SEPARATOR, '_');
|
||||
return name.replace(" ", "_").
|
||||
replace(GROUP_SEPARATOR, '_').
|
||||
replace(GROUPS_SEPARATOR, '_').
|
||||
replace(GROUP_VALUE_SEPARATOR, '_')
|
||||
.replace("'", " ")
|
||||
.replace("\"", " ");
|
||||
}
|
||||
|
||||
private static class StringPair {
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.intellij.internal.statistic.beans;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class ConvertUsagesUtilTest extends TestCase {
|
||||
|
||||
public void testEscapeDescriptorName() throws Exception {
|
||||
ConvertUsagesUtil.assertDescriptorName(ConvertUsagesUtil.escapeDescriptorName("'Copy'_on_Steroids"));
|
||||
ConvertUsagesUtil.assertDescriptorName(ConvertUsagesUtil.escapeDescriptorName("Some config name"));
|
||||
ConvertUsagesUtil.assertDescriptorName(ConvertUsagesUtil.escapeDescriptorName("\"config\""));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user