mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
Fix minor codestyle issues
This commit is contained in:
parent
200f90ffdc
commit
cb18056613
422 changed files with 1404 additions and 1444 deletions
|
@ -105,7 +105,7 @@ public class StanzaCollectorTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
Stanza p = null;
|
||||
Stanza p;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ public class StanzaCollectorTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
Stanza p = null;
|
||||
Stanza p;
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
@ -37,8 +37,8 @@ import org.jivesoftware.smack.packet.Stanza;
|
|||
public class ThreadedDummyConnection extends DummyConnection {
|
||||
private static final Logger LOGGER = Logger.getLogger(ThreadedDummyConnection.class.getName());
|
||||
|
||||
private BlockingQueue<IQ> replyQ = new ArrayBlockingQueue<IQ>(1);
|
||||
private BlockingQueue<Stanza> messageQ = new LinkedBlockingQueue<Stanza>(5);
|
||||
private final BlockingQueue<IQ> replyQ = new ArrayBlockingQueue<>(1);
|
||||
private final BlockingQueue<Stanza> messageQ = new LinkedBlockingQueue<>(5);
|
||||
private volatile boolean timeout = false;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -142,7 +142,7 @@ public class MessageTest {
|
|||
XmlUnitUtils.assertSimilar(control, message.toXML());
|
||||
|
||||
Collection<String> languages = message.getBodyLanguages();
|
||||
List<String> controlLanguages = new ArrayList<String>();
|
||||
List<String> controlLanguages = new ArrayList<>();
|
||||
controlLanguages.add(lang2);
|
||||
controlLanguages.add(lang3);
|
||||
controlLanguages.removeAll(languages);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.parsing;
|
||||
|
||||
import static org.jivesoftware.smack.test.util.CharsequenceEquals.equalsCharSequence;
|
||||
import static org.jivesoftware.smack.test.util.CharSequenceEquals.equalsCharSequence;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
import org.jxmpp.jid.EntityBareJid;
|
||||
|
@ -40,7 +39,7 @@ public class DigestMd5SaslTest extends AbstractSaslTest {
|
|||
super(saslMechanism);
|
||||
}
|
||||
|
||||
protected void runTest(boolean useAuthzid) throws NotConnectedException, SmackException, InterruptedException, XmppStringprepException, UnsupportedEncodingException {
|
||||
protected void runTest(boolean useAuthzid) throws SmackException, InterruptedException, XmppStringprepException, UnsupportedEncodingException {
|
||||
EntityBareJid authzid = null;
|
||||
if (useAuthzid) {
|
||||
authzid = JidCreate.entityBareFrom("shazbat@xmpp.org");
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
*
|
||||
* Copyright © 2014 Florian Schmaus
|
||||
*
|
||||
* 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.test.util;
|
||||
|
||||
import org.hamcrest.Description;
|
||||
import org.hamcrest.Factory;
|
||||
import org.hamcrest.Matcher;
|
||||
import org.hamcrest.TypeSafeMatcher;
|
||||
|
||||
public class CharSequenceEquals extends TypeSafeMatcher<CharSequence> {
|
||||
|
||||
private final String charSequenceString;
|
||||
|
||||
public CharSequenceEquals(CharSequence charSequence) {
|
||||
charSequenceString = charSequence.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeTo(Description description) {
|
||||
description.appendText("Does not match CharSequence ").appendValue(charSequenceString);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean matchesSafely(CharSequence item) {
|
||||
String itemString = item.toString();
|
||||
return charSequenceString.equals(itemString);
|
||||
}
|
||||
|
||||
@Factory
|
||||
public static Matcher<CharSequence> equalsCharSequence(CharSequence charSequence) {
|
||||
return new CharSequenceEquals(charSequence);
|
||||
}
|
||||
}
|
|
@ -809,7 +809,7 @@ public class PacketParserUtilsTest {
|
|||
IOException, TransformerException, SAXException {
|
||||
// @formatter:off
|
||||
final String stanza = XMLBuilder.create("outer", "outerNamespace").a("outerAttribute", "outerValue")
|
||||
.element("inner", "innerNamespace").a("innverAttribute", "innerValue")
|
||||
.element("inner", "innerNamespace").a("innerAttribute", "innerValue")
|
||||
.element("innermost")
|
||||
.t("some text")
|
||||
.asString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue