You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2019/05/05 04:42:17 UTC

[netbeans-html4j] branch master updated: Presenter can be null

This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git


The following commit(s) were added to refs/heads/master by this push:
     new 353dacb  Presenter can be null
353dacb is described below

commit 353dacb14783eea032493170d2fa86316b91596c
Author: Jaroslav Tulach <ja...@apidesign.org>
AuthorDate: Sun May 5 06:42:08 2019 +0200

    Presenter can be null
---
 boot/src/main/java/org/netbeans/html/boot/spi/Fn.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boot/src/main/java/org/netbeans/html/boot/spi/Fn.java b/boot/src/main/java/org/netbeans/html/boot/spi/Fn.java
index 1a613ea..a4f2f45 100644
--- a/boot/src/main/java/org/netbeans/html/boot/spi/Fn.java
+++ b/boot/src/main/java/org/netbeans/html/boot/spi/Fn.java
@@ -66,7 +66,7 @@ public abstract class Fn {
      * @return true, if proper presenter is used
      */
     public final boolean isValid() {
-        return FnContext.currentPresenter(false) == presenter.presenter();
+        return FnContext.currentPresenter(false) == presenter();
     }
     
     /** Helper method to check if the provided instance is valid function.
@@ -233,7 +233,7 @@ public abstract class Fn {
      * @since 0.7
      */
     protected final Presenter presenter() {
-        return presenter.presenter();
+        return presenter == null ? null : presenter.presenter();
     }
     
     /** The representation of a <em>presenter</em> - usually a browser window.


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

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