Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
0f6f88ee
Commit
0f6f88ee
authored
Feb 25, 2019
by
Benedikt Zoennchen
Browse files
replace some deprecated calls.
parent
3424af6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
VadereUtils/src/org/vadere/util/data/cellgrid/CellState.java
View file @
0f6f88ee
...
...
@@ -16,7 +16,7 @@ public class CellState implements Cloneable {
@Override
public
CellState
clone
()
{
return
new
CellState
(
new
Double
(
potential
),
tag
);
return
new
CellState
(
Double
.
valueOf
(
potential
),
tag
);
}
@Override
...
...
VadereUtils/src/org/vadere/util/reflection/DynamicClassInstantiator.java
View file @
0f6f88ee
package
org.vadere.util.reflection
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.InvocationTargetException
;
/**
* For example, this class can be used for creating {@link attributes.Attributes} or
* {@link models.Model}s.
...
...
@@ -24,8 +27,8 @@ public class DynamicClassInstantiator<T> {
// I cannot provoke a ClassCastException by doing:
// T result = clazz.newInstance();
// This is an issue that comes back to the user of this API.
return
clazz
.
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
e
)
{
return
clazz
.
getDeclaredConstructor
().
newInstance
();
}
catch
(
InstantiationException
|
IllegalAccessException
|
NoSuchMethodException
|
InvocationTargetException
e
)
{
throw
new
CouldNotInstantiateException
(
e
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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