summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/ObjectAdapterI.cs
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2017-01-12 14:39:56 -0500
committerBernard Normier <bernard@zeroc.com>2017-01-12 14:39:56 -0500
commit21d56ef199fe0002c90b57d873878ac9ba4a32e1 (patch)
treea39441e45379a574beb6563cb5b5c34cdcdf5cb1 /csharp/src/Ice/ObjectAdapterI.cs
parentRevert "Replaced Borders by Paddings to eliminate deprecation warnings" (diff)
downloadice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.tar.bz2
ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.tar.xz
ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.zip
Reject empty endpoint in OA endpoint list
Diffstat (limited to 'csharp/src/Ice/ObjectAdapterI.cs')
-rw-r--r--csharp/src/Ice/ObjectAdapterI.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/csharp/src/Ice/ObjectAdapterI.cs b/csharp/src/Ice/ObjectAdapterI.cs
index 26523708c67..5929b46fd3c 100644
--- a/csharp/src/Ice/ObjectAdapterI.cs
+++ b/csharp/src/Ice/ObjectAdapterI.cs
@@ -1118,6 +1118,10 @@ namespace Ice
beg = IceUtilInternal.StringUtil.findFirstNotOf(endpts, delim, end);
if(beg == -1)
{
+ if(endpoints.Count != 0)
+ {
+ throw new EndpointParseException("invalid empty object adapter endpoint");
+ }
break;
}
@@ -1166,17 +1170,14 @@ namespace Ice
if(end == beg)
{
- ++end;
- continue;
+ throw new EndpointParseException("invalid empty object adapter endpoint");
}
string s = endpts.Substring(beg, (end) - (beg));
EndpointI endp = _instance.endpointFactoryManager().create(s, oaEndpoints);
if(endp == null)
{
- EndpointParseException e2 = new EndpointParseException();
- e2.str = "invalid object adapter endpoint `" + s + "'";
- throw e2;
+ throw new EndpointParseException("invalid object adapter endpoint `" + s + "'");
}
endpoints.Add(endp);