summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-27 20:23:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-27 23:00:44 +0000
commit435a3a32b12f4f13ab4d693c1b06780f77ed7a8d (patch)
treea42ca53d0b260a986730a2997c23b43d57419ae6 /codemaker
parentbe94376c74c5d1eedb8353bc28367b5d9e533482 (diff)
coverity#1019331 Unchecked dynamic_cast
Change-Id: I902fdbcfd171e93ac57b5021269d2279610b4b0d
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/javamaker/javatype.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index f60b1635c5cb..09ba4af9b51a 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -1579,20 +1579,19 @@ void addExceptionBaseArguments(
"unexpected entity \"" + base
+ "\" in call to addExceptionBaseArguments");
}
- rtl::Reference< unoidl::ExceptionTypeEntity > ent2(
- dynamic_cast< unoidl::ExceptionTypeEntity * >(ent.get()));
- assert(ent2.is());
+ unoidl::ExceptionTypeEntity& ent2(
+ dynamic_cast<unoidl::ExceptionTypeEntity&>(*ent.get()));
bool baseException = base == "com.sun.star.uno.Exception";
if (!baseException) {
addExceptionBaseArguments(
manager, dependencies, methodDescriptor, code,
- ent2->getDirectBase(), index);
+ ent2.getDirectBase(), index);
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
- ent2->getDirectMembers().begin());
- i != ent2->getDirectMembers().end(); ++i)
+ ent2.getDirectMembers().begin());
+ i != ent2.getDirectMembers().end(); ++i)
{
- if (!baseException || i != ent2->getDirectMembers().begin()) {
+ if (!baseException || i != ent2.getDirectMembers().begin()) {
methodDescriptor->addParameter(i->type, false, true, 0);
addLoadLocal(
manager, code, index, false, i->type, false, dependencies);