You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/02/24 02:37:51 UTC
[incubator-skywalking] branch scope-refactor updated: Add a check.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch scope-refactor
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/scope-refactor by this push:
new 5d43bba Add a check.
5d43bba is described below
commit 5d43bbae6926aacf2317f54e01f6cad41dc3416d
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Feb 24 10:37:43 2019 +0800
Add a check.
---
.../oap/server/core/storage/annotation/StorageAnnotationListener.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageAnnotationListener.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageAnnotationListener.java
index 2dc34dc..5fd5533 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageAnnotationListener.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageAnnotationListener.java
@@ -24,6 +24,7 @@ import java.util.*;
import lombok.Getter;
import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorAnnotationUtils;
import org.apache.skywalking.oap.server.core.annotation.AnnotationListener;
+import org.apache.skywalking.oap.server.core.source.DefaultScopeDefine;
import org.apache.skywalking.oap.server.core.storage.model.*;
import org.slf4j.*;
@@ -50,6 +51,8 @@ public class StorageAnnotationListener implements AnnotationListener, IModelGett
String modelName = StorageEntityAnnotationUtils.getModelName(aClass);
boolean deleteHistory = StorageEntityAnnotationUtils.getDeleteHistory(aClass);
int sourceScopeId = StorageEntityAnnotationUtils.getSourceScope(aClass);
+ // Check this scope id is valid.
+ DefaultScopeDefine.nameOf(sourceScopeId);
List<ModelColumn> modelColumns = new LinkedList<>();
boolean isIndicator = IndicatorAnnotationUtils.isIndicator(aClass);
retrieval(aClass, modelName, modelColumns);