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/03/23 02:46:25 UTC

[GitHub] [netbeans] EnricoScantamburlo opened a new pull request #2044: Fixed class cast exception when customzing the URLDisplayer

EnricoScantamburlo opened a new pull request #2044: Fixed class cast exception when customzing the URLDisplayer
URL: https://github.com/apache/netbeans/pull/2044
 
 
   We created a class that extended URLDisplayer and used theNbURLDisplayer as a delegate, but the got a ClassCastException. This is an attempt to fix 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] mklaehn commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer

Posted by GitBox <gi...@apache.org>.
mklaehn commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer
URL: https://github.com/apache/netbeans/pull/2044#discussion_r396773002
 
 

 ##########
 File path: platform/openide.awt/src/org/openide/awt/HtmlBrowser.java
 ##########
 @@ -965,6 +965,14 @@ public static URLDisplayer getDefault() {
         public void showURLExternal(URL u) {
             showURL(u);
         }
+        
+        /**
+         * resets the caches used
+         * If the default browser is changed this clears the instantiated objects for the old one
+         */
+        public void clearCache(){
 
 Review comment:
   Nitpick: usually there's an whitespace before the curly brace

----------------------------------------------------------------
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 #2044: Fixed class cast exception when customzing the URLDisplayer

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer
URL: https://github.com/apache/netbeans/pull/2044#discussion_r397444939
 
 

 ##########
 File path: platform/openide.awt/src/org/openide/awt/HtmlBrowser.java
 ##########
 @@ -965,6 +965,14 @@ public static URLDisplayer getDefault() {
         public void showURLExternal(URL u) {
             showURL(u);
         }
+        
+        /**
+         * resets the caches used
+         * If the default browser is changed this clears the instantiated objects for the old one
+         */
+        public void clearCache(){
+            
+        }
 
 Review comment:
   I think you covered everything. I think the only thing missing is `org.netbeans.core` needs to update its dependency on `org.openide.awt` to the newly set version.

----------------------------------------------------------------
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] mklaehn commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer

Posted by GitBox <gi...@apache.org>.
mklaehn commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer
URL: https://github.com/apache/netbeans/pull/2044#discussion_r396274110
 
 

 ##########
 File path: platform/o.n.core/src/org/netbeans/core/NbURLDisplayer.java
 ##########
 @@ -105,6 +105,11 @@ private void warmBrowserUp( boolean externalBrowser ) {
         }
     }
 
+    @Override
+    public void clearCache() {
+        super.clearCache(); //To change body of generated methods, choose Tools | Templates.
+    }
+
 
 Review comment:
   Why do you override a method that is doing nothing except call its super - which in turn does nothing?
   Maybe setting htmlViewer to null should have been done here?

----------------------------------------------------------------
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] mklaehn commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer

Posted by GitBox <gi...@apache.org>.
mklaehn commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer
URL: https://github.com/apache/netbeans/pull/2044#discussion_r396772981
 
 

 ##########
 File path: platform/openide.awt/src/org/openide/awt/HtmlBrowser.java
 ##########
 @@ -965,6 +965,14 @@ public static URLDisplayer getDefault() {
         public void showURLExternal(URL u) {
             showURL(u);
         }
+        
+        /**
+         * resets the caches used
+         * If the default browser is changed this clears the instantiated objects for the old one
+         */
+        public void clearCache(){
+            
+        }
 
 Review comment:
   This is a new method on a public API interface. As such it will propably require
   * an entry in the api changes XML file,
   * the module version needs to be increased and
   * the javadoc will need an appropriate `@since` tag.
   
   @matthiasblaesing did I miss something?

----------------------------------------------------------------
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] EnricoScantamburlo commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer

Posted by GitBox <gi...@apache.org>.
EnricoScantamburlo commented on a change in pull request #2044: Fixed class cast exception when customzing the URLDisplayer
URL: https://github.com/apache/netbeans/pull/2044#discussion_r396297224
 
 

 ##########
 File path: platform/o.n.core/src/org/netbeans/core/NbURLDisplayer.java
 ##########
 @@ -105,6 +105,11 @@ private void warmBrowserUp( boolean externalBrowser ) {
         }
     }
 
+    @Override
+    public void clearCache() {
+        super.clearCache(); //To change body of generated methods, choose Tools | Templates.
+    }
+
 
 Review comment:
   You are right, my change was not uploaded, fixing it right now

----------------------------------------------------------------
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