Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
c2372510
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c2372510
编写于
2月 11, 2013
作者:
D
dcubed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
Reviewed-by: coleenp, sspitsyn
上级
89b3351e
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
675 addition
and
0 deletion
+675
-0
test/com/sun/jdi/RedefineAbstractClass.sh
test/com/sun/jdi/RedefineAbstractClass.sh
+153
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
...java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
+167
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesAgent.java
...ng/instrument/RedefineSubclassWithTwoInterfacesAgent.java
+44
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesApp.java
...lang/instrument/RedefineSubclassWithTwoInterfacesApp.java
+80
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesImpl.java
...ang/instrument/RedefineSubclassWithTwoInterfacesImpl.java
+34
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesImpl_1.java
...g/instrument/RedefineSubclassWithTwoInterfacesImpl_1.java
+34
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesIntf1.java
...ng/instrument/RedefineSubclassWithTwoInterfacesIntf1.java
+28
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesIntf2.java
...ng/instrument/RedefineSubclassWithTwoInterfacesIntf2.java
+28
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesRemote.java
...g/instrument/RedefineSubclassWithTwoInterfacesRemote.java
+47
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesTarget.java
...g/instrument/RedefineSubclassWithTwoInterfacesTarget.java
+30
-0
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesTarget_1.java
...instrument/RedefineSubclassWithTwoInterfacesTarget_1.java
+30
-0
未找到文件。
test/com/sun/jdi/RedefineAbstractClass.sh
0 → 100644
浏览文件 @
c2372510
#!/bin/sh
#
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# @test
# @bug 6805864
# @summary Redefine an abstract class that is called via a concrete
# class and via two interface objects and verify that the right
# methods are called.
# @author Daniel D. Daugherty
#
# @run shell RedefineAbstractClass.sh
compileOptions
=
-g
# Uncomment this to see the JDI trace
#jdbOptions=-dbgtrace
createJavaFile
()
{
cat
<<
EOF
>
$1
.java.1
public class
$1
{
public static void main(String[] args) {
System.out.println("This is RedefineAbstractClass");
MyConcreteClass foo = new MyConcreteClass();
// do the work once before redefine
foo.doWork();
System.out.println("stop here for redefine"); // @1 breakpoint
// do the work again after redefine
foo.doWork();
System.out.println("stop here to check results"); // @2 breakpoint
}
}
interface MyInterface1 {
public boolean checkFunc();
public boolean isMyInterface1();
}
interface MyInterface2 {
public boolean checkFunc();
public boolean isMyInterface2();
}
abstract class MyAbstractClass implements MyInterface1, MyInterface2 {
static int counter = 0;
public boolean checkFunc() {
counter++;
System.out.println("MyAbstractClass.checkFunc() called.");
// @1 uncomment System.out.println("This is call " + counter + " to checkFunc");
return true;
}
public boolean isMyInterface1() {
System.out.println("MyAbstractClass.isMyInterface1() called.");
return true;
}
public boolean isMyInterface2() {
System.out.println("MyAbstractClass.isMyInterface2() called.");
return true;
}
}
class MyConcreteClass extends MyAbstractClass {
public void doWork() {
// checkFunc() is called via invokevirtual here; MyConcreteClass
// inherits via MyAbstractClass
System.out.println("In doWork() calling checkFunc(): " + checkFunc());
MyInterface1 if1 = (MyInterface1) this;
// checkFunc() is called via invokeinterface here; this call will
// use the first itable entry
System.out.println("In doWork() calling if1.checkFunc(): " + if1.checkFunc());
MyInterface2 if2 = (MyInterface2) this;
// checkFunc() is called via invokeinterface here; this call will
// use the second itable entry
System.out.println("In doWork() calling if2.checkFunc(): " + if2.checkFunc());
}
}
EOF
}
# This is called to feed cmds to jdb.
dojdbCmds
()
{
setBkpts @1
setBkpts @2
runToBkpt @1
# modified version of redefineClass function
vers
=
2
abs_class
=
MyAbstractClass
cmd redefine
$pkgDot$abs_class
$tmpFileDir
/vers
$vers
/
$abs_class
.class
cp
$tmpFileDir
/
$classname
.java.
$vers
\
$tmpFileDir
/
$classname
.java
# end modified version of redefineClass function
# this will continue to the second breakpoint
cmd cont
}
mysetup
()
{
if
[
-z
"
$TESTSRC
"
]
;
then
TESTSRC
=
.
fi
for
ii
in
.
$TESTSRC
$TESTSRC
/..
;
do
if
[
-r
"
$ii
/ShellScaffold.sh"
]
;
then
.
$ii
/ShellScaffold.sh
break
fi
done
}
# You could replace this next line with the contents
# of ShellScaffold.sh and this script will run just the same.
mysetup
runit
debuggeeFailIfNotPresent
'This is call 4 to checkFunc'
debuggeeFailIfNotPresent
'This is call 5 to checkFunc'
debuggeeFailIfNotPresent
'This is call 6 to checkFunc'
pass
test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
0 → 100644
浏览文件 @
c2372510
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# @test
# @bug 7182152
# @summary Redefine a subclass that implements two interfaces and
# verify that the right methods are called.
# @author Daniel D. Daugherty
#
# @run shell MakeJAR3.sh RedefineSubclassWithTwoInterfacesAgent 'Can-Redefine-Classes: true'
# @run build RedefineSubclassWithTwoInterfacesApp
# @run shell RedefineSubclassWithTwoInterfaces.sh
#
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
JAVAC
=
"
${
TESTJAVA
}
"
/bin/javac
JAVA
=
"
${
TESTJAVA
}
"
/bin/java
echo
"INFO: building the replacement classes."
cp
"
${
TESTSRC
}
"
/RedefineSubclassWithTwoInterfacesTarget_1.java
\
RedefineSubclassWithTwoInterfacesTarget.java
cp
"
${
TESTSRC
}
"
/RedefineSubclassWithTwoInterfacesImpl_1.java
\
RedefineSubclassWithTwoInterfacesImpl.java
"
${
JAVAC
}
"
-cp
"
${
TESTCLASSES
}
"
-d
.
\
RedefineSubclassWithTwoInterfacesTarget.java
\
RedefineSubclassWithTwoInterfacesImpl.java
status
=
"
$?
"
if
[
"
$status
"
!=
0
]
;
then
echo
"FAIL: compile of *_1.java files failed."
exit
"
$status
"
fi
mv
RedefineSubclassWithTwoInterfacesTarget.java
\
RedefineSubclassWithTwoInterfacesTarget_1.java
mv
RedefineSubclassWithTwoInterfacesTarget.class
\
RedefineSubclassWithTwoInterfacesTarget_1.class
mv
RedefineSubclassWithTwoInterfacesImpl.java
\
RedefineSubclassWithTwoInterfacesImpl_1.java
mv
RedefineSubclassWithTwoInterfacesImpl.class
\
RedefineSubclassWithTwoInterfacesImpl_1.class
echo
"INFO: launching RedefineSubclassWithTwoInterfacesApp"
# TraceRedefineClasses options:
#
# 0x00000001 | 1 - name each target class before loading, after
# loading and after redefinition is completed
# 0x00000002 | 2 - print info if parsing, linking or
# verification throws an exception
# 0x00000004 | 4 - print timer info for the VM operation
# 0x00001000 | 4096 - detect calls to obsolete methods
# 0x00002000 | 8192 - fail a guarantee() in addition to detection
# 0x00004000 | 16384 - detect old/obsolete methods in metadata
# 0x00100000 | 1048576 - impl details: vtable updates
# 0x00200000 | 2097152 - impl details: itable updates
#
# 1+2+4+4096+8192+16384+1048576+2097152 == 3174407
"
${
JAVA
}
"
${
TESTVMOPTS
}
\
-XX
:TraceRedefineClasses
=
3174407
\
-javaagent
:RedefineSubclassWithTwoInterfacesAgent.jar
\
-classpath
"
${
TESTCLASSES
}
"
\
RedefineSubclassWithTwoInterfacesApp
>
output.log 2>&1
status
=
"
$?
"
echo
"INFO: <begin output.log>"
cat
output.log
echo
"INFO: <end output.log>"
if
[
"
$status
"
!=
0
]
;
then
echo
"FAIL: RedefineSubclassWithTwoInterfacesApp failed."
exit
"
$status
"
fi
# When this bug manifests, RedefineClasses() will fail to update
# one of the itable entries to refer to the new method. The log
# will include the following line when the bug occurs:
#
# guarantee(false) failed: OLD and/or OBSOLETE method(s) found
#
# If this guarantee happens, the test should fail in the status
# check above, but just in case it doesn't, we check for "guarantee".
#
FAIL_MESG
=
"guarantee"
grep
"
$FAIL_MESG
"
output.log
status
=
$?
if
[
"
$status
"
=
0
]
;
then
echo
"FAIL: found '
$FAIL_MESG
' in the test output."
result
=
1
else
echo
"INFO: did NOT find '
$FAIL_MESG
' in the test output."
# be optimistic here
result
=
0
fi
PASS1_MESG
=
"before any redefines"
cnt
=
`
grep
"
$PASS1_MESG
"
output.log |
grep
'version-0'
|
wc
-l
|
sed
's/^ *//'
`
case
"
$cnt
"
in
2
)
echo
"INFO: found 2 version-0 '
$PASS1_MESG
' mesgs."
;;
*
)
echo
"FAIL: did NOT find 2 version-0 '
$PASS1_MESG
' mesgs."
echo
"INFO: grep '
$PASS1_MESG
' output:"
grep
"
$PASS1_MESG
"
output.log
result
=
1
;;
esac
PASS2_MESG
=
"after redefine"
cnt
=
`
grep
"
$PASS2_MESG
"
output.log |
grep
'version-1'
|
wc
-l
|
sed
's/^ *//'
`
case
"
$cnt
"
in
2
)
echo
"INFO: found 2 version-1 '
$PASS2_MESG
' mesgs."
;;
*
)
echo
"FAIL: did NOT find 2 version-1 '
$PASS2_MESG
' mesgs."
echo
"INFO: grep '
$PASS2_MESG
' output:"
grep
"
$PASS2_MESG
"
output.log
result
=
1
;;
esac
if
[
"
$result
"
=
0
]
;
then
echo
"PASS: test passed both positive and negative output checks."
fi
exit
$result
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesAgent.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.lang.instrument.Instrumentation
;
public
class
RedefineSubclassWithTwoInterfacesAgent
{
private
static
Instrumentation
instrumentation
;
private
RedefineSubclassWithTwoInterfacesAgent
()
{
}
public
static
void
premain
(
String
agentArgs
,
Instrumentation
inst
)
{
System
.
out
.
println
(
"Hello from "
+
"RedefineSubclassWithTwoInterfacesAgent!"
);
System
.
out
.
println
(
"isRedefineClassesSupported()="
+
inst
.
isRedefineClassesSupported
());
instrumentation
=
inst
;
}
public
static
Instrumentation
getInstrumentation
()
{
return
instrumentation
;
}
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesApp.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.io.*
;
import
java.lang.instrument.*
;
public
class
RedefineSubclassWithTwoInterfacesApp
{
public
static
void
main
(
String
args
[])
throws
Exception
{
System
.
out
.
println
(
"Hello from RedefineSubclassWithTwoInterfacesApp!"
);
new
RedefineSubclassWithTwoInterfacesApp
().
doTest
();
System
.
exit
(
0
);
}
private
void
doTest
()
throws
Exception
{
RedefineSubclassWithTwoInterfacesImpl
impl
=
new
RedefineSubclassWithTwoInterfacesImpl
();
RedefineSubclassWithTwoInterfacesRemote
remote
=
new
RedefineSubclassWithTwoInterfacesRemote
(
impl
,
impl
);
String
mesg
;
// make echo() calls before any redefinitions:
mesg
=
remote
.
echo1
(
"test message #1.1"
);
System
.
out
.
println
(
"RedefineSubclassWithTwoInterfacesApp: echo1 mesg='"
+
mesg
+
"' before any redefines"
);
mesg
=
remote
.
echo2
(
"test message #2.1"
);
System
.
out
.
println
(
"RedefineSubclassWithTwoInterfacesApp: echo2 mesg='"
+
mesg
+
"' before any redefines"
);
// redefining RedefineSubclassWithTwoInterfacesImpl before
// RedefineSubclassWithTwoInterfacesTarget fails:
do_redefine
(
"RedefineSubclassWithTwoInterfacesImpl"
,
1
);
do_redefine
(
"RedefineSubclassWithTwoInterfacesTarget"
,
1
);
mesg
=
remote
.
echo1
(
"test message #1.2"
);
System
.
out
.
println
(
"RedefineSubclassWithTwoInterfacesApp: echo1 mesg='"
+
mesg
+
"' after redefine"
);
mesg
=
remote
.
echo2
(
"test message #2.2"
);
System
.
out
.
println
(
"RedefineSubclassWithTwoInterfacesApp: echo2 mesg='"
+
mesg
+
"' after redefine"
);
}
private
static
void
do_redefine
(
String
className
,
int
counter
)
throws
Exception
{
File
f
=
new
File
(
className
+
"_"
+
counter
+
".class"
);
System
.
out
.
println
(
"Reading test class from "
+
f
);
InputStream
redefineStream
=
new
FileInputStream
(
f
);
byte
[]
redefineBuffer
=
NamedBuffer
.
loadBufferFromStream
(
redefineStream
);
ClassDefinition
redefineParamBlock
=
new
ClassDefinition
(
Class
.
forName
(
className
),
redefineBuffer
);
RedefineSubclassWithTwoInterfacesAgent
.
getInstrumentation
().
redefineClasses
(
new
ClassDefinition
[]
{
redefineParamBlock
});
}
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesImpl.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Reproducing this bug only requires an EMCP version of the
// RedefineSubclassWithTwoInterfacesImpl class so
// RedefineSubclassWithTwoInterfacesImpl.java and
// RedefineSubclassWithTwoInterfacesImpl_1.java are identical.
public
class
RedefineSubclassWithTwoInterfacesImpl
extends
RedefineSubclassWithTwoInterfacesTarget
implements
RedefineSubclassWithTwoInterfacesIntf1
,
RedefineSubclassWithTwoInterfacesIntf2
{
// This class is acting in the role of:
// wlstest.unit.diagnostics.common.apps.echoejb.EchoBean4_nh7k_Impl
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesImpl_1.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Reproducing this bug only requires an EMCP version of the
// RedefineSubclassWithTwoInterfacesImpl class so
// RedefineSubclassWithTwoInterfacesImpl.java and
// RedefineSubclassWithTwoInterfacesImpl_1.java are identical.
public
class
RedefineSubclassWithTwoInterfacesImpl
extends
RedefineSubclassWithTwoInterfacesTarget
implements
RedefineSubclassWithTwoInterfacesIntf1
,
RedefineSubclassWithTwoInterfacesIntf2
{
// This class is acting in the role of:
// wlstest.unit.diagnostics.common.apps.echoejb.EchoBean4_nh7k_Impl
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesIntf1.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public
interface
RedefineSubclassWithTwoInterfacesIntf1
{
// This interface is acting in the role of:
// wlstest.unit.diagnostics.common.apps.echoejb.EchoBean4_nh7k_Intf
String
echo
(
String
s
);
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesIntf2.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public
interface
RedefineSubclassWithTwoInterfacesIntf2
{
// This interface is acting in the role of:
// weblogic.ejb.container.interfaces.WLEnterpriseBean
String
echo
(
String
s
);
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesRemote.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public
class
RedefineSubclassWithTwoInterfacesRemote
{
// This class is acting in the role of:
// wlstest.unit.diagnostics.common.apps.echoejb.EchoBean4_nh7k_EchoRemoteImpl
// since it is calling the echo() method via an interface.
private
RedefineSubclassWithTwoInterfacesIntf1
intf1
;
private
RedefineSubclassWithTwoInterfacesIntf2
intf2
;
RedefineSubclassWithTwoInterfacesRemote
(
RedefineSubclassWithTwoInterfacesIntf1
intf1
,
RedefineSubclassWithTwoInterfacesIntf2
intf2
)
{
this
.
intf1
=
intf1
;
this
.
intf2
=
intf2
;
}
// There is actually a bit more logic in the call stack from
// EchoBean4_nh7k_EchoRemoteImpl.echo() to EchoBean4_nh7k_Intf.echo()
public
String
echo1
(
String
s
)
{
return
"intf1<"
+
intf1
.
echo
(
s
)
+
">"
;
}
public
String
echo2
(
String
s
)
{
return
"intf2<"
+
intf2
.
echo
(
s
)
+
">"
;
}
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesTarget.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public
class
RedefineSubclassWithTwoInterfacesTarget
{
// This class is acting in the role of:
// wlstest.unit.diagnostics.common.apps.echoejb.EchoBean4
public
String
echo
(
String
s
)
{
return
"echo: (version-0) <"
+
s
+
">"
;
}
}
test/java/lang/instrument/RedefineSubclassWithTwoInterfacesTarget_1.java
0 → 100644
浏览文件 @
c2372510
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public
class
RedefineSubclassWithTwoInterfacesTarget
{
// This class is acting in the role of:
// wlstest.unit.diagnostics.common.apps.echoejb.EchoBean4
public
String
echo
(
String
s
)
{
return
"echo: (version-1) <"
+
s
+
">"
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录