Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3dcd0e1

Browse files
author
zhourenjian
committed
Fixed bug on methods stack error while compiling classes which are extending SimplePipeRunnable
1 parent bf1aebe commit 3dcd0e1

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/net/sf/j2s/core/astvisitors/ASTScriptVisitor.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import org.eclipse.jdt.core.dom.SimpleType;
4848
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
4949
import org.eclipse.jdt.core.dom.Statement;
50-
import org.eclipse.jdt.core.dom.StringLiteral;
5150
import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
5251
import org.eclipse.jdt.core.dom.SuperFieldAccess;
5352
import org.eclipse.jdt.core.dom.SuperMethodInvocation;
@@ -1145,17 +1144,12 @@ public void endVisit(MethodDeclaration node) {
11451144
}
11461145
}
11471146
String[] pipeMethods = new String[] {
1148-
"isPipeLive",
1149-
"keepPipeLive",
1150-
"pipeDestroy",
11511147
"pipeSetup",
11521148
"pipeThrough",
11531149
"through",
1154-
"pipeInit",
11551150
"pipeMonitoring",
11561151
"pipeMonitoringInterval",
1157-
"setPipeHelper",
1158-
"updateStatus"
1152+
"setPipeHelper"
11591153
};
11601154
for (int i = 0; i < pipeMethods.length; i++) {
11611155
if (Bindings.isMethodInvoking(mBinding, "net.sf.j2s.ajax.SimplePipeRunnable", pipeMethods[i])) {
@@ -1164,6 +1158,11 @@ public void endVisit(MethodDeclaration node) {
11641158
}
11651159
}
11661160
}
1161+
if (Bindings.isMethodInvoking(mBinding, "net.sf.j2s.ajax.CompoundPipeSession", "convert")) {
1162+
if (getJ2SDocTag(node, "@j2sKeep") == null) {
1163+
return;
1164+
}
1165+
}
11671166
if (mBinding != null) {
11681167
methodDeclareStack.pop();
11691168
}
@@ -1186,17 +1185,12 @@ public boolean visit(MethodDeclaration node) {
11861185
}
11871186
}
11881187
String[] pipeMethods = new String[] {
1189-
"isPipeLive",
1190-
"keepPipeLive",
1191-
"pipeDestroy",
11921188
"pipeSetup",
11931189
"pipeThrough",
11941190
"through",
1195-
"pipeInit",
11961191
"pipeMonitoring",
11971192
"pipeMonitoringInterval",
1198-
"setPipeHelper",
1199-
"updateStatus"
1193+
"setPipeHelper"
12001194
};
12011195
for (int i = 0; i < pipeMethods.length; i++) {
12021196
if (Bindings.isMethodInvoking(mBinding, "net.sf.j2s.ajax.SimplePipeRunnable", pipeMethods[i])) {
@@ -1205,6 +1199,11 @@ public boolean visit(MethodDeclaration node) {
12051199
}
12061200
}
12071201
}
1202+
if (Bindings.isMethodInvoking(mBinding, "net.sf.j2s.ajax.CompoundPipeSession", "convert")) {
1203+
if (getJ2SDocTag(node, "@j2sKeep") == null) {
1204+
return false;
1205+
}
1206+
}
12081207
if (mBinding != null) {
12091208
methodDeclareStack.push(mBinding.getKey());
12101209
}

0 commit comments

Comments
 (0)