Skip to content

Commit

Permalink
EventWatchBuilder支持正则表达式模式
Browse files Browse the repository at this point in the history
添加LOGO
增加测试用例日志
完善模块管理日志
提交CoreLoadedClassDataSource的单元测试
完成CoreModuleManager测试用例
提交CoreModuleManager的单元测试
优化import
修复问题 #117
完善测试用例
修复重复查询user_module的BUG
  • Loading branch information
luanjia committed Dec 11, 2018
1 parent 24259b0 commit 9f74182
Show file tree
Hide file tree
Showing 512 changed files with 3,023 additions and 511 deletions.
2 changes: 1 addition & 1 deletion bin/sandbox-logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level %msg%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss} %SANDBOX_NAMESPACE %-5level %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
Expand Down
7 changes: 5 additions & 2 deletions bin/sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ exit_on_err()
# display usage
function usage() {
echo "
usage: ${0} [h] [<p:> [vlRFfu:a:A:d:m:I:P:C:]]
usage: ${0} [h] [<p:> [vlRFfu:a:A:d:m:I:P:C:X]]
-h : help
Prints the ${0} help
-X : debug
Prints debug message
-p : PID
Select target JVM process ID
Expand Down Expand Up @@ -253,7 +255,7 @@ function main() {

check_permission

while getopts "hp:vFfRu:a:A:d:m:I:P:ClSn:" ARG
while getopts "hp:vFfRu:a:A:d:m:I:P:ClSn:X" ARG
do
case ${ARG} in
h) usage;exit;;
Expand All @@ -273,6 +275,7 @@ function main() {
C) OP_CONNECT_ONLY=1;;
S) OP_SHUTDOWN=1;;
n) OP_NAMESPACE=1;ARG_NAMESPACE=${OPTARG};;
X) set -x;;
?) usage;exit_on_err 1;;
esac
done
Expand Down
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.1.1</version>
<version>1.1.2-SNAPSHOT</version>
<packaging>pom</packaging>

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

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sandbox.version>1.1.1</sandbox.version>
<sandbox.version>1.1.2-SNAPSHOT</sandbox.version>
</properties>

<build>
Expand Down Expand Up @@ -128,11 +128,16 @@
<module>sandbox-mgr-provider</module>
<module>sandbox-module-starter</module>
<module>sandbox-debug-module</module>
<module>sandbox-qatest</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sandbox-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.1.1</version>
<version>1.1.2-SNAPSHOT</version>
</parent>
<artifactId>sandbox-agent</artifactId>
<name>sandbox-agent ${sandbox.version}</name>
Expand Down
Binary file not shown.
Binary file not shown.
7 changes: 6 additions & 1 deletion sandbox-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.1.1</version>
<version>1.1.2-SNAPSHOT</version>
</parent>
<artifactId>sandbox-api</artifactId>
<name>sandbox-api ${sandbox.version}</name>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-common-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public interface ModuleLifecycle extends LoadCompleted {
*/
void onLoad() throws Throwable;


/**
* 模块卸载,模块开始卸载之前调用!
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
* @author luanjia@taobao.com
* @since {@code sandbox-api:1.0.10}
*/
class AdviceAdapterListener implements EventListener {
public class AdviceAdapterListener implements EventListener {

private final AdviceListener adviceListener;

AdviceAdapterListener(final AdviceListener adviceListener) {
public AdviceAdapterListener(final AdviceListener adviceListener) {
this.adviceListener = adviceListener;
}

Expand Down Expand Up @@ -71,6 +71,16 @@ final public void onEvent(final Event event) throws Throwable {
adviceListener.before(advice);
break;
}

/**
* 这里需要感知到IMMEDIATELY,修复#117
*/
case IMMEDIATELY_THROWS:
case IMMEDIATELY_RETURN: {
final InvokeEvent invokeEvent = (InvokeEvent) event;
opStackRef.get().popByExpectInvokeId(invokeEvent.invokeId);
}

case RETURN: {
final OpStack opStack = opStackRef.get();
final ReturnEvent rEvent = (ReturnEvent) event;
Expand Down
Loading

0 comments on commit 9f74182

Please sign in to comment.