summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/JavaUtil.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-03-20 11:11:16 +0100
committerJose <jose@zeroc.com>2017-03-20 11:11:16 +0100
commit11c1140a8041b3dcdd79b9244422e56ebe8da10c (patch)
tree04cba9afe9ec7fb3e723ca45cb76afcfb5cc4885 /cpp/src/Slice/JavaUtil.cpp
parentFixed (ICE-7678) - Python build failure with VS 2015 (diff)
downloadice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.tar.bz2
ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.tar.xz
ice-11c1140a8041b3dcdd79b9244422e56ebe8da10c.zip
Update IceSSL::ConnectionInfo to use native certs and remove NativeConnectionInfo
Diffstat (limited to 'cpp/src/Slice/JavaUtil.cpp')
-rw-r--r--cpp/src/Slice/JavaUtil.cpp47
1 files changed, 38 insertions, 9 deletions
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index cb99ca5da46..947cdbe0602 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -1115,11 +1115,12 @@ Slice::JavaCompatGenerator::getOptionalFormat(const TypePtr& type)
string
Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
- TypeMode mode,
- const string& package,
- const StringList& metaData,
- bool formal,
- bool optional) const
+ TypeMode mode,
+ const string& package,
+ const StringList& metaData,
+ bool formal,
+ bool optional,
+ bool local) const
{
static const char* builtinTable[] =
{
@@ -1166,6 +1167,20 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
"???",
"???"
};
+
+ if(local)
+ {
+ for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i)
+ {
+ const string javaType = "java:type:";
+ const string meta = *i;
+
+ if(meta.find(javaType) == 0)
+ {
+ return meta.substr(javaType.size());
+ }
+ }
+ }
if(!type)
{
@@ -1317,10 +1332,10 @@ Slice::JavaCompatGenerator::typeToString(const TypePtr& type,
string
Slice::JavaCompatGenerator::typeToObjectString(const TypePtr& type,
- TypeMode mode,
- const string& package,
- const StringList& metaData,
- bool formal) const
+ TypeMode mode,
+ const string& package,
+ const StringList& metaData,
+ bool formal) const
{
static const char* builtinTable[] =
{
@@ -3599,6 +3614,20 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
"???",
"???"
};
+
+ if(local)
+ {
+ for(StringList::const_iterator i = metaData.begin(); i != metaData.end(); ++i)
+ {
+ const string javaType = "java:type:";
+ const string meta = *i;
+
+ if(meta.find(javaType) == 0)
+ {
+ return meta.substr(javaType.size());
+ }
+ }
+ }
if(!type)
{