Skip to content

Conversation

fsd654qyl
Copy link
Contributor

@fsd654qyl fsd654qyl commented Apr 25, 2021

fixed #486

  1. @Subparameter has accessibility problem. I solve it by setting the accessibility of field to true and then set to origin in ParameterDescription.java
  2. @Subparameter seems only can parse String, other data types do not work properly. So I add data type convertion in WrappedParameter.java

@mkarg mkarg added the bug Bug label Dec 17, 2023
parameterized.set(object, objectValue);
}
boolean access = sai.field.isAccessible();
sai.field.setAccessible(true); // before using the field, set accessible to true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a unit test for this bug. Thanks.

throws IllegalAccessException {
if (parameter != null) {
if (field != null) {
Class<?> fieldClass = field.getType();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a unit test for this bug. Thanks.

try {
value = fieldClass.getConstructor(value.getClass()).newInstance(value);
} catch (InstantiationException | InvocationTargetException | NoSuchMethodException e) {
e.printStackTrace();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not print to stack trace, but instead throw ParameterException. Thanks.

@mkarg
Copy link
Collaborator

mkarg commented Apr 27, 2024

@fsd654qyl Kindly asking for answers to the open questions. Thanks.

@mkarg
Copy link
Collaborator

mkarg commented Jul 6, 2024

@fsd654qyl Kindly requesting your response! :-)

@mkarg
Copy link
Collaborator

mkarg commented Aug 10, 2025

@fsd654qyl Kindly asking you to respond to the open question in your PR. Thanks! 😃

@mkarg mkarg force-pushed the master branch 2 times, most recently from 4dbceb5 to a1d8505 Compare October 5, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@SubParameter Problems
2 participants