Skip to content

Fixing issue 486 @SubParameter Problems#515

Open
fsd654qyl wants to merge 8 commits into
cbeust:masterfrom
fsd654qyl:master
Open

Fixing issue 486 @SubParameter Problems#515
fsd654qyl wants to merge 8 commits into
cbeust:masterfrom
fsd654qyl:master

Conversation

@fsd654qyl

@fsd654qyl fsd654qyl commented Apr 25, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

mkarg commented Apr 27, 2024

Copy link
Copy Markdown
Collaborator

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

@mkarg

mkarg commented Jul 6, 2024

Copy link
Copy Markdown
Collaborator

@fsd654qyl Kindly requesting your response! :-)

@mkarg

mkarg commented Aug 10, 2025

Copy link
Copy Markdown
Collaborator

@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