8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 8000354 8000685 8004371 27 * @summary Basic test of storeToXML and loadToXML 28 * @run main LoadAndStoreXML 29 * @run main/othervm -Dsun.util.spi.XmlPropertiesProvider=jdk.internal.util.xml.BasicXmlPropertiesProvider LoadAndStoreXML 30 */ 31 32 import java.io.*; 33 import java.util.*; 34 import java.security.*; 35 import java.nio.file.*; 36 37 public class LoadAndStoreXML { 38 39 /** 40 * Simple policy implementation that grants a set of permissions to 41 * all code sources and protection domains. 42 */ 43 static class SimplePolicy extends Policy { 44 private final Permissions perms; 45 46 public SimplePolicy(Permission...permissions) { 47 perms = new Permissions(); 48 for (Permission permission : permissions) 49 perms.add(permission); | 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 8000354 8000685 8004371 27 * @summary Basic test of storeToXML and loadToXML 28 */ 29 30 import java.io.*; 31 import java.util.*; 32 import java.security.*; 33 import java.nio.file.*; 34 35 public class LoadAndStoreXML { 36 37 /** 38 * Simple policy implementation that grants a set of permissions to 39 * all code sources and protection domains. 40 */ 41 static class SimplePolicy extends Policy { 42 private final Permissions perms; 43 44 public SimplePolicy(Permission...permissions) { 45 perms = new Permissions(); 46 for (Permission permission : permissions) 47 perms.add(permission); |