Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,11 @@ public static Xpp3Dom extractPluginConfiguration(String artifactId, Xpp3Dom pomD
* <br>
* Note: the caller is responsible for casting to what the desired type is.
*/
public static Object getVariableValueFromObject(Object object, String variable) throws IllegalAccessException {
@SuppressWarnings("unchecked")
public static <T> T getVariableValueFromObject(Object object, String variable) throws IllegalAccessException {
Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
field.setAccessible(true);
return field.get(object);
return (T) field.get(object);
}

/**
Expand Down