Skip to content

Commit 9f74182

Browse files
author
luanjia
committed
EventWatchBuilder支持正则表达式模式
添加LOGO 增加测试用例日志 完善模块管理日志 提交CoreLoadedClassDataSource的单元测试 完成CoreModuleManager测试用例 提交CoreModuleManager的单元测试 优化import 修复问题 #117 完善测试用例 修复重复查询user_module的BUG
1 parent 24259b0 commit 9f74182

File tree

512 files changed

+3023
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

512 files changed

+3023
-511
lines changed

Diff for: bin/sandbox-logback.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<MaxHistory>30</MaxHistory>
99
</rollingPolicy>
1010
<encoder>
11-
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level %msg%n</pattern>
11+
<pattern>%d{yyyy-MM-dd HH:mm:ss} %SANDBOX_NAMESPACE %-5level %msg%n</pattern>
1212
<charset>UTF-8</charset>
1313
</encoder>
1414
</appender>

Diff for: bin/sandbox.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ exit_on_err()
5050
# display usage
5151
function usage() {
5252
echo "
53-
usage: ${0} [h] [<p:> [vlRFfu:a:A:d:m:I:P:C:]]
53+
usage: ${0} [h] [<p:> [vlRFfu:a:A:d:m:I:P:C:X]]
5454
5555
-h : help
5656
Prints the ${0} help
5757
58+
-X : debug
59+
Prints debug message
5860
5961
-p : PID
6062
Select target JVM process ID
@@ -253,7 +255,7 @@ function main() {
253255

254256
check_permission
255257

256-
while getopts "hp:vFfRu:a:A:d:m:I:P:ClSn:" ARG
258+
while getopts "hp:vFfRu:a:A:d:m:I:P:ClSn:X" ARG
257259
do
258260
case ${ARG} in
259261
h) usage;exit;;
@@ -273,6 +275,7 @@ function main() {
273275
C) OP_CONNECT_ONLY=1;;
274276
S) OP_SHUTDOWN=1;;
275277
n) OP_NAMESPACE=1;ARG_NAMESPACE=${OPTARG};;
278+
X) set -x;;
276279
?) usage;exit_on_err 1;;
277280
esac
278281
done

Diff for: pom.xml

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
<groupId>com.alibaba.jvm.sandbox</groupId>
77
<artifactId>sandbox</artifactId>
8-
<version>1.1.1</version>
8+
<version>1.1.2-SNAPSHOT</version>
99
<packaging>pom</packaging>
1010

1111
<name>sandbox ${sandbox.version}</name>
1212

1313
<properties>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
<sandbox.version>1.1.1</sandbox.version>
15+
<sandbox.version>1.1.2-SNAPSHOT</sandbox.version>
1616
</properties>
1717

1818
<build>
@@ -128,11 +128,16 @@
128128
<module>sandbox-mgr-provider</module>
129129
<module>sandbox-module-starter</module>
130130
<module>sandbox-debug-module</module>
131-
<module>sandbox-qatest</module>
132131
</modules>
133132

134133
<dependencyManagement>
135134
<dependencies>
135+
<dependency>
136+
<groupId>junit</groupId>
137+
<artifactId>junit</artifactId>
138+
<version>4.9</version>
139+
<scope>test</scope>
140+
</dependency>
136141
<dependency>
137142
<groupId>com.alibaba.jvm.sandbox</groupId>
138143
<artifactId>sandbox-api</artifactId>

Diff for: sandbox-agent/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.alibaba.jvm.sandbox</groupId>
88
<artifactId>sandbox</artifactId>
9-
<version>1.1.1</version>
9+
<version>1.1.2-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>sandbox-agent</artifactId>
1212
<name>sandbox-agent ${sandbox.version}</name>
Binary file not shown.
Binary file not shown.

Diff for: sandbox-api/pom.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
<parent>
77
<groupId>com.alibaba.jvm.sandbox</groupId>
88
<artifactId>sandbox</artifactId>
9-
<version>1.1.1</version>
9+
<version>1.1.2-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>sandbox-api</artifactId>
1212
<name>sandbox-api ${sandbox.version}</name>
1313

1414
<dependencies>
15+
<dependency>
16+
<groupId>junit</groupId>
17+
<artifactId>junit</artifactId>
18+
<scope>test</scope>
19+
</dependency>
1520
<dependency>
1621
<groupId>com.alibaba.jvm.sandbox</groupId>
1722
<artifactId>sandbox-common-api</artifactId>

Diff for: sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/ModuleLifecycle.java

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public interface ModuleLifecycle extends LoadCompleted {
1818
*/
1919
void onLoad() throws Throwable;
2020

21+
2122
/**
2223
* 模块卸载,模块开始卸载之前调用!
2324
* <p>

Diff for: sandbox-api/src/main/java/com/alibaba/jvm/sandbox/api/listener/ext/AdviceAdapterListener.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
1717
* @since {@code sandbox-api:1.0.10}
1818
*/
19-
class AdviceAdapterListener implements EventListener {
19+
public class AdviceAdapterListener implements EventListener {
2020

2121
private final AdviceListener adviceListener;
2222

23-
AdviceAdapterListener(final AdviceListener adviceListener) {
23+
public AdviceAdapterListener(final AdviceListener adviceListener) {
2424
this.adviceListener = adviceListener;
2525
}
2626

@@ -71,6 +71,16 @@ final public void onEvent(final Event event) throws Throwable {
7171
adviceListener.before(advice);
7272
break;
7373
}
74+
75+
/**
76+
* 这里需要感知到IMMEDIATELY,修复#117
77+
*/
78+
case IMMEDIATELY_THROWS:
79+
case IMMEDIATELY_RETURN: {
80+
final InvokeEvent invokeEvent = (InvokeEvent) event;
81+
opStackRef.get().popByExpectInvokeId(invokeEvent.invokeId);
82+
}
83+
7484
case RETURN: {
7585
final OpStack opStack = opStackRef.get();
7686
final ReturnEvent rEvent = (ReturnEvent) event;

0 commit comments

Comments
 (0)