mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
usage trigger: assert feature name right away since it will be sent as part of statistics
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.internal.statistic;
|
||||
|
||||
import com.intellij.internal.statistic.beans.ConvertUsagesUtil;
|
||||
import com.intellij.internal.statistic.beans.GroupDescriptor;
|
||||
import com.intellij.internal.statistic.beans.UsageDescriptor;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
@@ -56,6 +57,7 @@ public class UsageTrigger implements PersistentStateComponent<UsageTrigger.State
|
||||
}
|
||||
|
||||
private void doTrigger(String feature) {
|
||||
ConvertUsagesUtil.assertDescriptorName(feature);
|
||||
final Integer count = myState.myValues.get(feature);
|
||||
if (count == null) {
|
||||
myState.myValues.put(feature, 1);
|
||||
|
||||
Reference in New Issue
Block a user