changeset 3843:28bedf6eba87

Merge
author alanb
date Fri, 04 Mar 2011 21:28:35 +0000
parents 7b6ad3027f3d 90b7926884a8
children 339342f311cc
files
diffstat 5 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Mar 04 21:26:50 2011 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Mar 04 21:28:35 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1011,7 +1011,7 @@
         return -1;
     }
 
-    Comparator<Entry> entryOutputOrder = new Comparator<>() {
+    Comparator<Entry> entryOutputOrder = new Comparator<Entry>() {
         public int compare(Entry  e0, Entry e1) {
             int k0 = getOutputIndex(e0);
             int k1 = getOutputIndex(e1);
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Mar 04 21:26:50 2011 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Mar 04 21:28:35 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -785,7 +785,7 @@
             defMap.entrySet().toArray(layoutsAndCounts);
             // Sort by count, most frequent first.
             // Predefs. participate in this sort, though it does not matter.
-            Arrays.sort(layoutsAndCounts, new Comparator<>() {
+            Arrays.sort(layoutsAndCounts, new Comparator<Object>() {
                 public int compare(Object o0, Object o1) {
                     Map.Entry e0 = (Map.Entry) o0;
                     Map.Entry e1 = (Map.Entry) o1;
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipDirectoryStream.java	Fri Mar 04 21:26:50 2011 +0000
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipDirectoryStream.java	Fri Mar 04 21:28:35 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -76,7 +76,7 @@
         } catch (IOException e) {
             throw new IllegalStateException(e);
         }
-        return new Iterator<>() {
+        return new Iterator<Path>() {
             private Path next;
             @Override
             public boolean hasNext() {
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Fri Mar 04 21:26:50 2011 +0000
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Fri Mar 04 21:28:35 2011 +0000
@@ -112,11 +112,8 @@
         }
         // sm and existence check
         zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.READ);
-        try {
-            zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.WRITE);
-        } catch (AccessDeniedException x) {
+        if (!Files.isWritable(zfpath))
             this.readOnly = true;
-        }
         this.zc = ZipCoder.get(nameEncoding);
         this.defaultdir = new ZipPath(this, getBytes(defaultDir));
         this.ch = Files.newByteChannel(zfpath, READ);
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java	Fri Mar 04 21:26:50 2011 +0000
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java	Fri Mar 04 21:28:35 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -590,7 +590,7 @@
 
     @Override
     public Iterator<Path> iterator() {
-        return new Iterator<>() {
+        return new Iterator<Path>() {
             private int i = 0;
 
             @Override