Merge pull request #18 from eberhardmayer/master2

removed warnings
This commit is contained in:
Holger Hagen 2017-07-05 13:01:31 +02:00 committed by GitHub
commit 29126778ec
5 changed files with 11 additions and 9 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>

View File

@ -154,7 +154,7 @@ public class TaskServiceImplTest {
@Test @Test
public void should_setTheReadFlag_when_taskIsRead() throws TaskNotFoundException { public void should_setTheReadFlag_when_taskIsRead() throws TaskNotFoundException {
Task task = createUnitTestTask("1", "Unit Test Task 1", "1"); createUnitTestTask("1", "Unit Test Task 1", "1");
Task readTask = taskServiceImpl.setTaskRead("1", true); Task readTask = taskServiceImpl.setTaskRead("1", true);
Assert.assertTrue(readTask.isRead()); Assert.assertTrue(readTask.isRead());

View File

@ -96,6 +96,7 @@ public class WorkbasketServiceImplTest {
verify(workbasketMapper).insert(any()); verify(workbasketMapper).insert(any());
} }
@SuppressWarnings("serial")
@Test @Test
public void should_InitializeAndStoreWorkbasket_when_WorkbasketWithDistributionTargetsIsCreated() throws NotAuthorizedException { public void should_InitializeAndStoreWorkbasket_when_WorkbasketWithDistributionTargetsIsCreated() throws NotAuthorizedException {
doNothing().when(workbasketMapper).insert(any()); doNothing().when(workbasketMapper).insert(any());
@ -141,6 +142,7 @@ public class WorkbasketServiceImplTest {
verify(workbasketMapper).update(any()); verify(workbasketMapper).update(any());
} }
@SuppressWarnings("serial")
@Test @Test
public void should_ReturnUpdatedWorkbasket_when_ExistingWorkbasketDistributionTargetIsChanged() public void should_ReturnUpdatedWorkbasket_when_ExistingWorkbasketDistributionTargetIsChanged()
throws NotAuthorizedException { throws NotAuthorizedException {
@ -252,6 +254,7 @@ public class WorkbasketServiceImplTest {
workbasketServiceImpl.checkAuthorization("1", WorkbasketAuthorization.READ); workbasketServiceImpl.checkAuthorization("1", WorkbasketAuthorization.READ);
} }
@SuppressWarnings("serial")
@Test @Test
public void should_Pass_when_OperationIsAuthorized() throws NotAuthorizedException { public void should_Pass_when_OperationIsAuthorized() throws NotAuthorizedException {
when(taskanaEngine.getConfiguration()).thenReturn(taskanaEngineConfiguration); when(taskanaEngine.getConfiguration()).thenReturn(taskanaEngineConfiguration);

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<Configuration status="WARN"> <Configuration status="WARN">
<Appenders> <Appenders>
<Console name="Console" target="SYSTEM_OUT"> <Console name="Console" target="SYSTEM_OUT">

View File

@ -12,10 +12,6 @@ import javax.security.auth.spi.LoginModule;
public class SampleLoginModule implements LoginModule { public class SampleLoginModule implements LoginModule {
private Subject subject;
private String password;
private String username;
public boolean abort() throws LoginException { public boolean abort() throws LoginException {
return true; return true;
} }
@ -26,16 +22,12 @@ public class SampleLoginModule implements LoginModule {
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
Map<String, ?> options) { Map<String, ?> options) {
this.subject = subject;
try { try {
NameCallback nameCallback = new NameCallback("prompt"); NameCallback nameCallback = new NameCallback("prompt");
PasswordCallback passwordCallback = new PasswordCallback("prompt", false); PasswordCallback passwordCallback = new PasswordCallback("prompt", false);
callbackHandler.handle(new Callback[] { nameCallback, passwordCallback }); callbackHandler.handle(new Callback[] { nameCallback, passwordCallback });
this.password = new String(passwordCallback.getPassword());
this.username = nameCallback.getName();
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }