summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-06-03 23:05:59 -0700
committerElliott Hughes <enh@google.com>2011-06-04 00:25:25 -0700
commite26b27faf689c17b7894c78caee32432176349ec (patch)
tree409c5a4dc6771d60faa21b818917ac7d223cdbb3 /support
parent8f1bbe0b6549136be386d75edf70ed4daf8a25b0 (diff)
downloadlibcore-e26b27faf689c17b7894c78caee32432176349ec.zip
libcore-e26b27faf689c17b7894c78caee32432176349ec.tar.gz
libcore-e26b27faf689c17b7894c78caee32432176349ec.tar.bz2
Remove more dead "security theater" cruft.
There's probably still more stuff lying around that isn't useful, but this was all I had time for on this particular Friday afternoon... Change-Id: I69593f6c9ab5534d581c703cc85a9766ba8e40e5
Diffstat (limited to 'support')
-rw-r--r--support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java8
-rw-r--r--support/src/test/java/org/apache/harmony/security/tests/support/MyPermission.java52
-rw-r--r--support/src/test/java/org/apache/harmony/security/tests/support/MyPermissionCollection.java53
3 files changed, 4 insertions, 109 deletions
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
index d0e409a..a0dbcea 100644
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
+++ b/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
@@ -18,12 +18,12 @@
package org.apache.harmony.security.tests.support;
import java.security.BasicPermission;
+import java.security.Permission;
public class MyBasicPermission extends BasicPermission {
+ public MyBasicPermission(String name) { super(""); }
- private static final long serialVersionUID = -4220730623258019258L;
+ @Override public String getActions() { return null; }
- public MyBasicPermission(String name) {
- super(name);
- }
+ @Override public boolean implies(Permission permission) { return true; }
}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyPermission.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyPermission.java
deleted file mode 100644
index b52bea9..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyPermission.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.Permission;
-
-public final class MyPermission extends Permission {
-
- private static final long serialVersionUID = 4208595188308189251L;
-
- public MyPermission(String name) {
- super(name);
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof MyPermission) {
- String name = ((MyPermission) obj).getName();
- if (name == null) {
- return getName() == null;
- }
- return name.equals(getName());
- }
- return false;
- }
-
- public String getActions() {
- return null;
- }
-
- public int hashCode() {
- return 0;
- }
-
- public boolean implies(Permission permission) {
- return false;
- }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyPermissionCollection.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyPermissionCollection.java
deleted file mode 100644
index 360b4f6..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyPermissionCollection.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.Permission;
-import java.security.PermissionCollection;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-public class MyPermissionCollection extends PermissionCollection {
-
- private static final long serialVersionUID = -8462474212761656528L;
-
- public MyPermissionCollection(boolean readOnly) {
- if (readOnly) {
- setReadOnly();
- }
- }
-
- public void add(Permission permission) {}
-
- public Enumeration<Permission> elements() {
-
- return new Enumeration<Permission>() {
- public boolean hasMoreElements() {
- return false;
- }
-
- public Permission nextElement() {
- throw new NoSuchElementException();
- }
- };
- }
-
- public boolean implies(Permission permission) {
- return false;
- }
- }