-
Notifications
You must be signed in to change notification settings - Fork 49
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
Conversation
@@ -20,9 +20,6 @@ if [ ! -f $site_path/cloud_iot_config.json ]; then | |||
false | |||
fi | |||
|
|||
echo Building validator... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.