mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-14 00:00:20 +01:00
fix some unchecked warnings
This commit is contained in:
@@ -45,28 +45,32 @@ public interface ExtensionProcessor
|
||||
{
|
||||
|
||||
/**
|
||||
* Return extensions
|
||||
* Collect extension classes by extension point.
|
||||
*
|
||||
*
|
||||
* @param extensionPoint
|
||||
* @return
|
||||
* @param <T> type of extension
|
||||
* @param extensionPoint extension point
|
||||
*
|
||||
* @return extensions
|
||||
*/
|
||||
public Iterable<Class> byExtensionPoint(Class extensionPoint);
|
||||
public <T> Iterable<Class<T>> byExtensionPoint(Class<T> extensionPoint);
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns single extension by its extension point.
|
||||
*
|
||||
*
|
||||
* @param extensionPoint
|
||||
* @return
|
||||
* @param <T> type of extension
|
||||
* @param extensionPoint extension point
|
||||
*
|
||||
* @return extension
|
||||
*/
|
||||
public Class oneByExtensionPoint(Class extensionPoint);
|
||||
public <T> Class<T> oneByExtensionPoint(Class<T> extensionPoint);
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Process auto bind extensions.
|
||||
*
|
||||
*
|
||||
* @param binder
|
||||
* @param binder injection binder
|
||||
*/
|
||||
public void processAutoBindExtensions(Binder binder);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ public class PrioritiesTest
|
||||
@Test
|
||||
public void testGetPriority()
|
||||
{
|
||||
assertEquals(Priorities.POST_AUTHENTICATION, Priorities.getPriority(A.class));
|
||||
assertEquals(Priorities.POST_AUTHENTICATION,
|
||||
Priorities.getPriority(A.class));
|
||||
assertEquals(Priorities.DEFAULT, Priorities.getPriority(D.class));
|
||||
}
|
||||
|
||||
@@ -78,6 +79,7 @@ public class PrioritiesTest
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testSort()
|
||||
{
|
||||
List<Class<?>> cls = ImmutableList.of(A.class, B.class, C.class, D.class);
|
||||
@@ -93,7 +95,7 @@ public class PrioritiesTest
|
||||
*
|
||||
*
|
||||
* @version Enter version here..., 14/12/20
|
||||
* @author Enter your name here...
|
||||
* @author Enter your name here...
|
||||
*/
|
||||
@Priority(Priorities.POST_AUTHENTICATION)
|
||||
public static class A {}
|
||||
@@ -104,7 +106,7 @@ public class PrioritiesTest
|
||||
*
|
||||
*
|
||||
* @version Enter version here..., 14/12/20
|
||||
* @author Enter your name here...
|
||||
* @author Enter your name here...
|
||||
*/
|
||||
@Priority(Priorities.PRE_AUTHENTICATION)
|
||||
public static class B {}
|
||||
@@ -115,7 +117,7 @@ public class PrioritiesTest
|
||||
*
|
||||
*
|
||||
* @version Enter version here..., 14/12/20
|
||||
* @author Enter your name here...
|
||||
* @author Enter your name here...
|
||||
*/
|
||||
@Priority(Priorities.AUTHENTICATION)
|
||||
public static class C {}
|
||||
@@ -126,7 +128,7 @@ public class PrioritiesTest
|
||||
*
|
||||
*
|
||||
* @version Enter version here..., 14/12/20
|
||||
* @author Enter your name here...
|
||||
* @author Enter your name here...
|
||||
*/
|
||||
public static class D {}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.slf4j.LoggerFactory;
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class DefaultExtensionProcessor implements ExtensionProcessor
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user