<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial" size="2"><span style="font-size:11pt;">
<div>To get an understanding of how grid coverages get loaded and rendered I tried to run ReliefShadowDemo.</div>
<div>Instead of any image I just got a warning instead:</div>
<div><font face="Calibri"> </font></div>
<div>WARNING java.awt.image.DataBufferUShort cannot be cast to java.awt.image.DataBufferShort </div>
<div><font face="Calibri"> </font></div>
<div>I traced it down to:</div>
<div> </div>
<div><font face="Calibri"><a href="https://github.com/Geomatys/geotoolkit/blob/master/modules/storage/geotk-coverage-imagery/src/main/java/org/geotoolkit/image/iterator/PixelIterator.java#L899"><font face="Arial" color="#0563C1"><u>https://github.com/Geomatys/geotoolkit/blob/master/modules/storage/geotk-coverage-imagery/src/main/java/org/geotoolkit/image/iterator/PixelIterator.java#L899</u></font></a></font></div>
<div><font face="Calibri"> </font></div>
<div>In contrast to other cases TYPE_SHORT and  TYPE_USHORT have to be differentiated here since DataBufferUShort does not extend DataBufferShort <font face="Wingdings">L</font></div>
<div><font face="Calibri"> </font></div>
<div>The Exception and its StackTrace then “kindly” turn into a warning at: </div>
<div><font face="Calibri"> </font></div>
<div><font face="Calibri"><a href="https://github.com/Geomatys/geotoolkit/blob/master/modules/display/geotk-render2d/src/main/java/org/geotoolkit/display2d/style/renderer/DefaultRasterSymbolizerRenderer.java#L356"><font face="Arial" color="#0563C1"><u>https://github.com/Geomatys/geotoolkit/blob/master/modules/display/geotk-render2d/src/main/java/org/geotoolkit/display2d/style/renderer/DefaultRasterSymbolizerRenderer.java#L356</u></font></a></font></div>
<div><font face="Calibri"> </font></div>
<div>After splitting the case statement it worked fine again.</div>
<div> </div>
<div>Regards, Dieter.</div>
<div><font face="Calibri"> </font></div>
<div>PS: wondered why this ever worked before, but just noticed this code was optimized two weeks ago <font face="Wingdings">J</font></div>
<div><font face="Calibri"> </font></div>
</span></font>
</body>
</html>