Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Add support for simple SnmpSet operations. Add unit tests for it. #29

Merged
merged 8 commits into from
Feb 13, 2020

Conversation

mario-haag
Copy link

No description provided.

@@ -144,8 +149,8 @@ public boolean next(final SubRequest request) {
@Override
public void prepare(SubRequest request) {
RequestStatus status = request.getStatus();
if (request.getIndex() > 0) {
//Skip rowStatusColumn SubRequest with index 0
if (isSimpleSetOperation(request) || request.getIndex() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You're replacing every (request.getIndex() > 0) condition with a (isSimpleSetOperation(request) || request.getIndex() > 0) condition.

It would be shorter and easier to put all logic of the condition inside the isSimpleSetOperation() method and give it a good name.

@@ -131,6 +132,10 @@ public boolean next(final SubRequest request) {
return false;
}

private boolean isSimpleSetOperation(SubRequest request) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if not accessing members, please make it static to show that :)

@sfuhrm sfuhrm merged commit 19628d4 into 1and1:master Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants