From: Kai Moritz Date: Sat, 16 Jul 2016 20:45:24 +0000 (+0200) Subject: Fixed possible NullPointerException during link-calculation X-Git-Tag: maven-thymeleaf-skin-1.0.0~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=246211369031d714ff4c68f93d75ad8df400e79e;p=maven-thymeleaf-skin Fixed possible NullPointerException during link-calculation --- diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index 86006d7..ca508d4 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.vm @@ -7,7 +7,11 @@ #set ( $stack = $project.getClass().forName('java.util.LinkedList').newInstance() ) #macro ( buildPages $menu ) - #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) + #if ( $menu.href ) + #set ( $currentItemHref = $PathTool.calculateLink( $menu.href, $relativePath ) ) + #else + #set ( $currentItemHref = '' ) + #end #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) #if ($currentItemHref)