Skip to content

Commit 1c3f936

Browse files
sebasbaumhphillipross
authored andcommitted
Update PostgreSQL version and group. (#40)
According to http://mvnrepository.com/artifact/postgresql/postgresql the artifact has been moved from group "postgresql" to "org.postgresql". Unfortunately using the old version in PostGIS JDBC and declaring a newer version in a project using it will result in the inclusion of two PostgreSQL JDBC with different versions in the resulting application. I had to change the acceptsURL functions of the DriverWrappers as well to not declare throwing an SQLException as org.postgresql.Driver.acceptsURL does no more throw it.
1 parent c41ef62 commit 1c3f936

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

jdbc/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
<dependencies>
2727
<dependency>
28-
<groupId>postgresql</groupId>
28+
<groupId>org.postgresql</groupId>
2929
<artifactId>postgresql</artifactId>
30-
<version>[9.1-901.jdbc3,)</version>
30+
<version>[9.4.1208.jre7,)</version>
3131
</dependency>
3232
</dependencies>
3333

jdbc/src/main/java/org/postgis/DriverWrapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,8 @@ protected boolean useLW(Connection result) {
179179
* @see java.sql.Driver#acceptsURL
180180
* @param url the URL of the driver
181181
* @return true if this driver accepts the given URL
182-
* @exception SQLException Passed through from the underlying PostgreSQL
183-
* driver, should not happen.
184182
*/
185-
public boolean acceptsURL(String url) throws SQLException {
183+
public boolean acceptsURL(String url) {
186184
try {
187185
url = mangleURL(url);
188186
} catch (SQLException e) {

jdbc_jtsparser/src/main/java/org/postgis/jts/JtsGisWrapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@ public static String mangleURL(String url) throws SQLException {
120120
* @see java.sql.Driver#acceptsURL
121121
* @param url the URL of the driver
122122
* @return true if this driver accepts the given URL
123-
* @exception SQLException if a database-access error occurs (Dont know why
124-
* it would *shrug*)
125123
*/
126-
public boolean acceptsURL(String url) throws SQLException {
124+
public boolean acceptsURL(String url) {
127125
try {
128126
url = mangleURL(url);
129127
} catch (SQLException e) {

jdbc_jtsparser/src/main/java/org/postgis/jts/JtsWrapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,8 @@ public static String mangleURL(String url) throws SQLException {
126126
* @see java.sql.Driver#acceptsURL
127127
* @param url the URL of the driver
128128
* @return true if this driver accepts the given URL
129-
* @exception SQLException Passed through from the underlying PostgreSQL
130-
* driver, should not happen.
131129
*/
132-
public boolean acceptsURL(String url) throws SQLException {
130+
public boolean acceptsURL(String url) {
133131
try {
134132
url = mangleURL(url);
135133
} catch (SQLException e) {

postgis-jdbc-java2d/src/main/java/org/postgis/java2d/Java2DWrapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,8 @@ public static String mangleURL(String url) throws SQLException {
127127
* @see java.sql.Driver#acceptsURL
128128
* @param url the URL of the driver
129129
* @return true if this driver accepts the given URL
130-
* @exception SQLException if a database-access error occurs (Dont know why
131-
* it would *shrug*)
132130
*/
133-
public boolean acceptsURL(String url) throws SQLException {
131+
public boolean acceptsURL(String url) {
134132
try {
135133
url = mangleURL(url);
136134
} catch (SQLException e) {

0 commit comments

Comments
 (0)