{"action":"created","issue":{"url":"https://api.github.com/repos/hyperledger/quilt/issues/102","repository_url":"https://api.github.com/repos/hyperledger/quilt","labels_url":"https://api.github.com/repos/hyperledger/quilt/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/hyperledger/quilt/issues/102/comments","events_url":"https://api.github.com/repos/hyperledger/quilt/issues/102/events","html_url":"https://github.com/hyperledger/quilt/pull/102","id":295312132,"number":102,"title":"Fixes #57","user":{"login":"pascalav","id":3214813,"avatar_url":"https://avatars0.githubusercontent.com/u/3214813?v=4","gravatar_id":"","url":"https://api.github.com/users/pascalav","html_url":"https://github.com/pascalav","followers_url":"https://api.github.com/users/pascalav/followers","following_url":"https://api.github.com/users/pascalav/following{/other_user}","gists_url":"https://api.github.com/users/pascalav/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalav/subscriptions","organizations_url":"https://api.github.com/users/pascalav/orgs","repos_url":"https://api.github.com/users/pascalav/repos","events_url":"https://api.github.com/users/pascalav/events{/privacy}","received_events_url":"https://api.github.com/users/pascalav/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-07T22:12:36Z","updated_at":"2018-02-07T22:34:13Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/hyperledger/quilt/pulls/102","html_url":"https://github.com/hyperledger/quilt/pull/102","diff_url":"https://github.com/hyperledger/quilt/pull/102.diff","patch_url":"https://github.com/hyperledger/quilt/pull/102.patch"},"body":"* Enforce the RFC-15 regular expressions for address prefixes and destination addresses respectively\r\n\r\nSigned-off-by: Pascal Avondes <pavondes@gmail.com>"},"comment":{"url":"https://api.github.com/repos/hyperledger/quilt/issues/comments/363934301","html_url":"https://github.com/hyperledger/quilt/pull/102#issuecomment-363934301","issue_url":"https://api.github.com/repos/hyperledger/quilt/issues/102","id":363934301,"user":{"login":"pascalav","id":3214813,"avatar_url":"https://avatars0.githubusercontent.com/u/3214813?v=4","gravatar_id":"","url":"https://api.github.com/users/pascalav","html_url":"https://github.com/pascalav","followers_url":"https://api.github.com/users/pascalav/followers","following_url":"https://api.github.com/users/pascalav/following{/other_user}","gists_url":"https://api.github.com/users/pascalav/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalav/subscriptions","organizations_url":"https://api.github.com/users/pascalav/orgs","repos_url":"https://api.github.com/users/pascalav/repos","events_url":"https://api.github.com/users/pascalav/events{/privacy}","received_events_url":"https://api.github.com/users/pascalav/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T22:34:13Z","updated_at":"2018-02-07T22:34:13Z","author_association":"CONTRIBUTOR","body":"Hi, here are some additional comments about the PR:\r\n* Mainly, the 2 REGEX for address prefix and destination address got enforced in `InterledgerAddress#isValid(java.lang.String)`, and unit tests got refactored accordingly (i.e. tests that were using invalid 1-segment destination addresses - such as `g.foo` - are now using valid >=2-segments destination addresses - such as `g.foo.bar` or `g.foo.bar.baz` -)\r\n* A new unit test was added to ensure a reject of 1-segment destination addresses \r\n* Critical modification: `InterledgerAddress#getParentPrefix()` algorithm was changed, in order to make it possible to call `InterledgerAddress.of(\"g.foo.\").getParentPrefix().get().getValue() // expected: \"g.\"`. This because a destination address smallest shape is `<scheme>.<segment_1>.<segment_2>`, and an address prefix smallest shape is `<scheme>.`. But in the current code base, `g.foo. --> g.` is walked-up through the `g.foo. --> g.foo --> g.` path, which breaks on the (in)validated-and-immutable `g.foo` destination address that is in the middle\r\n\r\nAbout issuing a more precise error message when the address is invalid, I think it would better suit into another evolution ticket, since this refactoring already has a large foot print in the code base. If you're okay with that, I'll open a new ticket, holding a reference on https://github.com/hyperledger/quilt/issues/57 ."}}
{"actor":{"display_login":"pascalav"}}