GitHub PullRequestReviewCommentEvent at 2014-05-04 17:40:47
Repository: netty
Actor: normanmaurer
Payload: {"comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/12262876","id":12262876,"diff_hunk":"@@ -0,0 +1,314 @@\n+/*\n+ * Copyright 2014 The Netty Project\n+ *\n+ * The Netty Project licenses this file to you under the Apache License, version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance with the License. You may obtain a\n+ * 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, software distributed under the License\n+ * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n+ * or implied. See the License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package io.netty.handler.codec.http2.draft12;\n+\n+import static io.netty.handler.codec.http2.draft12.Http2CodecUtil.DEFAULT_PRIORITY_WEIGHT;\n+\n+import java.util.ArrayDeque;\n+import java.util.Collections;\n+import java.util.Deque;\n+import java.util.HashMap;\n+import java.util.HashSet;\n+import java.util.Iterator;\n+import java.util.Map;\n+import java.util.Set;\n+\n+/**\n+ * Default implementation of {@link Http2PriorityTree}.\n+ */\n+public class DefaultHttp2PriorityTree<T> implements Http2PriorityTree<T> {\n+\n+    private final DefaultPriority<T> root = new DefaultPriority<T>(0, (short) 0, null);\n+    private Map<Integer, Priority<T>> priorityMap = new HashMap<Integer, Priority<T>>();\n+\n+    @Override\n+    public DefaultPriority<T> get(int streamId) {\n+        return (DefaultPriority<T>) priorityMap.get(streamId);","path":"codec-http2-draft12/src/main/java/io/netty/handler/codec/http2/draft12/DefaultHttp2PriorityTree.java","position":39,"original_position":39,"commit_id":"c84600f8d5485ee8ccc0d1cfa7f8b8bd5271db8b","original_commit_id":"c84600f8d5485ee8ccc0d1cfa7f8b8bd5271db8b","user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?","gravatar_id":"e521627c18ed3feaf9db41e754a79483","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"body":"Ok I think the whole DefaultPriority thing is not correct as DefaultPriority is a inner class with private static modifier. This means it should not escape this class.","created_at":"2014-05-04T17:40:47Z","updated_at":"2014-05-04T17:40:47Z","html_url":"https://github.com/netty/netty/pull/2458#discussion_r12262876","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/2458","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/12262876"},"html":{"href":"https://github.com/netty/netty/pull/2458#discussion_r12262876"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/2458"}}}}