Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge different configuration objects, and create the basic foundation for profiles-in-validator #480

Merged
merged 44 commits into from
Oct 12, 2022

Conversation

grafnu
Copy link
Collaborator

@grafnu grafnu commented Oct 12, 2022

This PR is large because it's a refactoring that touches lots of little things (class name changes) in lots of files. The actual functionality change it very small, and is centered around a consolidated use of a "configuration object" that's used in the validator main startup. Everything else is essentially a rename/refactor.

The only real new "logic" here this one small function, that allows for reading in a file to provide basic values rather than relying on pure command-line arguments.

@@ -20,9 +20,6 @@ if [ ! -f $site_path/cloud_iot_config.json ]; then
false
fi

echo Building validator...
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was redundant with a build operation lower down in the stack, so just removing to reduce overall code.

@@ -76,12 +77,33 @@ public static void toJsonFile(File file, Object target) {
}
}

public static <T> T deepCopy(T endpoint1, Class<T> valueType) {
@SuppressWarnings("unchecked")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there anything interesting and useful we can comment here about why we need this? Is it the return or the cast? Same question for the other functions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved the @SuppressWarnings to specific field declarations where the type-cast is more clear.

@grafnu grafnu merged commit b53681d into faucetsdn:master Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants