001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.apache.hadoop.hbase; 019 020import java.io.FileDescriptor; 021import java.net.InetAddress; 022import java.security.Permission; 023 024/* 025* A security manager for policing tests. 026* Note: some tests will override the security manager to use there own 027* TODO: Look at still using this in those tests 028* */ 029public class TestSecurityManager extends SecurityManager { 030 @Override 031 public void checkExit(int status) { 032 throw new SystemExitRule.SystemExitInTestException(); 033 } 034 035 @Override 036 public void checkPermission(Permission permission) { 037 038 } 039 040 @Override 041 public void checkPermission(Permission var1, Object var2) { 042 043 } 044 045 @Override 046 public void checkSecurityAccess(String var1) { 047 048 } 049 050 @Override 051 public void checkConnect(String var1, int var2, Object var3) { 052 053 } 054 055 @Override 056 public void checkWrite(String var1) { 057 058 } 059 060 @Override 061 public void checkDelete(String var1) { 062 063 } 064 065 @Override 066 public void checkConnect(String var1, int var2) { 067 068 } 069 070 @Override 071 public void checkLink(String var1) { 072 073 } 074 075 @Override 076 public void checkRead(FileDescriptor var1) { 077 078 } 079 080 @Override 081 public void checkAccess(Thread var1) { 082 083 } 084 085 @Override 086 public void checkAccess(ThreadGroup var1) { 087 088 } 089 090 @Override 091 public void checkCreateClassLoader() { 092 093 } 094 095 @Override 096 public void checkListen(int var1) { 097 098 } 099 100 @Override 101 public void checkAccept(String var1, int var2) { 102 103 } 104 105 @Override 106 public void checkMulticast(InetAddress var1) { 107 108 } 109 110 @Override 111 public void checkMulticast(InetAddress var1, byte var2) { 112 113 } 114 115 @Override 116 public void checkPropertiesAccess() { 117 118 } 119 120 @Override 121 public void checkPropertyAccess(String var1) { 122 123 } 124 125 @Override 126 public void checkPackageAccess(String var1) { 127 128 } 129 130 @Override 131 public void checkPackageDefinition(String var1) { 132 133 } 134 135 @Override 136 public void checkSetFactory() { 137 138 } 139 140}