summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-19 07:28:11 (EDT)
committerCarsten Drossel2008-08-19 07:28:11 (EDT)
commit3f7e3f04b9da708153e11d77e860b8bac7aaeb6c (patch)
treeac4aa82e05ca85a496c13851f84a33ed1d98a593
parent6122fb87bff6f3a94a69aec9432f348c699ec741 (diff)
downloadorg.eclipse.riena-3f7e3f04b9da708153e11d77e860b8bac7aaeb6c.zip
org.eclipse.riena-3f7e3f04b9da708153e11d77e860b8bac7aaeb6c.tar.gz
org.eclipse.riena-3f7e3f04b9da708153e11d77e860b8bac7aaeb6c.tar.bz2
handled compiler & check-style warnings
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/AttachmentClientITest.java3
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/ByteArrayDataSourceTest.java1
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/util/ReflectionUtilsTest.java1
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java1
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/AuthorizationTest.java9
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/TestcasePermission.java2
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authentication/AuthenticationClientITest.java4
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authorization/AuthorizationServiceITest.java4
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/ClientRemoteLoginModule.java12
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/LocalLoginModule.java17
10 files changed, 14 insertions, 40 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/AttachmentClientITest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/AttachmentClientITest.java
index 7d751d2..c589302 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/AttachmentClientITest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/AttachmentClientITest.java
@@ -33,15 +33,12 @@ import org.eclipse.riena.tests.RienaTestCase;
*/
public final class AttachmentClientITest extends RienaTestCase {
- private static final String ATTACHMENTSERVICE = "spirit.examples.itest.attachmentservice";
- private static final String PROXIEDATTACHMENTSERVICE = "spirit.examples.itest.proxied.attachmentservice";
private static final String STRING1 = "das sind testdaten, die wir mal einfach so verschicken um et+das sind "
+ "testdaten, die wir mal einfach so verschicken um et";
private static final String STRING2 = "first+das sind testdaten, die wir mal einfach so verschicken um et+second+"
+ "das sind testdaten, die wir mal einfach so verschicken um et+third+2";
private static final String TESTDATA1 = "das sind testdaten, die wir mal einfach so verschicken um etwas zu testen.";
private static final String TESTDATA2 = "das sind testdaten, die wir mal einfach so verschicken um etwas zu testen. (2.test)";
- private static final String TESTDATA3 = "";
private IAttachmentService attachService;
private IRemoteServiceRegistration regAttachmentService;
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/ByteArrayDataSourceTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/ByteArrayDataSourceTest.java
index 3a5a8ae..d5bc199 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/ByteArrayDataSourceTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/communication/core/attachment/ByteArrayDataSourceTest.java
@@ -26,7 +26,6 @@ public class ByteArrayDataSourceTest extends RienaTestCase {
private IDataSource dataSourceMock;
private MockControl dataSourceControl;
private final static String NAME = "Test";
- private final static String CONTENT_TYPE = "text/plain";
/**
* @see junit.framework.TestCase#setUp()
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/ReflectionUtilsTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/ReflectionUtilsTest.java
index a6306ae..886a141 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/ReflectionUtilsTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/ReflectionUtilsTest.java
@@ -240,6 +240,7 @@ public class ReflectionUtilsTest extends TestCase {
public static class HaeshMaep<K, V> extends HashMap<K, V> {
+ private static final long serialVersionUID = 1L;
protected static boolean created;
/**
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java
index d620d4b..1bd13e5 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java
@@ -22,7 +22,6 @@ import org.eclipse.riena.tests.RienaTestCase;
public class VariableManagerUtilTest extends RienaTestCase {
private static Field fgManager;
- private static final String REF_KEY = "ref";
private static final String WWW_ECLIPSE_ORG = "www.eclipse.org";
static {
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/AuthorizationTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/AuthorizationTest.java
index 527bda0..e6f322f 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/AuthorizationTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/AuthorizationTest.java
@@ -16,18 +16,14 @@ import java.security.PrivilegedAction;
import javax.security.auth.Subject;
import org.eclipse.riena.security.common.authentication.SimplePrincipal;
-import org.eclipse.riena.security.common.authorization.IAuthorizationService;
import org.eclipse.riena.security.common.authorization.RienaPolicy;
import org.eclipse.riena.security.simpleservices.authorizationservice.store.FilePermissionStore;
import org.eclipse.riena.tests.RienaTestCase;
-
-import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
public class AuthorizationTest extends RienaTestCase {
private ServiceRegistration fileStoreReg;
- private ServiceRegistration authorizationServiceReg;
protected void setUp() throws Exception {
super.setUp();
@@ -37,7 +33,9 @@ public class AuthorizationTest extends RienaTestCase {
InputStream inputStream = this.getClass().getResourceAsStream("policy-def-test.xml"); //$NON-NLS-1$
FilePermissionStore store = new FilePermissionStore(inputStream);
fileStoreReg = getContext().registerService(IPermissionStore.class.getName(), store, null);
- ServiceReference ref = getContext().getServiceReference(IAuthorizationService.class.getName());
+ // ServiceReference ref =
+ // getContext().getServiceReference(IAuthorizationService
+ // .class.getName());
// if (ref != null) {
// ref.getBundle().stop();
// }
@@ -62,7 +60,6 @@ public class AuthorizationTest extends RienaTestCase {
public void testWithValidUser() {
Subject subject = new Subject();
subject.getPrincipals().add(new SimplePrincipal("testuser"));
- Object x = System.getSecurityManager().getSecurityContext();
Boolean result = (Boolean) Subject.doAsPrivileged(subject, new PrivilegedAction() {
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/TestcasePermission.java b/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/TestcasePermission.java
index d761bd9..f0f101a 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/TestcasePermission.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/security/authorizationservice/TestcasePermission.java
@@ -17,6 +17,8 @@ import java.security.Permission;
*/
public class TestcasePermission extends Permission {
+ private static final long serialVersionUID = 1L;
+
/**
* @param name
*/
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authentication/AuthenticationClientITest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authentication/AuthenticationClientITest.java
index 1f34256..166b364 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authentication/AuthenticationClientITest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authentication/AuthenticationClientITest.java
@@ -112,8 +112,8 @@ public class AuthenticationClientITest extends RienaTestCase {
PasswordCredential pc = new PasswordCredential("password: ", false);
pc.setPassword("jane".toCharArray());
creds[1] = pc;
- AuthenticationTicket ticket = authenticationService.login("Test", creds);
- throw new RuntimeException("exception expected");
+ authenticationService.login("Test", creds);
+ fail("exception expected");
} catch (AuthenticationFailure e) {
// ok();
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authorization/AuthorizationServiceITest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authorization/AuthorizationServiceITest.java
index 441a9e7..521d24a 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authorization/AuthorizationServiceITest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/authorization/AuthorizationServiceITest.java
@@ -103,8 +103,8 @@ public class AuthorizationServiceITest extends RienaTestCase {
cust.setLastName("Solo");
cust.setFirstName("Han");
cust.setCustomerNumber(1);
- Customer[] foundCustomers = cs.findCustomer(cust);
- assertFalse("findCustomer must not work for testuser2 since it has to authorization", true);
+ cs.findCustomer(cust);
+ fail("findCustomer must not work for testuser2 since it has to authorization");
// assertTrue(foundCustomers != null);
// assertTrue(foundCustomers.length > 0);
// assertTrue(foundCustomers[0].getLastName().equals("Solo"));
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/ClientRemoteLoginModule.java b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/ClientRemoteLoginModule.java
index 74c0219..87d728b 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/ClientRemoteLoginModule.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/ClientRemoteLoginModule.java
@@ -30,13 +30,7 @@ import org.eclipse.riena.security.common.authentication.ClientLogin;
*/
public class ClientRemoteLoginModule implements LoginModule {
- private Subject subject;
private CallbackHandler callbackHandler;
- private Map<String, ?> sharedState;
- private Map<String, ?> options;
-
- // configurable option
- private boolean debug = false;
String username;
String password;
@@ -72,14 +66,8 @@ public class ClientRemoteLoginModule implements LoginModule {
*/
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
Map<String, ?> options) {
- this.subject = subject;
this.callbackHandler = callbackHandler;
- this.sharedState = sharedState;
- this.options = options;
this.clientLogin = new ClientLogin("Test", subject);
-
- // initialize any configured options
- debug = Boolean.valueOf((String) options.get("debug"));
}
/*
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/LocalLoginModule.java b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/LocalLoginModule.java
index d79529f..73e1191 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/LocalLoginModule.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/security/services/itest/module/LocalLoginModule.java
@@ -32,11 +32,6 @@ public class LocalLoginModule implements LoginModule {
private Subject subject;
private CallbackHandler callbackHandler;
- private Map<String, ?> sharedState;
- private Map<String, ?> options;
-
- // configurable option
- private boolean debug = false;
String username;
String password;
@@ -64,19 +59,15 @@ public class LocalLoginModule implements LoginModule {
/*
* (non-Javadoc)
*
- * @see javax.security.auth.spi.LoginModule#initialize(javax.security.auth.Subject,
- * javax.security.auth.callback.CallbackHandler, java.util.Map,
- * java.util.Map)
+ * @see
+ * javax.security.auth.spi.LoginModule#initialize(javax.security.auth.Subject
+ * , javax.security.auth.callback.CallbackHandler, java.util.Map,
+ * java.util.Map)
*/
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
Map<String, ?> options) {
this.subject = subject;
this.callbackHandler = callbackHandler;
- this.sharedState = sharedState;
- this.options = options;
-
- // initialize any configured options
- debug = Boolean.valueOf((String) options.get("debug"));
}
/*