Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
b9f1ed7b
Commit
b9f1ed7b
authored
Jul 21, 2021
by
Piotr Gawron
Browse files
deprecated method replaced
parent
cce092cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
rest-api/src/main/java/lcsb/mapviewer/api/convert/ConvertController.java
View file @
b9f1ed7b
...
...
@@ -278,8 +278,9 @@ public class ConvertController extends BaseController {
for
(
Converter
converter
:
modelConverters
)
{
if
(
removeWhiteSpaces
(
converter
.
getCommonName
()).
equals
(
name
))
{
try
{
return
converter
.
getClass
().
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
e
)
{
return
converter
.
getClass
().
getConstructor
().
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
|
NoSuchMethodException
|
SecurityException
e
)
{
throw
new
InvalidStateException
(
e
);
}
}
...
...
@@ -295,8 +296,9 @@ public class ConvertController extends BaseController {
for
(
Converter
converter
:
modelConverters
)
{
if
(
converter
.
getClass
().
getCanonicalName
().
equals
(
handlerClass
))
{
try
{
return
(
Converter
)
Class
.
forName
(
handlerClass
).
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
|
ClassNotFoundException
e
)
{
return
(
Converter
)
Class
.
forName
(
handlerClass
).
getConstructor
().
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
|
ClassNotFoundException
|
IllegalArgumentException
|
InvocationTargetException
|
NoSuchMethodException
|
SecurityException
e
)
{
throw
new
QueryException
(
"Problem with handler:"
+
handlerClass
);
}
}
...
...
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