harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r548271 - /harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/PolicyProvider.java
Date Mon, 18 Jun 2007 09:15:22 GMT
Author: leoli
Date: Mon Jun 18 02:15:21 2007
New Revision: 548271

URL: http://svn.apache.org/viewvc?view=rev&rev=548271
Log:
Add org.apache.harmony.security.provider.PolicyProvider class, which will contains default
harmony implementation for java.security.PolicySpi.

Added:
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/PolicyProvider.java

Added: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/PolicyProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/PolicyProvider.java?view=auto&rev=548271
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/PolicyProvider.java
(added)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/provider/PolicyProvider.java
Mon Jun 18 02:15:21 2007
@@ -0,0 +1,42 @@
+/*
+ *  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.provider;
+
+import java.security.AccessController;
+import java.security.Provider;
+
+import org.apache.harmony.security.internal.nls.Messages;
+
+public class PolicyProvider extends Provider {
+
+	/**
+	 * @serial
+	 */
+	private static final long serialVersionUID = -5406416198792167201L;
+
+	public PolicyProvider() {
+		super("Policy", 1.0, Messages.getString("security.1A6"));  //$NON-NLS-1$//$NON-NLS-2$
+		
+		 AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {
+			public Object run() {
+				put("Policy.JavaPolicy", "org.apache.harmony.security.provider.PolicySpiImpl"); //$NON-NLS-1$
//$NON-NLS-2$
+				return null;
+			}
+		});
+	}
+}



Mime
View raw message