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

Lint fixes: Remove dead code, etc.

- make method static when possible
- remove never thrown Exception declarations
- other fixes
This commit is contained in:
Florian Schmaus 2015-03-24 18:33:47 +01:00
parent 83b84c5bd3
commit c6594aec2f
18 changed files with 48 additions and 65 deletions

View file

@ -30,15 +30,13 @@ import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
import javax.xml.parsers.ParserConfigurationException;
/**
*
*/
public class MessageTest {
@Test
public void setMessageTypeTest() throws IOException, SAXException, ParserConfigurationException {
public void setMessageTypeTest() throws IOException, SAXException {
Message.Type type = Message.Type.chat;
Message.Type type2 = Message.Type.headline;
@ -76,7 +74,7 @@ public class MessageTest {
}
@Test
public void setMessageSubjectTest() throws IOException, SAXException, ParserConfigurationException {
public void setMessageSubjectTest() throws IOException, SAXException {
final String messageSubject = "This is a test of the emergency broadcast system.";
StringBuilder controlBuilder = new StringBuilder();
@ -95,7 +93,7 @@ public class MessageTest {
}
@Test
public void oneMessageBodyTest() throws IOException, SAXException, ParserConfigurationException {
public void oneMessageBodyTest() throws IOException, SAXException {
final String messageBody = "This is a test of the emergency broadcast system.";
StringBuilder controlBuilder = new StringBuilder();
@ -114,7 +112,7 @@ public class MessageTest {
}
@Test
public void multipleMessageBodiesTest() throws IOException, SAXException, ParserConfigurationException {
public void multipleMessageBodiesTest() throws IOException, SAXException {
final String messageBody1 = "This is a test of the emergency broadcast system, 1.";
final String lang2 = "ru";
final String messageBody2 = "This is a test of the emergency broadcast system, 2.";
@ -172,7 +170,7 @@ public class MessageTest {
}
@Test
public void setMessageThreadTest() throws IOException, SAXException, ParserConfigurationException {
public void setMessageThreadTest() throws IOException, SAXException {
final String messageThread = "1234";
StringBuilder controlBuilder = new StringBuilder();
@ -191,7 +189,7 @@ public class MessageTest {
}
@Test
public void messageXmlLangTest() throws IOException, SAXException, ParserConfigurationException {
public void messageXmlLangTest() throws IOException, SAXException {
final String lang = "sp";
StringBuilder controlBuilder = new StringBuilder();

View file

@ -27,14 +27,12 @@ import org.xml.sax.SAXException;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
/**
*
*/
public class PresenceTest {
@Test
public void setPresenceTypeTest() throws IOException, SAXException, ParserConfigurationException {
public void setPresenceTypeTest() throws IOException, SAXException {
Presence.Type type = Presence.Type.unavailable;
Presence.Type type2 = Presence.Type.subscribe;
@ -81,7 +79,7 @@ public class PresenceTest {
}
@Test
public void setPresenceStatusTest() throws IOException, SAXException, ParserConfigurationException {
public void setPresenceStatusTest() throws IOException, SAXException {
final String status = "This is a test of the emergency broadcast system.";
StringBuilder controlBuilder = new StringBuilder();
@ -100,7 +98,7 @@ public class PresenceTest {
}
@Test
public void setPresencePriorityTest() throws IOException, SAXException, ParserConfigurationException {
public void setPresencePriorityTest() throws IOException, SAXException {
final int priority = 10;
StringBuilder controlBuilder = new StringBuilder();
@ -124,7 +122,7 @@ public class PresenceTest {
}
@Test
public void setPresenceModeTest() throws IOException, SAXException, ParserConfigurationException {
public void setPresenceModeTest() throws IOException, SAXException {
Presence.Mode mode1 = Presence.Mode.dnd;
final int priority = 10;
final String status = "This is a test of the emergency broadcast system.";
@ -175,7 +173,7 @@ public class PresenceTest {
}
@Test
public void presenceXmlLangTest() throws IOException, SAXException, ParserConfigurationException {
public void presenceXmlLangTest() throws IOException, SAXException {
final String lang = "sp";
StringBuilder controlBuilder = new StringBuilder();