You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/04/15 15:56:45 UTC

[GitHub] [netbeans] Rahul-khandelwal opened a new pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Rahul-khandelwal opened a new pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080
 
 
   This is my first contribution and is trivial.
   Javadoc title is being unescaped after parsing.
   
   Before fix - 
   ![BeforeFix](https://user-images.githubusercontent.com/22575469/79359036-b0059d00-7f5f-11ea-89cf-6886e978ab47.png)
   
   After fix -
   ![AfterFix](https://user-images.githubusercontent.com/22575469/79359109-c7448a80-7f5f-11ea-9cbc-cb200f3f3959.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410832743
 
 

 ##########
 File path: java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java
 ##########
 @@ -417,6 +418,12 @@ private void handleTitleTag() throws IOException {
                             } else {
                                 title = new String(buf, 0, offset - 7, charset).trim();
                             }
+                            
+                            // Unescape the title, done for JDK 11.
+                            // JDK 11 title contains &amp;
+                            // NOI18N
 
 Review comment:
   Removed NOI18N comment.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#issuecomment-614444537
 
 
   @geertjanw  This is my first pull request, so I am not sure why checks have failed. Please review this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410813987
 
 

 ##########
 File path: java/javadoc/test/unit/src/org/netbeans/modules/javadoc/search/IndexBuilderTest.java
 ##########
 @@ -137,6 +137,19 @@ public void testMissingTitle() throws Exception {
             is.close();
         }
     }
+    
+    public void testEscapedHtmlTitle() throws Exception {
+        String content = "<HTML><HEAD><TITLE>Overview (Java SE 11 &amp; JDK 11 )</TITLE></HEAD></HTML>";
+        InputStream is = new ByteArrayInputStream(content.getBytes());
+        SimpleTitleParser tp = new SimpleTitleParser(is);
+        try {
 
 Review comment:
   @matthiasblaesing SImpleTitleParser doesn't implement AutoClosable interface. Should I make that change?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410832646
 
 

 ##########
 File path: java/javadoc/test/unit/src/org/netbeans/modules/javadoc/search/IndexBuilderTest.java
 ##########
 @@ -137,6 +137,19 @@ public void testMissingTitle() throws Exception {
             is.close();
         }
     }
+    
+    public void testEscapedHtmlTitle() throws Exception {
+        String content = "<HTML><HEAD><TITLE>Overview (Java SE 11 &amp; JDK 11 )</TITLE></HEAD></HTML>";
+        InputStream is = new ByteArrayInputStream(content.getBytes());
+        SimpleTitleParser tp = new SimpleTitleParser(is);
+        try {
 
 Review comment:
   Implemented AutoClosable on SimpleTitleParser

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410722856
 
 

 ##########
 File path: java/javadoc/test/unit/src/org/netbeans/modules/javadoc/search/IndexBuilderTest.java
 ##########
 @@ -137,6 +137,19 @@ public void testMissingTitle() throws Exception {
             is.close();
         }
     }
+    
+    public void testEscapedHtmlTitle() throws Exception {
+        String content = "<HTML><HEAD><TITLE>Overview (Java SE 11 &amp; JDK 11 )</TITLE></HEAD></HTML>";
+        InputStream is = new ByteArrayInputStream(content.getBytes());
+        SimpleTitleParser tp = new SimpleTitleParser(is);
+        try {
 
 Review comment:
   Please use try-with-resource.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410820372
 
 

 ##########
 File path: java/javadoc/test/unit/src/org/netbeans/modules/javadoc/search/IndexBuilderTest.java
 ##########
 @@ -137,6 +137,19 @@ public void testMissingTitle() throws Exception {
             is.close();
         }
     }
+    
+    public void testEscapedHtmlTitle() throws Exception {
+        String content = "<HTML><HEAD><TITLE>Overview (Java SE 11 &amp; JDK 11 )</TITLE></HEAD></HTML>";
+        InputStream is = new ByteArrayInputStream(content.getBytes());
+        SimpleTitleParser tp = new SimpleTitleParser(is);
+        try {
 
 Review comment:
   @matthiasblaesing  I am implementing **AutoClosable** on **SimpleTitleParser** as suggested.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410722947
 
 

 ##########
 File path: java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java
 ##########
 @@ -417,6 +418,12 @@ private void handleTitleTag() throws IOException {
                             } else {
                                 title = new String(buf, 0, offset - 7, charset).trim();
                             }
+                            
+                            // Unescape the title, done for JDK 11.
+                            // JDK 11 title contains &amp;
+                            // NOI18N
 
 Review comment:
   The NOI18N comment does not belong here, the comment is IMHO unnecessary, as "unescapeHTML" is pretty self-explaining.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#issuecomment-616029927
 
 
   @matthiasblaesing  Thanks for your inputs. This is really helpful.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410813987
 
 

 ##########
 File path: java/javadoc/test/unit/src/org/netbeans/modules/javadoc/search/IndexBuilderTest.java
 ##########
 @@ -137,6 +137,19 @@ public void testMissingTitle() throws Exception {
             is.close();
         }
     }
+    
+    public void testEscapedHtmlTitle() throws Exception {
+        String content = "<HTML><HEAD><TITLE>Overview (Java SE 11 &amp; JDK 11 )</TITLE></HEAD></HTML>";
+        InputStream is = new ByteArrayInputStream(content.getBytes());
+        SimpleTitleParser tp = new SimpleTitleParser(is);
+        try {
 
 Review comment:
   @matthiasblaesing SImpleTitleParser doesn't implement AutoClosable interface. Should I make that change?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#issuecomment-616201330
 
 
   @matthiasblaesing  I have reverted the AutoClosable implementation from SimpleTitleParser.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#issuecomment-616057026
 
 
   @matthiasblaesing Updated the pull request with your suggestion.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
Rahul-khandelwal commented on a change in pull request #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#discussion_r410814087
 
 

 ##########
 File path: java/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java
 ##########
 @@ -417,6 +418,12 @@ private void handleTitleTag() throws IOException {
                             } else {
                                 title = new String(buf, 0, offset - 7, charset).trim();
                             }
+                            
+                            // Unescape the title, done for JDK 11.
+                            // JDK 11 title contains &amp;
+                            // NOI18N
 
 Review comment:
   I am fixing it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on issue #2080: NETBEANS-4176-Unescape javadoc title after parsing
URL: https://github.com/apache/netbeans/pull/2080#issuecomment-616187803
 
 
   Thank you for the update. I don't think that `SimpleTitleParser` should implement `AutoCloseable`. I would just pull the `InputStream` creation into the try-with-resource. The `SimpleTitleParser` can be constructed inside the `try` block.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists