MosaicIndexBuilder, variable can only be null here
--------------------------------------------------

                 Key: GEOT-2699
                 URL: http://jira.codehaus.org/browse/GEOT-2699
             Project: GeoTools
          Issue Type: Bug
          Components: gc imagemosaic
    Affects Versions: 2.6-M2
            Reporter: Stefan Alfons Krüger
            Priority: Minor


Not a big a problem because Exception was catched anyway. Looks like the 
ImageReader is closed later. Probably putting the r.dispose() into a finally 
block would be the safest.

                                ImageReader r = null;
                                if (it.hasNext()) {
                                        r = (ImageReader) it.next();
                                        r.setInput(inStream);
                                } else {
                                        // release resources
                                        try {
                                                inStream.close();
                                        } catch (Exception e) {
                                                // ignore exception
                                        }
                                        try {
                                                r.dispose();       <---- r can 
only be NULL here
                                        } catch (Exception e) {
                                                // ignore exception
                                        }



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to