You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/02/24 16:52:48 UTC

[jspwiki] 06/38: add @SuppressWarnings annotation to E Engine#adapt( Class< E > )

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

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git

commit 3e3810d368f9a7835686c5bbbb906e713da164fe
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Feb 20 14:29:39 2020 +0100

    add @SuppressWarnings annotation to E Engine#adapt( Class< E > )
---
 jspwiki-main/src/main/java/org/apache/wiki/api/core/Engine.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/jspwiki-main/src/main/java/org/apache/wiki/api/core/Engine.java b/jspwiki-main/src/main/java/org/apache/wiki/api/core/Engine.java
index cc45798..a336542 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/api/core/Engine.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/api/core/Engine.java
@@ -88,7 +88,8 @@ public interface Engine {
      * @param <E> type to adapt to.
      * @return engine instance adapted to the requested type. Might throw an unchecked exception if the instance cannot be adapted to requested type!
      */
-    default < E extends Engine > E adapt( Class< E > cls ) {
+    @SuppressWarnings( "unchecked" )
+    default < E extends Engine > E adapt( final Class< E > cls ) {
         return ( E )this;
     }