Issues/247#248
Merged
lloydwatkin merged 16 commits intobuddycloud:masterfrom Oct 10, 2014
Merged
Conversation
Member
|
"Findbugs"? Am I out of a job? |
Member
There was a problem hiding this comment.
We can change this to:
if (!reqIQ.getType().equals(IQ.Type.Result)) {
Member
There was a problem hiding this comment.
Can you remove this one then please?
Member
There was a problem hiding this comment.
This should be a not comparison, original line:
if (false == actorJid.toBareJID().equals(ns.getUser())) {Basically we don't want to show a subscription != 'subscribed' to anyone but the owner/admin or the user themselves.
Member
There was a problem hiding this comment.
for (NodeMembership ns : cur) {
if (!actorJid.toBareJID().equals(ns.getUser().toBareJID()) &&
!isOwnerModerator() &&
!ns.getSubscription().equals(Subscriptions.subscribed)) {
continue;
}
Element subscription = subscriptions.addElement(XMLConstants.SUBSCRIPTION_ELEM);
subscription.addAttribute(XMLConstants.NODE_ATTR, ns.getNodeId())
.addAttribute(XMLConstants.SUBSCRIPTION_ELEM, ns.getSubscription().toString())
.addAttribute(XMLConstants.JID_ATTR, ns.getUser().toBareJID());
if (null != ns.getInvitedBy()) {
subscription.addAttribute(XMLConstants.INVITED_BY_ELEM, ns.getInvitedBy().toBareJID());
}
}...would give us the correct logic
Contributor
Author
There was a problem hiding this comment.
re: comparison, in the previous version a JID was getting compared to a string, which is probably not what was intended.
re: logic - I'll come up with another test.
…ver-java into issues/247 Conflicts: src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/AffiliationsGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/NodeConfigureGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/NodeThreadsGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/RepliesGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/SubscriptionsGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/ThreadGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/UserItemsGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/items/NodeItemsGet.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/AffiliationEvent.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/ItemDelete.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/NodeCreate.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/NodeDelete.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/SubscriptionEvent.java src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/search/SearchSet.java src/test/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/SubscriptionsGetTest.java src/test/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/PublishTest.java
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Findbugs reporting now integrated and build failing on high priority issues. All of the high priority issues that have been reported have been removed, and a couple of additional tests added. Lots of minor style/convention issues (equals method, string constants, literal booleans in conditionals and other bits and pieces). It probably went further than I wanted it to.