Skip to content

Commit

Permalink
Remove Remnants of the java:optional Metadata (#2164)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertCreativityHere authored May 14, 2024
1 parent 38742eb commit de3f9a8
Show file tree
Hide file tree
Showing 33 changed files with 666 additions and 1,482 deletions.
17 changes: 0 additions & 17 deletions cpp/src/slice2java/JavaUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,23 +1010,6 @@ Slice::JavaGenerator::getStaticId(const TypePtr& type, const string& package) co
}
}

bool
Slice::JavaGenerator::useOptionalMapping(const OperationPtr& p)
{
//
// The "java:optional" metadata can be applied to an operation or its
// interface to force the mapping to use the Optional types.
//
// Without the tag, parameters use the normal (non-optional) mapping.
//
static const string tag = "java:optional";

ClassDefPtr cl = dynamic_pointer_cast<ClassDef>(p->container());
assert(cl);

return p->hasMetaData(tag) || cl->hasMetaData(tag);
}

string
Slice::JavaGenerator::getOptionalFormat(const TypePtr& type)
{
Expand Down
5 changes: 0 additions & 5 deletions cpp/src/slice2java/JavaUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ namespace Slice
//
std::string getStaticId(const TypePtr&, const std::string&) const;

//
// Determines whether an operation should use the optional mapping.
//
bool useOptionalMapping(const OperationPtr&);

//
// Returns the optional type corresponding to the given Slice type.
//
Expand Down
2 changes: 0 additions & 2 deletions cpp/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ interface Initial
["marshaled-result"] optional(1) StringIntDict opMDict2(optional(2) StringIntDict p1,
out optional(3) StringIntDict p2);

bool supportsRequiredParams();

bool supportsJavaSerializable();

bool supportsCsharpSerializable();
Expand Down
2 changes: 0 additions & 2 deletions cpp/test/Ice/optional/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ interface Initial
["marshaled-result"] optional(1) StringIntDict opMDict2(optional(2) StringIntDict p1,
out optional(3) StringIntDict p2);

bool supportsRequiredParams();

bool supportsJavaSerializable();

bool supportsCsharpSerializable();
Expand Down
6 changes: 0 additions & 6 deletions cpp/test/Ice/optional/TestAMDI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,6 @@ InitialI::opMDict2Async(
response(OpMDict2MarshaledResult(p1, p1, current));
}

void
InitialI::supportsRequiredParamsAsync(function<void(bool)> response, function<void(exception_ptr)>, const Ice::Current&)
{
response(false);
}

void
InitialI::supportsJavaSerializableAsync(
function<void(bool)> response,
Expand Down
5 changes: 0 additions & 5 deletions cpp/test/Ice/optional/TestAMDI.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,6 @@ class InitialI final : public Test::Initial
std::function<void(std::exception_ptr)>,
const Ice::Current&) final;

void supportsRequiredParamsAsync(
std::function<void(bool)>,
std::function<void(std::exception_ptr)>,
const Ice::Current&) final;

void supportsJavaSerializableAsync(
std::function<void(bool)>,
std::function<void(std::exception_ptr)>,
Expand Down
6 changes: 0 additions & 6 deletions cpp/test/Ice/optional/TestI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,6 @@ InitialI::opMDict2(optional<Test::StringIntDict> p1, const Ice::Current& current
return OpMDict2MarshaledResult(p1, p1, current);
}

bool
InitialI::supportsRequiredParams(const Ice::Current&)
{
return false;
}

bool
InitialI::supportsJavaSerializable(const Ice::Current&)
{
Expand Down
2 changes: 0 additions & 2 deletions cpp/test/Ice/optional/TestI.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ class InitialI : public Test::Initial

virtual OpMDict2MarshaledResult opMDict2(std::optional<Test::StringIntDict>, const Ice::Current&);

virtual bool supportsRequiredParams(const Ice::Current&);

virtual bool supportsJavaSerializable(const Ice::Current&);

virtual bool supportsCsharpSerializable(const Ice::Current&);
Expand Down
2 changes: 0 additions & 2 deletions csharp/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ interface Initial
["marshaled-result"] optional(1) StringIntDict opMDict2(optional(2) StringIntDict p1,
out optional(3) StringIntDict p2);

bool supportsRequiredParams();

bool supportsJavaSerializable();
}

Expand Down
2 changes: 0 additions & 2 deletions csharp/test/Ice/optional/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ interface Initial
["marshaled-result"] optional(1) StringIntDict opMDict2(optional(2) StringIntDict p1,
out optional(3) StringIntDict p2);

bool supportsRequiredParams();

bool supportsJavaSerializable();
}

Expand Down
6 changes: 0 additions & 6 deletions csharp/test/Ice/optional/TestAMDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,6 @@ public async override Task<Test.Initial_OpMDict2MarshaledResult>
return new Test.Initial_OpMDict2MarshaledResult(p1, p1, current);
}

public override Task<bool>
supportsRequiredParamsAsync(Ice.Current current)
{
return Task.FromResult<bool>(false);
}

public override Task<bool>
supportsJavaSerializableAsync(Ice.Current current)
{
Expand Down
5 changes: 0 additions & 5 deletions csharp/test/Ice/optional/TestI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ public override Test.Initial_OpMDict2MarshaledResult
return new Test.Initial_OpMDict2MarshaledResult(p1, p1, current);
}

public override bool supportsRequiredParams(Ice.Current current)
{
return false;
}

public override bool supportsJavaSerializable(Ice.Current current)
{
return false;
Expand Down
Loading

0 comments on commit de3f9a8

Please sign in to comment.