1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 01:29:38 +02:00

Enable trailing whitespace checkstyle check

for all source code regions, including javadoc.
This commit is contained in:
Florian Schmaus 2018-05-09 23:06:12 +02:00
parent 9d61a6de7d
commit e8923b9d16
545 changed files with 3713 additions and 3715 deletions

View file

@ -38,16 +38,16 @@ import org.jxmpp.stringprep.XmppStringprepException;
/**
* A dummy implementation of {@link XMPPConnection}, intended to be used during
* unit tests.
*
*
* Instances store any packets that are delivered to be send using the
* {@link #sendStanza(Stanza)} method in a blocking queue. The content of this queue
* can be inspected using {@link #getSentPacket()}. Typically these queues are
* used to retrieve a message that was generated by the client.
*
*
* Packets that should be processed by the client to simulate a received stanza
* can be delivered using the {@linkplain #processStanza(Stanza)} method.
* It invokes the registered stanza interceptors and listeners.
*
*
* @see XMPPConnection
* @author Guenther Niess
*/
@ -130,7 +130,7 @@ public class DummyConnection extends AbstractXMPPConnection {
/**
* Returns the number of packets that's sent through {@link #sendStanza(Stanza)} and
* that has not been returned by {@link #getSentPacket()}.
*
*
* @return the number of packets which are in the queue.
*/
public int getNumberOfSentPackets() {
@ -140,7 +140,7 @@ public class DummyConnection extends AbstractXMPPConnection {
/**
* Returns the first stanza that's sent through {@link #sendStanza(Stanza)}
* and that has not been returned by earlier calls to this method.
*
*
* @return a sent packet.
*/
public <P extends TopLevelStreamElement> P getSentPacket() {
@ -152,7 +152,7 @@ public class DummyConnection extends AbstractXMPPConnection {
* and that has not been returned by earlier calls to this method. This
* method will block for up to the specified number of seconds if no packets
* have been sent yet.
*
*
* @return a sent packet.
*/
@SuppressWarnings("unchecked")

View file

@ -142,7 +142,7 @@ public class StanzaCollectorTest {
consumer1.interrupt();
} catch (InterruptedException e) {
}
// We cannot guarantee that this is going to pass due to the possible issue of timing between consumer 1
// We cannot guarantee that this is going to pass due to the possible issue of timing between consumer 1
// and main, but the probability is extremely remote.
assertNull(collector.pollResult());
}

View file

@ -68,7 +68,7 @@ public class ThreadedDummyConnection extends DummyConnection {
/**
* Calling this method will cause the next sendStanza call with an IQ stanza to timeout.
* This is accomplished by simply stopping the auto creating of the reply stanza
* This is accomplished by simply stopping the auto creating of the reply stanza
* or processing one that was entered via {@link #processStanza(Stanza)}.
*/
public void setTimeout() {

View file

@ -27,7 +27,7 @@ import org.jxmpp.stringprep.XmppStringprepException;
/**
* Tests that verifies the correct behavior of creating result and error IQ packets.
*
*
* @see <a href="http://xmpp.org/rfcs/rfc3920.html#stanzas-semantics-iq">IQ Semantics</a>
* @author Guenther Niess
*/
@ -38,7 +38,7 @@ public class IQResponseTest {
/**
* Test creating a simple and empty IQ response.
* @throws XmppStringprepException
* @throws XmppStringprepException
*/
@Test
public void testGeneratingSimpleResponse() throws XmppStringprepException {
@ -58,7 +58,7 @@ public class IQResponseTest {
/**
* Test creating a error response based on an IQ request.
* @throws XmppStringprepException
* @throws XmppStringprepException
*/
@Test
public void testGeneratingValidErrorResponse() throws XmppStringprepException {
@ -83,7 +83,7 @@ public class IQResponseTest {
/**
* According to <a href="http://xmpp.org/rfcs/rfc3920.html#stanzas-semantics-iq"
* >RFC3920: IQ Semantics</a> we shouldn't respond to an IQ of type result.
* @throws XmppStringprepException
* @throws XmppStringprepException
*/
@Test
public void testGeneratingResponseBasedOnResult() throws XmppStringprepException {
@ -106,7 +106,7 @@ public class IQResponseTest {
/**
* According to <a href="http://xmpp.org/rfcs/rfc3920.html#stanzas-semantics-iq"
* >RFC3920: IQ Semantics</a> we shouldn't respond to an IQ of type error.
* @throws XmppStringprepException
* @throws XmppStringprepException
*/
@Test
public void testGeneratingErrorBasedOnError() throws XmppStringprepException {

View file

@ -1,35 +1,35 @@
/**
*
* Copyright © 2017 Ingo Bauersachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smack.packet;
import static org.jivesoftware.smack.packet.StanzaError.Condition;
import static org.jivesoftware.smack.packet.StanzaError.Type;
import static org.junit.Assert.assertEquals;
import java.util.Map;
import org.junit.Test;
public class XMPPErrorTest {
@Test
public void testConditionHasDefaultTypeMapping() throws NoSuchFieldException, IllegalAccessException {
Map<Condition, Type> conditionToTypeMap = StanzaError.CONDITION_TO_TYPE;
assertEquals("CONDITION_TO_TYPE map is likely out of sync with Condition enum",
Condition.values().length,
conditionToTypeMap.size());
}
}
/**
*
* Copyright © 2017 Ingo Bauersachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smack.packet;
import static org.jivesoftware.smack.packet.StanzaError.Condition;
import static org.jivesoftware.smack.packet.StanzaError.Type;
import static org.junit.Assert.assertEquals;
import java.util.Map;
import org.junit.Test;
public class XMPPErrorTest {
@Test
public void testConditionHasDefaultTypeMapping() throws NoSuchFieldException, IllegalAccessException {
Map<Condition, Type> conditionToTypeMap = StanzaError.CONDITION_TO_TYPE;
assertEquals("CONDITION_TO_TYPE map is likely out of sync with Condition enum",
Condition.values().length,
conditionToTypeMap.size());
}
}

View file

@ -53,7 +53,7 @@ public class ParsingExceptionTest {
@Test
public void consumeUnparsedInput() throws Exception {
final String MESSAGE_EXCEPTION_ELEMENT =
final String MESSAGE_EXCEPTION_ELEMENT =
"<" + ThrowException.ELEMENT + " xmlns='" + ThrowException.NAMESPACE + "'>" +
"<nothingInHere>" +
"</nothingInHere>" +

View file

@ -671,7 +671,7 @@ public class PacketParserUtilsTest {
/**
* RFC6121 5.2.3 explicitly disallows mixed content in <body/> elements. Make sure that we throw
* an exception if we encounter such an element.
*
*
* @throws Exception
*/
@Test(expected = XmlPullParserException.class)