Skip to content

Commit 9373665

Browse files
author
Lloyd Watkin
committed
logger -> LOGGER
1 parent 05f926d commit 9373665

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/main/java/org/buddycloud/channelserver/channel/ValidateEntry.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class ValidateEntry {
3737

3838
public static final String ACTIVITY_VERB_POST = "post";
3939

40-
private static Logger logger = Logger.getLogger(ValidateEntry.class);
40+
private static Logger LOGGER = Logger.getLogger(ValidateEntry.class);
4141

4242
private Element entry;
4343

@@ -88,13 +88,13 @@ public boolean isValid() throws NodeStoreException {
8888
if ((id == null) || (true == id.getText().isEmpty())) {
8989
if (null != id)
9090
id.detach();
91-
logger.debug("ID of the entry was missing. We add a default one to it: 1");
91+
LOGGER.debug("ID of the entry was missing. We add a default one to it: 1");
9292
this.entry.addElement("id").setText("1");
9393
}
9494

9595
Element title = this.entry.element("title");
9696
if (null == title) {
97-
logger.debug("Title of the entry was missing. We add a default one to it: 'Post'.");
97+
LOGGER.debug("Title of the entry was missing. We add a default one to it: 'Post'.");
9898
title = this.entry.addElement("title");
9999
title.setText("Post");
100100
}
@@ -121,14 +121,15 @@ public boolean isValid() throws NodeStoreException {
121121
if (null == updated) {
122122

123123
String updateTime = Conf.formatDate(new Date());
124-
logger.debug("Update of the entry was missing. We add a default one to it: '"
124+
LOGGER.debug("Update of the entry was missing. We add a default one to it: '"
125125
+ updateTime + "'.");
126126
this.entry.addElement("updated").setText(updateTime);
127127
}
128128

129129
this.geoloc = this.entry.element("geoloc");
130130

131131
Element reply = this.entry.element("in-reply-to");
132+
132133
if ((null != reply) && (false == validateInReplyToElement(reply))) {
133134
return false;
134135
}
@@ -238,7 +239,7 @@ private boolean validateInReplyToElement(Element reply) throws NodeStoreExceptio
238239
return false;
239240
}
240241
if (null != nodeItem.getInReplyTo()) {
241-
logger.error("User is attempting to reply to a reply");
242+
LOGGER.error("User is attempting to reply to a reply");
242243
this.errorMessage = MAX_THREAD_DEPTH_EXCEEDED;
243244
return false;
244245
}

src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/set/Publish.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
public class Publish extends PubSubElementProcessorAbstract {
3131

32-
private static final Logger logger = Logger.getLogger(Publish.class);
32+
private static final Logger LOGGER = Logger.getLogger(Publish.class);
3333

3434
public static final String MISSING_ITEM_ELEMENT = "item-required";
3535
public static final String NODE_ID_REQUIRED = "nodeid-required";
@@ -138,7 +138,7 @@ private ValidateEntry getEntryValidator() {
138138

139139
private void sendInvalidEntryResponse()
140140
throws InterruptedException {
141-
logger.info("Entry is not valid: '" + entryContent.getErrorMessage() + "'.");
141+
LOGGER.info("Entry is not valid: '" + entryContent.getErrorMessage() + "'.");
142142
createExtendedErrorReply(PacketError.Type.modify,
143143
PacketError.Condition.bad_request, entryContent.getErrorMessage());
144144
outQueue.put(response);
@@ -248,7 +248,7 @@ private boolean checkNode() throws InterruptedException, NodeStoreException {
248248
PacketError.Condition.bad_request,
249249
PacketError.Type.modify);
250250
response.setError(pe);
251-
logger.error(e);
251+
LOGGER.error(e);
252252
outQueue.put(response);
253253
return false;
254254
}
@@ -283,7 +283,7 @@ private void sendNotifications() throws NodeStoreException,
283283
for (NodeSubscription ns : cur) {
284284
JID to = ns.getUser();
285285
if (ns.getSubscription().equals(Subscriptions.subscribed)) {
286-
logger.debug("Sending post notification to " + to.toBareJID());
286+
LOGGER.debug("Sending post notification to " + to.toBareJID());
287287
msg.setTo(ns.getListener());
288288
outQueue.put(msg.createCopy());
289289
}

0 commit comments

Comments
 (0)