Skip to content

Commit

Permalink
rewrote ActorPath.TryParseAddrss to now test Uris by try / catch and …
Browse files Browse the repository at this point in the history
…use Uri.TryCreate instead
  • Loading branch information
Aaronontheweb committed Oct 2, 2015
1 parent 3ee8f9b commit 8eaf321
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/core/Akka/Actor/ActorPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,10 @@ private static bool TryParseAddress(string path, out Address address, out Uri ur
//This code corresponds to AddressFromURIString.unapply
uri = null;
address = null;
try
{
uri = new Uri(path);
}
catch (UriFormatException)
{

if (!Uri.TryCreate(path, UriKind.Absolute, out uri))
return false;
}

var protocol = uri.Scheme; //Typically "akka"
if (!protocol.StartsWith("akka", StringComparison.OrdinalIgnoreCase))
{
Expand Down

0 comments on commit 8eaf321

Please sign in to comment.