remove deprecations and fixed some compiler warnings

This commit is contained in:
Sebastian Sdorra
2017-01-12 20:02:06 +01:00
parent bad99919f4
commit fc6287fd40
17 changed files with 22 additions and 1588 deletions

View File

@@ -103,6 +103,7 @@ public class DefaultAdvancedHttpResponseTest
* @throws IOException
*/
@Test
@SuppressWarnings("unchecked")
public void testContentAsByteSourceWithFailedRequest() throws IOException
{
ByteArrayInputStream bais =

View File

@@ -103,6 +103,7 @@ public class JsonContentTransformerTest
*
* @throws IOException
*/
@SuppressWarnings("unchecked")
@Test(expected = ContentTransformerException.class)
public void testUnmarshallIOException() throws IOException
{

View File

@@ -63,6 +63,7 @@ public class XmlContentTransformerTest {
assertEquals("test", to.value);
}
@SuppressWarnings("unchecked")
@Test(expected = ContentTransformerException.class)
public void testUnmarshallIOException() throws IOException{
ByteSource bs = mock(ByteSource.class);

View File

@@ -41,7 +41,6 @@ import static org.hamcrest.Matchers.*;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.quartz.CronTrigger;
@@ -77,6 +76,7 @@ public class QuartzSchedulerTest {
* @throws SchedulerException
*/
@Test
@SuppressWarnings("unchecked")
public void testSchedule() throws SchedulerException
{
DummyRunnable dr = new DummyRunnable();
@@ -158,6 +158,7 @@ public class QuartzSchedulerTest {
* @throws SchedulerException
*/
@Test
@SuppressWarnings("unchecked")
public void testInitException() throws SchedulerException
{
when(quartzScheduler.isStarted()).thenThrow(SchedulerException.class);
@@ -200,6 +201,7 @@ public class QuartzSchedulerTest {
* @throws SchedulerException
*/
@Test
@SuppressWarnings("unchecked")
public void testCloseException() throws IOException, SchedulerException
{
when(quartzScheduler.isStarted()).thenThrow(SchedulerException.class);

View File

@@ -78,7 +78,8 @@ public class QuartzTaskTest {
/**
* Tests {@link QuartzTask#cancel()} when the scheduler throws an exception.
* @throws org.quartz.SchedulerException
*/
*/
@SuppressWarnings("unchecked")
@Test(expected = RuntimeException.class)
public void testCancelWithException() throws SchedulerException
{

View File

@@ -36,10 +36,7 @@ import com.github.sdorra.shiro.SubjectAware;
import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.Permission;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.authz.permission.PermissionResolver;
import org.apache.shiro.authz.permission.WildcardPermission;
import org.apache.shiro.subject.SimplePrincipalCollection;
import org.apache.shiro.subject.Subject;
import org.hamcrest.Matchers;
@@ -76,6 +73,7 @@ import sonia.scm.user.UserTestData;
*
* @author Sebastian Sdorra
*/
@SuppressWarnings("unchecked")
@RunWith(MockitoJUnitRunner.class)
public class DefaultAuthorizationCollectorTest {