summaryrefslogtreecommitdiff
path: root/codemaker/source/javamaker/javatype.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-04-19 12:42:39 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-04-19 12:42:39 +0000
commitd77737d1a33f068dd2cd4ef08470e792b96b2de0 (patch)
tree02eb4c14bd070152838803ca414fd2a7dbf7dcaf /codemaker/source/javamaker/javatype.cxx
parent4e5c8d9ee0e881cd68c9232fcb1ce5b0b17726c2 (diff)
INTEGRATION: CWS sb49 (1.31.2); FILE MERGED
2006/03/30 13:09:19 sb 1.31.2.2: #i63812# Use checkcast instead of implicit downcasts (gij rejects to verify the resulting bytecode otherwise). 2006/03/16 10:57:58 sb 1.31.2.1: #i62303# As a special case, let com.sun.star.lang.XEventListener extend java.utilEventListener.
Diffstat (limited to 'codemaker/source/javamaker/javatype.cxx')
-rw-r--r--codemaker/source/javamaker/javatype.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 6f58115dc5d1..4b6abb45a0f6 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: javatype.cxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: rt $ $Date: 2006-03-09 10:26:53 $
+ * last change: $Author: hr $ $Date: 2006-04-19 13:42:39 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2144,6 +2144,17 @@ void handleInterfaceType(
dependencies->insert(t);
cf->addInterface(t);
}}
+ // As a special case, let com.sun.star.lang.XEventListener extend
+ // java.util.EventListener ("A tagging interface that all event listener
+ // interfaces must extend"):
+ if (className ==
+ rtl::OString(
+ RTL_CONSTASCII_STRINGPARAM("com/sun/star/lang/XEventListener")))
+ {
+ cf->addInterface(
+ rtl::OString(
+ RTL_CONSTASCII_STRINGPARAM("java/util/EventListener")));
+ }
std::vector< TypeInfo > typeInfo;
sal_Int32 index = 0;
{for (sal_uInt16 i = 0; i < fields; ++i) {
@@ -2734,6 +2745,8 @@ void addConstructor(
"(Ljava/lang/Object;Lcom/sun/star/uno/XComponentContext;)"
"Ljava/lang/Object;")));
// stack: instance
+ code->instrCheckcast(returnType);
+ // stack: instance
code->instrAreturn();
if (!tree.getRoot()->present) {
ClassFile::Code::Position pos1 = code->getPosition();
@@ -3169,6 +3182,8 @@ void handleSingleton(
// stack: instance instance
ClassFile::Code::Branch branch3 = code->instrIfnull();
// stack: instance
+ code->instrCheckcast(base);
+ // stack: instance
code->instrAreturn();
code->branchHere(branch2);
code->branchHere(branch3);