mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
remove deprecations and fixed some compiler warnings
This commit is contained in:
@@ -103,6 +103,7 @@ public class DefaultAdvancedHttpResponseTest
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testContentAsByteSourceWithFailedRequest() throws IOException
|
||||
{
|
||||
ByteArrayInputStream bais =
|
||||
|
||||
@@ -103,6 +103,7 @@ public class JsonContentTransformerTest
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test(expected = ContentTransformerException.class)
|
||||
public void testUnmarshallIOException() throws IOException
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user