{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/comments/239014318","pull_request_review_id":181692099,"id":239014318,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTAxNDMxOA==","diff_hunk":"@@ -0,0 +1,56 @@\n+/*\n+ * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+ *\n+ * WSO2 Inc. licenses this file to you under the Apache License,\n+ * Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied. See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ *\n+ */\n+\n+package io.ballerina.messaging.broker.core.selector;\n+\n+import io.ballerina.messaging.broker.core.Metadata;\n+\n+/**\n+ * Implementation of a expression. Here we calculate summation of two expressions and evaluate to a object value.\n+ */\n+\n+public class Addition implements Expression<Metadata> {\n+\n+    private final Expression<Metadata> left;\n+    private final Expression<Metadata> right;\n+\n+    public Addition (Expression<Metadata> left, Expression<Metadata> right) {\n+        this.left = left;\n+        this.right = right;\n+    }\n+\n+    @Override\n+    public Object evaluate (Metadata metadata) {\n+        Object leftValue = left.evaluate(metadata);\n+        Object rightValue = right.evaluate(metadata);\n+        if (leftValue == null || rightValue == null) {\n+            return null;\n+        }\n+        if (leftValue instanceof Number) {\n+            long l = ((Number) leftValue).longValue();","path":"modules/broker-core/src/main/java/io/ballerina/messaging/broker/core/selector/Addition.java","position":46,"original_position":46,"commit_id":"5f2bf647bab1b83bba698dcf92ab35f6b0061178","original_commit_id":"5f2bf647bab1b83bba698dcf92ab35f6b0061178","user":{"login":"sdkottegoda","id":1330107,"node_id":"MDQ6VXNlcjEzMzAxMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/1330107?v=4","gravatar_id":"","url":"https://api.github.com/users/sdkottegoda","html_url":"https://github.com/sdkottegoda","followers_url":"https://api.github.com/users/sdkottegoda/followers","following_url":"https://api.github.com/users/sdkottegoda/following{/other_user}","gists_url":"https://api.github.com/users/sdkottegoda/gists{/gist_id}","starred_url":"https://api.github.com/users/sdkottegoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdkottegoda/subscriptions","organizations_url":"https://api.github.com/users/sdkottegoda/orgs","repos_url":"https://api.github.com/users/sdkottegoda/repos","events_url":"https://api.github.com/users/sdkottegoda/events{/privacy}","received_events_url":"https://api.github.com/users/sdkottegoda/received_events","type":"User","site_admin":false},"body":"What if the number is a float?","created_at":"2018-12-05T10:44:02Z","updated_at":"2018-12-05T10:44:02Z","html_url":"https://github.com/wso2/ballerina-message-broker/pull/553#discussion_r239014318","pull_request_url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/comments/239014318"},"html":{"href":"https://github.com/wso2/ballerina-message-broker/pull/553#discussion_r239014318"},"pull_request":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553","id":230079099,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMDc5MDk5","html_url":"https://github.com/wso2/ballerina-message-broker/pull/553","diff_url":"https://github.com/wso2/ballerina-message-broker/pull/553.diff","patch_url":"https://github.com/wso2/ballerina-message-broker/pull/553.patch","issue_url":"https://api.github.com/repos/wso2/ballerina-message-broker/issues/553","number":553,"state":"open","locked":false,"title":"Change the parser grammar of the SelectorParser.jj file","user":{"login":"AroshaMalithi","id":37326722,"node_id":"MDQ6VXNlcjM3MzI2NzIy","avatar_url":"https://avatars0.githubusercontent.com/u/37326722?v=4","gravatar_id":"","url":"https://api.github.com/users/AroshaMalithi","html_url":"https://github.com/AroshaMalithi","followers_url":"https://api.github.com/users/AroshaMalithi/followers","following_url":"https://api.github.com/users/AroshaMalithi/following{/other_user}","gists_url":"https://api.github.com/users/AroshaMalithi/gists{/gist_id}","starred_url":"https://api.github.com/users/AroshaMalithi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AroshaMalithi/subscriptions","organizations_url":"https://api.github.com/users/AroshaMalithi/orgs","repos_url":"https://api.github.com/users/AroshaMalithi/repos","events_url":"https://api.github.com/users/AroshaMalithi/events{/privacy}","received_events_url":"https://api.github.com/users/AroshaMalithi/received_events","type":"User","site_admin":false},"body":"Change the Parser grammar of the message broker. New parser grammar help to create message selectors with Comparison Operators. These Java classes are support for new parser file.","created_at":"2018-11-12T10:09:05Z","updated_at":"2018-12-05T10:44:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ad33c91ef41ba78f20d8127073cef60073273af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553/commits","review_comments_url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553/comments","review_comment_url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/ballerina-message-broker/issues/553/comments","statuses_url":"https://api.github.com/repos/wso2/ballerina-message-broker/statuses/5f2bf647bab1b83bba698dcf92ab35f6b0061178","head":{"label":"AroshaMalithi:jms-selectors","ref":"jms-selectors","sha":"5f2bf647bab1b83bba698dcf92ab35f6b0061178","user":{"login":"AroshaMalithi","id":37326722,"node_id":"MDQ6VXNlcjM3MzI2NzIy","avatar_url":"https://avatars0.githubusercontent.com/u/37326722?v=4","gravatar_id":"","url":"https://api.github.com/users/AroshaMalithi","html_url":"https://github.com/AroshaMalithi","followers_url":"https://api.github.com/users/AroshaMalithi/followers","following_url":"https://api.github.com/users/AroshaMalithi/following{/other_user}","gists_url":"https://api.github.com/users/AroshaMalithi/gists{/gist_id}","starred_url":"https://api.github.com/users/AroshaMalithi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AroshaMalithi/subscriptions","organizations_url":"https://api.github.com/users/AroshaMalithi/orgs","repos_url":"https://api.github.com/users/AroshaMalithi/repos","events_url":"https://api.github.com/users/AroshaMalithi/events{/privacy}","received_events_url":"https://api.github.com/users/AroshaMalithi/received_events","type":"User","site_admin":false},"repo":{"id":147179480,"node_id":"MDEwOlJlcG9zaXRvcnkxNDcxNzk0ODA=","name":"ballerina-message-broker","full_name":"AroshaMalithi/ballerina-message-broker","private":false,"owner":{"login":"AroshaMalithi","id":37326722,"node_id":"MDQ6VXNlcjM3MzI2NzIy","avatar_url":"https://avatars0.githubusercontent.com/u/37326722?v=4","gravatar_id":"","url":"https://api.github.com/users/AroshaMalithi","html_url":"https://github.com/AroshaMalithi","followers_url":"https://api.github.com/users/AroshaMalithi/followers","following_url":"https://api.github.com/users/AroshaMalithi/following{/other_user}","gists_url":"https://api.github.com/users/AroshaMalithi/gists{/gist_id}","starred_url":"https://api.github.com/users/AroshaMalithi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AroshaMalithi/subscriptions","organizations_url":"https://api.github.com/users/AroshaMalithi/orgs","repos_url":"https://api.github.com/users/AroshaMalithi/repos","events_url":"https://api.github.com/users/AroshaMalithi/events{/privacy}","received_events_url":"https://api.github.com/users/AroshaMalithi/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AroshaMalithi/ballerina-message-broker","description":"Ballerina Message Broker is a lightweight, easy-to-use, 100% open source message-brokering server.","fork":true,"url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker","forks_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/forks","keys_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/teams","hooks_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/hooks","issue_events_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/issues/events{/number}","events_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/events","assignees_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/assignees{/user}","branches_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/branches{/branch}","tags_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/tags","blobs_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/languages","stargazers_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/stargazers","contributors_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/contributors","subscribers_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/subscribers","subscription_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/subscription","commits_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/contents/{+path}","compare_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/merges","archive_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/downloads","issues_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/issues{/number}","pulls_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/labels{/name}","releases_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/releases{/id}","deployments_url":"https://api.github.com/repos/AroshaMalithi/ballerina-message-broker/deployments","created_at":"2018-09-03T09:07:06Z","updated_at":"2018-11-14T12:08:27Z","pushed_at":"2018-12-05T09:31:08Z","git_url":"git://github.com/AroshaMalithi/ballerina-message-broker.git","ssh_url":"git@github.com:AroshaMalithi/ballerina-message-broker.git","clone_url":"https://github.com/AroshaMalithi/ballerina-message-broker.git","svn_url":"https://github.com/AroshaMalithi/ballerina-message-broker","homepage":"","size":4420,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:jms-selectors","ref":"jms-selectors","sha":"13ed2f1044706b0623b5e02caf1cedde83ac6848","user":{"login":"wso2","id":533043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":111517878,"node_id":"MDEwOlJlcG9zaXRvcnkxMTE1MTc4Nzg=","name":"ballerina-message-broker","full_name":"wso2/ballerina-message-broker","private":false,"owner":{"login":"wso2","id":533043,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wso2/ballerina-message-broker","description":"Ballerina Message Broker is a lightweight, easy-to-use, 100% open source message-brokering server.","fork":false,"url":"https://api.github.com/repos/wso2/ballerina-message-broker","forks_url":"https://api.github.com/repos/wso2/ballerina-message-broker/forks","keys_url":"https://api.github.com/repos/wso2/ballerina-message-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/ballerina-message-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/ballerina-message-broker/teams","hooks_url":"https://api.github.com/repos/wso2/ballerina-message-broker/hooks","issue_events_url":"https://api.github.com/repos/wso2/ballerina-message-broker/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/ballerina-message-broker/events","assignees_url":"https://api.github.com/repos/wso2/ballerina-message-broker/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/ballerina-message-broker/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/ballerina-message-broker/tags","blobs_url":"https://api.github.com/repos/wso2/ballerina-message-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/ballerina-message-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/ballerina-message-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/ballerina-message-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/ballerina-message-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/ballerina-message-broker/languages","stargazers_url":"https://api.github.com/repos/wso2/ballerina-message-broker/stargazers","contributors_url":"https://api.github.com/repos/wso2/ballerina-message-broker/contributors","subscribers_url":"https://api.github.com/repos/wso2/ballerina-message-broker/subscribers","subscription_url":"https://api.github.com/repos/wso2/ballerina-message-broker/subscription","commits_url":"https://api.github.com/repos/wso2/ballerina-message-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/ballerina-message-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/ballerina-message-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/ballerina-message-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/ballerina-message-broker/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/ballerina-message-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/ballerina-message-broker/merges","archive_url":"https://api.github.com/repos/wso2/ballerina-message-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/ballerina-message-broker/downloads","issues_url":"https://api.github.com/repos/wso2/ballerina-message-broker/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/ballerina-message-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/ballerina-message-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/ballerina-message-broker/labels{/name}","releases_url":"https://api.github.com/repos/wso2/ballerina-message-broker/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/ballerina-message-broker/deployments","created_at":"2017-11-21T08:02:59Z","updated_at":"2018-12-03T04:46:08Z","pushed_at":"2018-12-05T09:31:10Z","git_url":"git://github.com/wso2/ballerina-message-broker.git","ssh_url":"git@github.com:wso2/ballerina-message-broker.git","clone_url":"https://github.com/wso2/ballerina-message-broker.git","svn_url":"https://github.com/wso2/ballerina-message-broker","homepage":"","size":4145,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":111,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":28,"open_issues":111,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553"},"html":{"href":"https://github.com/wso2/ballerina-message-broker/pull/553"},"issue":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/issues/553"},"comments":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/issues/553/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/pulls/553/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/ballerina-message-broker/statuses/5f2bf647bab1b83bba698dcf92ab35f6b0061178"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sdkottegoda"}}