You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2020/01/21 12:47:24 UTC

[wicket] branch csp-display-none updated: WICKET-6725: Coding style issue

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

papegaaij pushed a commit to branch csp-display-none
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/csp-display-none by this push:
     new 4d13fd6  WICKET-6725: Coding style issue
4d13fd6 is described below

commit 4d13fd69be10bb23f7c69fcc93bdb9eb089c19dd
Author: Emond Papegaaij <em...@topicus.nl>
AuthorDate: Tue Jan 21 13:46:37 2020 +0100

    WICKET-6725: Coding style issue
---
 .../java/org/apache/wicket/protocol/http/WebApplication.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
index 95dfd3b..d71c1dc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
@@ -21,7 +21,6 @@ import java.nio.charset.Charset;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.Locale;
-import java.util.Optional;
 import java.util.function.Function;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
@@ -761,11 +760,9 @@ public abstract class WebApplication extends Application
 		getAjaxRequestTargetListeners().add(new AjaxEnclosureListener());
 		
 		getHeaderContributorListeners().add(head -> {
-			Optional<CssResourceReference> wicketCoreCSS = getResourceSettings().getWicketCoreCSS();
-			if (wicketCoreCSS.isPresent())
-			{
-				head.render(CssHeaderItem.forReference(wicketCoreCSS.get()));
-			}
+			getResourceSettings().getWicketCoreCSS().ifPresent(wicketCoreCSS -> {
+				head.render(CssHeaderItem.forReference(wicketCoreCSS));
+			});
 		});
 
 		// Configure the app.