{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/comments/216158100","pull_request_review_id":153582393,"id":216158100,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjE1ODEwMA==","diff_hunk":"@@ -371,60 +371,34 @@ public ResourceGroup getRg() {\n     }\n \n     /**\n-     * app.linuxFxVersion() is the only API we could get the version info of a Linux web app.\n-     * It returns values like \"Tomcat|8.5-jre8\" if it is a Linux with the web container Tomcat.\n+     * Check if the web app is a Windows or Linux Java configured web app.\n+     * Docker web apps are not included.\n      */\n-    public static String getJDKVersion(@NotNull final WebApp webApp) {\n-        switch(webApp.operatingSystem()) {\n-            case WINDOWS:\n-                return webApp.javaVersion().toString();\n-            case LINUX:\n-                final String linuxVersion = webApp.linuxFxVersion();\n-                if (linuxVersion == null) {\n-                    return DEFAULT_VALUE_WHEN_VERSION_INVALID;\n-                }\n-\n-                final String[] versions = linuxVersion.split(\"-\");\n-                return versions.length != 2 ? linuxVersion : versions[1];\n-            default:\n-                return DEFAULT_VALUE_WHEN_VERSION_INVALID;\n-        }\n+    public static boolean isJavaWebApp(@NotNull WebApp webApp) {\n+        return webApp.javaVersion() != JavaVersion.OFF || StringUtils.containsIgnoreCase(webApp.linuxFxVersion(), \"jre8\");\n     }\n \n     /**\n-     * app.linuxFxVersion() is the only API we could get the version info of a Linux web app.\n-     * It returns \"Tomcat|8.5-jre8\" if it is a Linux web app with the web container Tomcat.\n-     * Tomcat is the only supported web container.\n-     * If the web app is a Java SE web app, which has no web container, linuxFxVersion() returns \"Java|8-jre8\".\n-     * And we will return N/A for those kind of web apps.\n+     * For a Windows web app, APIs are separated to get jdk information and web container information.\n+     * For a Linux web app, API app.linuxFxVersion() returns a combined information, like\n+     * \"Tomcat|8.5-jre8\" if it is a Linux web app with the web container Tomcat.\n+     * We return a combined and refactored information as Java Runtime.\n      */\n-    public static String getWebContainer(@NotNull final WebApp webApp) {\n-        switch(webApp.operatingSystem()) {\n+    public static String getJavaRuntime(@NotNull final WebApp webApp) {\n+        final String delimiter = \"  \";\n+        switch (webApp.operatingSystem()) {\n             case WINDOWS:\n-                return String.join(\" \", webApp.javaContainer(), webApp.javaContainerVersion());\n+                final String refactoredJavaVersion = \"Java\" + webApp.javaVersion().toString();\n+                return String.join(delimiter, webApp.javaContainer(), webApp.javaContainerVersion(), refactoredJavaVersion);\n             case LINUX:\n                 final String linuxVersion = webApp.linuxFxVersion();\n-                final String[] versions = linuxVersion.split(\"-\");\n-                if (versions.length != 2) {\n-                    return linuxVersion;\n-                }\n-                if (StringUtils.containsIgnoreCase(versions[0], \"tomcat\")) {\n-                    return versions[0].replace(\"|\", \" \");\n+                if (linuxVersion == null) {\n+                    return DEFAULT_VALUE_WHEN_VERSION_INVALID;\n                 } else {\n-                    return \"N/A\";\n+                    return linuxVersion.replace(\"|\", delimiter).replace(\"-\", delimiter);","path":"Utils/azuretools-core/src/com/microsoft/azuretools/utils/WebAppUtils.java","position":60,"original_position":60,"commit_id":"ef04681b885da6e75ed514e4117bf72629cb327e","original_commit_id":"ef04681b885da6e75ed514e4117bf72629cb327e","user":{"login":"SummerSun","id":5179063,"node_id":"MDQ6VXNlcjUxNzkwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5179063?v=4","gravatar_id":"","url":"https://api.github.com/users/SummerSun","html_url":"https://github.com/SummerSun","followers_url":"https://api.github.com/users/SummerSun/followers","following_url":"https://api.github.com/users/SummerSun/following{/other_user}","gists_url":"https://api.github.com/users/SummerSun/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerSun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerSun/subscriptions","organizations_url":"https://api.github.com/users/SummerSun/orgs","repos_url":"https://api.github.com/users/SummerSun/repos","events_url":"https://api.github.com/users/SummerSun/events{/privacy}","received_events_url":"https://api.github.com/users/SummerSun/received_events","type":"User","site_admin":false},"body":"Are you suggesting that we use the format to combine the Windows Runtime? Like `Tomcat|8.5-Jre8`, I don't think it is a good format to show in our UI to users, especially the `|` between web container and its version. Maybe some suggestions about the formats?","created_at":"2018-09-09T14:00:24Z","updated_at":"2018-09-09T14:00:24Z","html_url":"https://github.com/Microsoft/azure-tools-for-java/pull/1974#discussion_r216158100","pull_request_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/comments/216158100"},"html":{"href":"https://github.com/Microsoft/azure-tools-for-java/pull/1974#discussion_r216158100"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974"}},"in_reply_to_id":216135080},"pull_request":{"url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974","id":213873323,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzODczMzIz","html_url":"https://github.com/Microsoft/azure-tools-for-java/pull/1974","diff_url":"https://github.com/Microsoft/azure-tools-for-java/pull/1974.diff","patch_url":"https://github.com/Microsoft/azure-tools-for-java/pull/1974.patch","issue_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues/1974","number":1974,"state":"open","locked":false,"title":"Combine JDK and Web Container into Runtime and show OS info of a web app","user":{"login":"SummerSun","id":5179063,"node_id":"MDQ6VXNlcjUxNzkwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5179063?v=4","gravatar_id":"","url":"https://api.github.com/users/SummerSun","html_url":"https://github.com/SummerSun","followers_url":"https://api.github.com/users/SummerSun/followers","following_url":"https://api.github.com/users/SummerSun/following{/other_user}","gists_url":"https://api.github.com/users/SummerSun/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerSun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerSun/subscriptions","organizations_url":"https://api.github.com/users/SummerSun/orgs","repos_url":"https://api.github.com/users/SummerSun/repos","events_url":"https://api.github.com/users/SummerSun/events{/privacy}","received_events_url":"https://api.github.com/users/SummerSun/received_events","type":"User","site_admin":false},"body":"Fix issue #1968 \r\n\r\nUse table row `runtime` to show a combined and refactored information of Linux or Windows web app.\r\nAdd new table row `OS` to show the operating system of a web app.","created_at":"2018-09-07T09:45:15Z","updated_at":"2018-09-09T14:00:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02894e515aa452b3029854b8a765f91a9ebaa608","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jdneo","id":6193897,"node_id":"MDQ6VXNlcjYxOTM4OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/6193897?v=4","gravatar_id":"","url":"https://api.github.com/users/jdneo","html_url":"https://github.com/jdneo","followers_url":"https://api.github.com/users/jdneo/followers","following_url":"https://api.github.com/users/jdneo/following{/other_user}","gists_url":"https://api.github.com/users/jdneo/gists{/gist_id}","starred_url":"https://api.github.com/users/jdneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdneo/subscriptions","organizations_url":"https://api.github.com/users/jdneo/orgs","repos_url":"https://api.github.com/users/jdneo/repos","events_url":"https://api.github.com/users/jdneo/events{/privacy}","received_events_url":"https://api.github.com/users/jdneo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974/commits","review_comments_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974/comments","review_comment_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues/1974/comments","statuses_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/statuses/ef04681b885da6e75ed514e4117bf72629cb327e","head":{"label":"SummerSun:table","ref":"table","sha":"ef04681b885da6e75ed514e4117bf72629cb327e","user":{"login":"SummerSun","id":5179063,"node_id":"MDQ6VXNlcjUxNzkwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5179063?v=4","gravatar_id":"","url":"https://api.github.com/users/SummerSun","html_url":"https://github.com/SummerSun","followers_url":"https://api.github.com/users/SummerSun/followers","following_url":"https://api.github.com/users/SummerSun/following{/other_user}","gists_url":"https://api.github.com/users/SummerSun/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerSun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerSun/subscriptions","organizations_url":"https://api.github.com/users/SummerSun/orgs","repos_url":"https://api.github.com/users/SummerSun/repos","events_url":"https://api.github.com/users/SummerSun/events{/privacy}","received_events_url":"https://api.github.com/users/SummerSun/received_events","type":"User","site_admin":false},"repo":{"id":129345551,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkzNDU1NTE=","name":"azure-tools-for-java","full_name":"SummerSun/azure-tools-for-java","owner":{"login":"SummerSun","id":5179063,"node_id":"MDQ6VXNlcjUxNzkwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5179063?v=4","gravatar_id":"","url":"https://api.github.com/users/SummerSun","html_url":"https://github.com/SummerSun","followers_url":"https://api.github.com/users/SummerSun/followers","following_url":"https://api.github.com/users/SummerSun/following{/other_user}","gists_url":"https://api.github.com/users/SummerSun/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerSun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerSun/subscriptions","organizations_url":"https://api.github.com/users/SummerSun/orgs","repos_url":"https://api.github.com/users/SummerSun/repos","events_url":"https://api.github.com/users/SummerSun/events{/privacy}","received_events_url":"https://api.github.com/users/SummerSun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SummerSun/azure-tools-for-java","description":"Azure tools for Java, including Azure Toolkits for Eclipse, IntelliJ and related projects.","fork":true,"url":"https://api.github.com/repos/SummerSun/azure-tools-for-java","forks_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/forks","keys_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/teams","hooks_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/hooks","issue_events_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/issues/events{/number}","events_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/events","assignees_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/assignees{/user}","branches_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/branches{/branch}","tags_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/tags","blobs_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/languages","stargazers_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/stargazers","contributors_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/contributors","subscribers_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/subscribers","subscription_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/subscription","commits_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/contents/{+path}","compare_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/merges","archive_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/downloads","issues_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/issues{/number}","pulls_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/labels{/name}","releases_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/releases{/id}","deployments_url":"https://api.github.com/repos/SummerSun/azure-tools-for-java/deployments","created_at":"2018-04-13T04:01:15Z","updated_at":"2018-09-07T08:47:21Z","pushed_at":"2018-09-07T09:46:30Z","git_url":"git://github.com/SummerSun/azure-tools-for-java.git","ssh_url":"git@github.com:SummerSun/azure-tools-for-java.git","clone_url":"https://github.com/SummerSun/azure-tools-for-java.git","svn_url":"https://github.com/SummerSun/azure-tools-for-java","homepage":null,"size":90768,"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":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"Microsoft:develop","ref":"develop","sha":"0f361646815563eea6d4b85ee714f9b2780d24a7","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":53603813,"node_id":"MDEwOlJlcG9zaXRvcnk1MzYwMzgxMw==","name":"azure-tools-for-java","full_name":"Microsoft/azure-tools-for-java","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/azure-tools-for-java","description":"Azure tools for Java, including Azure Toolkits for Eclipse, IntelliJ and related projects.","fork":false,"url":"https://api.github.com/repos/Microsoft/azure-tools-for-java","forks_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/forks","keys_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/teams","hooks_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/events","assignees_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/tags","blobs_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/languages","stargazers_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/subscription","commits_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/merges","archive_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/downloads","issues_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/azure-tools-for-java/deployments","created_at":"2016-03-10T17:29:21Z","updated_at":"2018-09-07T08:45:01Z","pushed_at":"2018-09-07T09:46:31Z","git_url":"git://github.com/Microsoft/azure-tools-for-java.git","ssh_url":"git@github.com:Microsoft/azure-tools-for-java.git","clone_url":"https://github.com/Microsoft/azure-tools-for-java.git","svn_url":"https://github.com/Microsoft/azure-tools-for-java","homepage":null,"size":90724,"stargazers_count":87,"watchers_count":87,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":293,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":63,"open_issues":293,"watchers":87,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974"},"html":{"href":"https://github.com/Microsoft/azure-tools-for-java/pull/1974"},"issue":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues/1974"},"comments":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/issues/1974/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/pulls/1974/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/azure-tools-for-java/statuses/ef04681b885da6e75ed514e4117bf72629cb327e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"SummerSun"}}