Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
786171a6
Commit
786171a6
authored
Jul 24, 2025
by
Luna Riegel
Browse files
Style: Change logging of CityObject marshalling
parent
b1b1c84f
Changes
1
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/database/DatabaseHandler.java
View file @
786171a6
...
@@ -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
c
ity
o
bject {} "
,
co
);
logger
.
debug
(
"Attempting to serialize
C
ity
O
bject
:
{} "
,
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!"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment