Fixed many warnings
This commit is contained in:
parent
c570847f3a
commit
ccecc067b2
160 changed files with 951 additions and 1151 deletions
|
|
@ -7,8 +7,7 @@ import java.io.IOException;
|
|||
import java.util.Iterator;
|
||||
|
||||
import static junit.framework.TestCase.assertFalse;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* JUnit test for MultipartParser class
|
||||
|
|
@ -41,8 +40,8 @@ public class MultipartParserTest {
|
|||
assertEquals("bar", stringField.getValue());
|
||||
|
||||
assertFalse(it.hasNext());
|
||||
assertEquals(null, it.next());
|
||||
assertEquals(null, it.next());
|
||||
assertNull(it.next());
|
||||
assertNull(it.next());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class HttpDigestAuthPageTest {
|
|||
HttpHeader rspHeader = HttpTestUtil.makeRequest(page);
|
||||
|
||||
assertEquals(401, rspHeader.getHTTPCode());
|
||||
assertTrue(rspHeader.getHeader("WWW-Authenticate") != null);
|
||||
assertNotNull(rspHeader.getHeader("WWW-Authenticate"));
|
||||
assertEquals("Digest", parseAuthType(rspHeader));
|
||||
Map<String,String> authHeader = parseAuthHeader(rspHeader);
|
||||
assertTrue(authHeader.containsKey("realm"));
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class HttpGuessTheNumber implements HttpPage {
|
|||
private static final String COOKIE_KEY_HIGH = "high";
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException{
|
||||
public static void main(String[] args) {
|
||||
LogUtil.setGlobalLevel(Level.ALL);
|
||||
LogUtil.setGlobalFormatter(new CompactLogFormatter());
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import java.security.NoSuchAlgorithmException;
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
public class NetworkClientTest {
|
||||
public static void main(String[] args) throws NoSuchAlgorithmException, InterruptedException {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
try {
|
||||
//LogUtil.setGlobalLevel(Level.ALL);
|
||||
LogUtil.setGlobalFormatter(new CompactLogFormatter());
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import java.security.NoSuchAlgorithmException;
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
public class NetworkServerTest {
|
||||
public static void main(String[] args) throws NoSuchAlgorithmException, InterruptedException {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
try {
|
||||
//LogUtil.setGlobalLevel(Level.ALL);
|
||||
LogUtil.setGlobalFormatter(new CompactLogFormatter());
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import java.util.logging.Level;
|
|||
/**
|
||||
* Sends a test email with SmtpClient class.
|
||||
*
|
||||
* @See <a href="https://nilhcem.github.io/FakeSMTP/">Fake SMTP Server</a>
|
||||
* @see <a href="https://nilhcem.github.io/FakeSMTP/">Fake SMTP Server</a>
|
||||
*/
|
||||
public class SmtpClientTest {
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import java.util.logging.Level;
|
|||
// TODO: COnvert to JUnit
|
||||
public class SOAPClientTest {
|
||||
|
||||
public static void main(String[] args) throws InstantiationException, IllegalAccessException, MalformedURLException {
|
||||
public static void main(String[] args) throws MalformedURLException {
|
||||
LogUtil.setGlobalLevel(Level.ALL);
|
||||
LogUtil.setFormatter("", new CompactLogFormatter());
|
||||
|
||||
|
|
@ -47,9 +47,9 @@ public class SOAPClientTest {
|
|||
|
||||
|
||||
public interface TestClient extends WSInterface{
|
||||
public void m();
|
||||
void m();
|
||||
|
||||
public void c();
|
||||
void c();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public class SOAPTest {
|
|||
@WSReturnName("stringArray")
|
||||
@WSParamDocumentation("Documentation of stringArrayMethod()")
|
||||
public String[][] stringArrayMethod (
|
||||
@WSParamName("StringName") String str) throws Exception{
|
||||
@WSParamName("StringName") String str) {
|
||||
System.out.println("Executing method: stringArrayMethod(String str='"+str+"')");
|
||||
return new String[][]{{"test","test2"},{"test3","test4"}};
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ public class SOAPTest {
|
|||
@WSReturnName("specialReturnClass")
|
||||
@WSParamDocumentation("Documentation of specialReturnMethod()")
|
||||
public SpecialReturnClass[] specialReturnMethod (
|
||||
@WSParamName("StringName2") String str) throws Exception{
|
||||
@WSParamName("StringName2") String str) {
|
||||
System.out.println("Executing method: specialReturnMethod(String str='"+str+"')");
|
||||
return new SpecialReturnClass[]{new SpecialReturnClass(), new SpecialReturnClass()};
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ public class SOAPTest {
|
|||
@WSReturnName("SimpleReturnClass")
|
||||
@WSParamDocumentation("null is the kala")
|
||||
public SimpleReturnClass simpleReturnClassMethod (
|
||||
@WSParamName("byte") String lol) throws Exception{
|
||||
@WSParamName("byte") String lol) {
|
||||
System.out.println("Executing method: simpleReturnClassMethod()");
|
||||
SimpleReturnClass tmp = new SimpleReturnClass();
|
||||
tmp.param1 = "newParam1";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue