Commit 786171a6 authored by Luna Riegel's avatar Luna Riegel
Browse files

Style: Change logging of CityObject marshalling

parent b1b1c84f
...@@ -17,7 +17,6 @@ import java.sql.Connection; ...@@ -17,7 +17,6 @@ import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -77,14 +76,13 @@ public class DatabaseHandler { ...@@ -77,14 +76,13 @@ public class DatabaseHandler {
String bbox = BoundingBox.of(co).to2DWkt(); String bbox = BoundingBox.of(co).to2DWkt();
ps.setString(2, bbox); ps.setString(2, bbox);
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("Attempting to serialize city object {} ", co); logger.debug("Attempting to serialize CityObject: {} ", co);
} }
ps.setString(4, co.getClass().getName()); ps.setString(4, co.getClass().getName());
byte[] bytes = SerializationUtils.serialize(co); byte[] bytes = SerializationUtils.serialize(co);
ByteArrayInputStream bis = new ByteArrayInputStream(bytes); ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
ps.setBinaryStream(3, bis, bytes.length); ps.setBinaryStream(3, bis, bytes.length);
ps.executeUpdate(); ps.executeUpdate();
logger.debug("Successfully serialized CityObject to database");
} }
} catch (SQLException e) { } catch (SQLException e) {
logger.error("Saving of city object to embedded database failed!"); logger.error("Saving of city object to embedded database failed!");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment