-
Notifications
You must be signed in to change notification settings - Fork 27
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
Averager plugin: possibility to enable/disable by property and events #294
Merged
deinhofer
merged 2 commits into
master
from
klaus/averager-possibility-to-enable-and-disable
Apr 15, 2019
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-7.09 KB
(87%)
Documentation/ACS-Help/HTML/Plugins/processors/img/Averager.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 happens if newValue==null?
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.
since the property is defined as
integer
in the bundle descriptor, shouldn't any generic logic ensure that it is actually an integer value when arriving at this point? Otherwise, whats the point of declaring datatypes in the bundleDescriptor?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.
good point, although, semantically, "no value" (null) is not the same as 0 or could be interpreted differently. So maybe that's why you can't handle it generically.
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.
ok, so I should catch a NumberFormatException there? I've seen plenty plugins, where no FormatExceptions are caught at property parsing. I think any FormatExceptions in this method should be caught by default in a base plugin class, so that the creator of a plugin does not have to care about them, if he doesn't want any specific error handling.
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.
ok, you are right, the generic code in the DeploymentManager should do a check, if the value is conforming to the datatype specified in the bundle descriptor. If not log exceptions and proceed with datatype-specific default values.
These are the datatypes which could be easiliy checked:
https://github.com/asterics/AsTeRICS/blob/56f59f844f2a1c038ff4807ee208127d2033298b/ARE/middleware/src/main/java/eu/asterics/mw/model/DataType.java
Let's merge this PR and see if there is enough time for a generic solution.
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.
opened corresponding issue #312