mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-15 15:31:08 +01:00
Fix minor codestyle issues
This commit is contained in:
parent
200f90ffdc
commit
cb18056613
422 changed files with 1404 additions and 1444 deletions
|
|
@ -36,13 +36,13 @@ public interface PrivacyListListener {
|
|||
* @param listName the name of the new or updated privacy list.
|
||||
* @param listItem the PrivacyItems that rules the list.
|
||||
*/
|
||||
public void setPrivacyList(String listName, List<PrivacyItem> listItem);
|
||||
void setPrivacyList(String listName, List<PrivacyItem> listItem);
|
||||
|
||||
/**
|
||||
* A privacy list has been modified by another. It gets notified.
|
||||
*
|
||||
* @param listName the name of the updated privacy list.
|
||||
*/
|
||||
public void updatedPrivacyList(String listName);
|
||||
void updatedPrivacyList(String listName);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ public final class PrivacyListManager extends Manager {
|
|||
private static final StanzaFilter PRIVACY_RESULT = new AndFilter(IQTypeFilter.RESULT, PRIVACY_FILTER);
|
||||
|
||||
// Keep the list of instances of this class.
|
||||
private static final Map<XMPPConnection, PrivacyListManager> INSTANCES = new WeakHashMap<XMPPConnection, PrivacyListManager>();
|
||||
private static final Map<XMPPConnection, PrivacyListManager> INSTANCES = new WeakHashMap<>();
|
||||
|
||||
private final Set<PrivacyListListener> listeners = new CopyOnWriteArraySet<PrivacyListListener>();
|
||||
private final Set<PrivacyListListener> listeners = new CopyOnWriteArraySet<>();
|
||||
|
||||
static {
|
||||
// Create a new PrivacyListManager on every established connection.
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class Privacy extends IQ {
|
|||
private String defaultName;
|
||||
/** itemLists holds the set of privacy items classified in lists. It is a map where the
|
||||
* key is the name of the list and the value a collection with privacy items. **/
|
||||
private Map<String, List<PrivacyItem>> itemLists = new HashMap<String, List<PrivacyItem>>();
|
||||
private final Map<String, List<PrivacyItem>> itemLists = new HashMap<>();
|
||||
|
||||
public Privacy() {
|
||||
super(ELEMENT, NAMESPACE);
|
||||
|
|
@ -271,7 +271,7 @@ public class Privacy extends IQ {
|
|||
public boolean isDeclineActiveList() {
|
||||
return declineActiveList;
|
||||
}
|
||||
// CHECKSYTLE:ON
|
||||
// CHECKSTYLE:ON
|
||||
|
||||
/**
|
||||
* Sets whether the receiver allows or declines the use of an active list.
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ public class PrivacyItem {
|
|||
/**
|
||||
* Type defines if the rule is based on JIDs, roster groups or presence subscription types.
|
||||
*/
|
||||
public static enum Type {
|
||||
public enum Type {
|
||||
/**
|
||||
* JID being analyzed should belong to a roster group of the list's owner.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class PrivacyProvider extends IQProvider<Privacy> {
|
|||
private static void parseList(XmlPullParser parser, Privacy privacy) throws XmlPullParserException, IOException, SmackException {
|
||||
boolean done = false;
|
||||
String listName = parser.getAttributeValue("", "name");
|
||||
ArrayList<PrivacyItem> items = new ArrayList<PrivacyItem>();
|
||||
ArrayList<PrivacyItem> items = new ArrayList<>();
|
||||
while (!done) {
|
||||
int eventType = parser.next();
|
||||
if (eventType == XmlPullParser.START_TAG) {
|
||||
|
|
@ -128,7 +128,7 @@ public class PrivacyProvider extends IQProvider<Privacy> {
|
|||
allow = false;
|
||||
break;
|
||||
default:
|
||||
throw new SmackException("Unkown action value '" + actionValue + "'");
|
||||
throw new SmackException("Unknown action value '" + actionValue + "'");
|
||||
}
|
||||
|
||||
PrivacyItem item;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue