Huskehhh / MySQL

Simple JDBC MySQL database wrapper for Java
MIT License
69 stars 51 forks source link

Corrected major condition error and removed duplicated code. #8

Closed Elarcis closed 10 years ago

Elarcis commented 10 years ago

The problem was : If the connection is closed, exceptions are generated. If the connection is open, everything runs fine but there is no need for that condition.

Reversed the condition so that it is opened only if it hasn't been before.

Also massively lightened up the code since 75% of it was duplicated in both MySQL and SQLite class, thanks to Java abstraction. Put all of it in Database.

Huskehhh commented 10 years ago

Thanks for the contribution! :+1: