diff -ru CVS/classpath/java/nio/channels/FileLock.java updated/classpath/java/nio/channels/FileLock.java
--- CVS/classpath/java/nio/channels/FileLock.java	2008-05-06 22:49:40.000000000 +0300
+++ updated/classpath/java/nio/channels/FileLock.java	2010-03-24 18:41:40.000000000 +0300
@@ -1,5 +1,5 @@
 /* FileLock.java --
-   Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -59,8 +59,8 @@
   protected FileLock(FileChannel channel, long position, long size,
                      boolean shared)
   {
-    if (position < 0 || size < 0)
-      throw new IllegalArgumentException();
+    if (((position + size) | position | size) < 0)
+      throw new IllegalArgumentException("Negative position or size");
 
     this.channel = channel;
     this.position = position;
diff -ru CVS/classpath/java/security/BasicPermission.java updated/classpath/java/security/BasicPermission.java
--- CVS/classpath/java/security/BasicPermission.java	2006-12-13 23:29:50.000000000 +0300
+++ updated/classpath/java/security/BasicPermission.java	2010-03-24 17:50:20.000000000 +0300
@@ -1,5 +1,5 @@
 /* BasicPermission.java -- implements a simple named permission
-   Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005, 2006, 2010
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -157,8 +157,8 @@
    */
   public boolean equals(Object obj)
   {
-    return getClass().isInstance(obj)
-      && getName().equals(((BasicPermission) obj).getName());
+    return obj == this || (getClass().isInstance(obj)
+             && getName().equals(((BasicPermission) obj).getName()));
   }
 
   /**
diff -ru CVS/classpath/java/security/Security.java updated/classpath/java/security/Security.java
--- CVS/classpath/java/security/Security.java	2010-06-19 15:03:40.000000000 +0400
+++ updated/classpath/java/security/Security.java	2010-06-19 15:04:30.000000000 +0400
@@ -1,5 +1,5 @@
 /* Security.java --- Java base security class implementation
-   Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2010
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -68,8 +68,8 @@
 {
   private static final String ALG_ALIAS = "Alg.Alias.";
 
-  private static Vector providers = new Vector();
-  private static Properties secprops = new Properties();
+  private static final Vector providers = new Vector();
+  private static final Properties secprops = new Properties();
 
   static
     {
