Issue Type: Bug Bug
Assignee: Justin Deoliveira
Components: jdbc-postgis plugin
Created: 17/Jan/14 9:06 AM
Description:

Line 190 of contains:

Connection cx = null;
boolean canConnect = true;
try

{ ds.getConnection(); }

catch (SQLException e)

{ canConnect = false; }

finally

{ closer.closeSafe(cx); }

As you can see, the finally block always try to close a null connection which results in doing nothing.

The fix should be cx = ds.getConnection right after the "try" line.

Finally,
line 295 contains:
} catch (SQLException e) {
throw new IOException("Failed to create the target database", e);

Even if we are doing a drop instead of a create.
So I'll change the exception with:
Failed to drop the target database

I'm going to create a pull request with these small fixes.

Fix Versions: 11-beta
Project: GeoTools
Priority: Minor Minor
Reporter: Daniele Romagnoli
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to