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
5af27f3e
Commit
5af27f3e
authored
Feb 03, 2026
by
Luna Riegel
Browse files
Refactor: Code cleaning
parent
6e509ce8
Changes
3
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/database/EmbeddedDatabaseHandler.java
View file @
5af27f3e
...
@@ -247,7 +247,7 @@ public class EmbeddedDatabaseHandler {
...
@@ -247,7 +247,7 @@ public class EmbeddedDatabaseHandler {
}
}
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Runtime
Exception
(
e
);
throw
new
EmbeddedDatabaseHandler
Exception
(
e
);
}
}
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
logger
.
error
(
Localization
.
getText
(
"DatabaseHandler.unmarshallingFailure"
),
id
);
logger
.
error
(
Localization
.
getText
(
"DatabaseHandler.unmarshallingFailure"
),
id
);
...
@@ -285,7 +285,7 @@ public class EmbeddedDatabaseHandler {
...
@@ -285,7 +285,7 @@ public class EmbeddedDatabaseHandler {
}
}
return
objects
;
return
objects
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
Runtime
Exception
(
e
);
throw
new
EmbeddedDatabaseHandler
Exception
(
e
);
}
}
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
logger
.
error
(
Localization
.
getText
(
"DatabaseHandler.unmarshallingFailure"
),
ids
);
logger
.
error
(
Localization
.
getText
(
"DatabaseHandler.unmarshallingFailure"
),
ids
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/database/FeatureCache.java
View file @
5af27f3e
...
@@ -52,7 +52,7 @@ public class FeatureCache implements CityObjectCache{
...
@@ -52,7 +52,7 @@ public class FeatureCache implements CityObjectCache{
DatabaseCacheLoader
.
Unmarshaller
<
GmlId
,
CityObject
>
single
=
handler:
:
unmarshallCityObject
;
DatabaseCacheLoader
.
Unmarshaller
<
GmlId
,
CityObject
>
single
=
handler:
:
unmarshallCityObject
;
DatabaseCacheLoader
.
BatchUnmarshaller
<
GmlId
,
CityObject
>
batch
=
handler:
:
unmarshallAllIds
;
DatabaseCacheLoader
.
BatchUnmarshaller
<
GmlId
,
CityObject
>
batch
=
handler:
:
unmarshallAllIds
;
cache
=
Caffeine
.
newBuilder
().
maximumSize
(
3000
).
removalListener
((
GmlId
key
,
CityObject
value
,
RemovalCause
cause
)
->
{
cache
=
Caffeine
.
newBuilder
().
maximumSize
(
3000
).
removalListener
((
GmlId
key
,
CityObject
value
,
RemovalCause
cause
)
->
{
if
(
value
!=
null
&&
cause
.
wasEvicted
()
&&
isFeatureMarshallable
(
value
)){
if
(
cause
.
wasEvicted
()
&&
isFeatureMarshallable
(
value
)){
handler
.
marshallCityObject
(
value
);
handler
.
marshallCityObject
(
value
);
}
}
}).
build
(
new
DatabaseCacheLoader
<>(
single
,
batch
));
}).
build
(
new
DatabaseCacheLoader
<>(
single
,
batch
));
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/exceptions/EmbeddedDatabaseHandlerException.java
View file @
5af27f3e
...
@@ -15,4 +15,8 @@ public class EmbeddedDatabaseHandlerException extends RuntimeException{
...
@@ -15,4 +15,8 @@ public class EmbeddedDatabaseHandlerException extends RuntimeException{
public
EmbeddedDatabaseHandlerException
(
String
message
,
Throwable
cause
)
{
public
EmbeddedDatabaseHandlerException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
super
(
message
,
cause
);
}
}
public
EmbeddedDatabaseHandlerException
(
Throwable
cause
){
super
(
cause
);
}
}
}
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