<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.java.classpath.patches">
    <title>gmane.comp.java.classpath.patches</title>
    <link>http://blog.gmane.org/gmane.comp.java.classpath.patches</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13241"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13221"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13220"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13214"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13210"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13206"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13205"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13195"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13192"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13191"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13190"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13189"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13188"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13186"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13185"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13181"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13180"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13185"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13181"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.classpath.patches/13180"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13241">
    <title>FYI: Matcher.usePattern(Pattern) implemented and missing gcj patches pushed</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13241</link>
    <description>&lt;pre&gt;As discussed on the gcj mailing list recently:

http://gcc.gnu.org/ml/java/2012-03/msg00048.html

I've added an implementation of java.util.regex.Matcher.usePattern(Pattern).
It was pretty simple, not more than a five minute job.

ChangeLog:

2012-03-22  Andrew John Hughes  &amp;lt;ahughes&amp;lt; at &amp;gt;redhat.com&amp;gt;

* java/util/regex/Matcher.java:
(usePattern(Pattern)): Implemented.

I've also synced in a number of fixes which were only committed to gcj and not
GNU Classpath that I found during the merge:

http://gcc.gnu.org/ml/java-patches/2012-q1/msg00063.html

2012-01-01  Jakub Jelinek  &amp;lt;jakub&amp;lt; at &amp;gt;redhat.com&amp;gt;

* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.

2007-02-26  Jakub Jelinek  &amp;lt;jakub&amp;lt; at &amp;gt;redhat.com&amp;gt;

* java/util/TimeZone.java (getDefaultDisplayName): Don't
check if TimeZone is instanceof SimpleTimeZone.

2006-09-13  Andrew Haley  &amp;lt;aph&amp;lt; at &amp;gt;redhat.com&amp;gt;

* java/util/PriorityQueue.java: Throw IllegalArgumentException for
capacity &amp;lt; 1.
(Iterator.remove()): Decrement index after removing element.

2007-02-14  Jakub Jelinek  &amp;lt;jakub&amp;lt; at &amp;gt;redhat.com&amp;gt;
Andrew Haley  &amp;lt;aph&amp;lt; at &amp;gt;redhat.com&amp;gt;

* java/util/TimeZone.java (getDateParams): Negate dayOfWeek.

All patches are attached and have been committed.
&lt;/pre&gt;</description>
    <dc:creator>Dr Andrew John Hughes</dc:creator>
    <dc:date>2012-04-03T14:11:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13221">
    <title>[PATCH] Fix java/lang/String.codePoint{At|Before}exception types</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13221</link>
    <description>&lt;pre&gt;OpenJDK throws StringIndexOutOfBoundsException and so should we.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 ChangeLog             |    6 ++++++
 java/lang/String.java |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cce9803..0a867cc 100644
--- a/ChangeLog
+++ b/ChangeLog
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 2012-03-15  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
 
+* java/lang/String.java:
+(codePointAt): Fix exception type.
+(codePointBefore): Fix exception type.
+
+2012-03-15  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
+
 * java/util/Formatter.java:
 (format): Fix NPE errors.
 
diff --git a/java/lang/String.java b/java/lang/String.java
index 45c0daf..eb713ce 100644
--- a/java/lang/String.java
+++ b/java/lang/String.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -705,6 +705,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class String
    */
   public synchronized int codePointAt(int index)
   {
+    if (index &amp;lt; 0 || index &amp;gt;= count)
+      throw new StringIndexOutOfBoundsException(index);
     // Use the CharSequence overload as we get better range checking
     // this way.
     return Character.codePointAt(this, index);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -722,6 +724,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class String
    */
   public synchronized int codePointBefore(int index)
   {
+    if (index &amp;lt; 0 || index &amp;gt;= count)
+      throw new StringIndexOutOfBoundsException(index);
     // Use the CharSequence overload as we get better range checking
     // this way.
     return Character.codePointBefore(this, index);
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-15T20:20:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13220">
    <title>[PATCH] Fix NPE in java/util/Formatter.format() method</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13220</link>
    <description>&lt;pre&gt;This patch fixes NPE for the following Malva test cases:

  assertEquals("false", String.format("%b", (Object[])null));
  assertEquals("null", String.format("%h", (Object[])null));
  assertEquals("null", String.format("%s", (Object[])null));
  assertEquals("null", String.format("%c", (Object[])null));
  assertEquals("null", String.format("%d", (Object[])null));
  assertEquals("null", String.format("%o", (Object[])null));
  assertEquals("null", String.format("%x", (Object[])null));

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 ChangeLog                |    5 +++++
 java/util/Formatter.java |   21 ++++++++++++++++++---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 48af956..cce9803 100644
--- a/ChangeLog
+++ b/ChangeLog
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,3 +1,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+2012-03-15  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
+
+* java/util/Formatter.java:
+(format): Fix NPE errors.
+
 2012-03-12  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
 
 * gnu/java/nio/FileLockImpl.java,
diff --git a/java/util/Formatter.java b/java/util/Formatter.java
index 62f6845..466fab5 100644
--- a/java/util/Formatter.java
+++ b/java/util/Formatter.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -678,6 +678,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class Formatter
                conversion);
     noPrecision(precision);
 
+    if (arg == null)
+      {
+        genericFormat("null", flags, width, precision);
+        return;
+      }
+
     int theChar;
     if (arg instanceof Character)
       theChar = ((Character) arg).charValue();
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -748,6 +754,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class Formatter
                                                   int radix, char conversion)
   {
     assert radix == 8 || radix == 10 || radix == 16;
+
+    if (arg == null)
+      {
+        return new CPStringBuilder("null");
+      }
+
     noPrecision(precision);
 
     // Some error checking.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1353,9 +1365,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class Formatter
                   argumentIndex = previousArgumentIndex;
                 // Argument indices start at 1 but array indices at 0.
                 --argumentIndex;
-                if (argumentIndex &amp;lt; 0 || argumentIndex &amp;gt;= args.length)
-                  throw new MissingFormatArgumentException(format.substring(start, index));
-                argument = args[argumentIndex];
+                if (args != null)
+                  {
+                    if (argumentIndex &amp;lt; 0 || argumentIndex &amp;gt;= args.length)
+                      throw new MissingFormatArgumentException(format.substring(start, index));
+                    argument = args[argumentIndex];
+                  }
               }
 
             switch (conversion)
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-15T19:38:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13214">
    <title>[RFC/PATCH 1/2] Add missing Java 1.5 java/net classes</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13214</link>
    <description>&lt;pre&gt;Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/net/CacheRequest.java        |   52 ++++++++++++++++++++++++
 java/net/CacheResponse.java       |   55 +++++++++++++++++++++++++
 java/net/CookieHandler.java       |   68 +++++++++++++++++++++++++++++++
 java/net/HttpRetryException.java  |   80 +++++++++++++++++++++++++++++++++++++
 java/net/ResponseCache.java       |   69 +++++++++++++++++++++++++++++++
 java/net/SecureCacheResponse.java |   55 +++++++++++++++++++++++++
 6 files changed, 379 insertions(+), 0 deletions(-)
 create mode 100644 java/net/CacheRequest.java
 create mode 100644 java/net/CacheResponse.java
 create mode 100644 java/net/CookieHandler.java
 create mode 100644 java/net/HttpRetryException.java
 create mode 100644 java/net/ResponseCache.java
 create mode 100644 java/net/SecureCacheResponse.java

diff --git a/java/net/CacheRequest.java b/java/net/CacheRequest.java
new file mode 100644
index 0000000..23e0d9e
--- /dev/null
+++ b/java/net/CacheRequest.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,52 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* CacheRequest.java --
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.net;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+
+/**
+ * &amp;lt; at &amp;gt;since 1.5
+ */
+public abstract class CacheRequest
+{
+  public abstract OutputStream getBody() throws IOException;
+
+  public abstract void abort();
+}
diff --git a/java/net/CacheResponse.java b/java/net/CacheResponse.java
new file mode 100644
index 0000000..d4cf95f
--- /dev/null
+++ b/java/net/CacheResponse.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,55 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* CacheResponse.java --
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.net;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * &amp;lt; at &amp;gt;since 1.5
+ */
+public abstract class CacheResponse
+{
+  public abstract InputStream getBody() throws IOException;
+
+  public abstract Map&amp;lt;String, List&amp;lt;String&amp;gt;&amp;gt; getHeaders() throws IOException;
+}
diff --git a/java/net/CookieHandler.java b/java/net/CookieHandler.java
new file mode 100644
index 0000000..c551f5d
--- /dev/null
+++ b/java/net/CookieHandler.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,68 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* CookieHandler.java --
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.net;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * &amp;lt; at &amp;gt;since 1.5
+ */
+public abstract class CookieHandler
+{
+  private static CookieHandler defaultHandler;
+
+  public static CookieHandler getDefault()
+  {
+    return defaultHandler;
+  }
+
+  public static void setDefault(CookieHandler handler)
+  {
+    defaultHandler = handler;
+  }
+
+  public abstract Map&amp;lt;String, List&amp;lt;String&amp;gt;&amp;gt; get(URI uri, Map&amp;lt;String,
+                                                List&amp;lt;String&amp;gt;&amp;gt; requestHeaders)
+    throws IOException;
+
+  public abstract void put(URI uri, Map&amp;lt;String, List&amp;lt;String&amp;gt;&amp;gt; responseHeaders)
+    throws IOException;
+}
diff --git a/java/net/HttpRetryException.java b/java/net/HttpRetryException.java
new file mode 100644
index 0000000..2b51bc5
--- /dev/null
+++ b/java/net/HttpRetryException.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,80 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* HttpRetryException.java --
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.net;
+
+import java.io.IOException;
+
+
+/**
+ * &amp;lt; at &amp;gt;since 1.5
+ */
+public class HttpRetryException
+  extends IOException
+{
+  private final String reason;
+  private final int responseCode;
+  private final String location;
+
+  public HttpRetryException(String reason, int responseCode)
+  {
+    this(reason, responseCode, null);
+  }
+
+  public HttpRetryException(String reason, int responseCode, String location)
+  {
+    this.reason = reason;
+    this.responseCode = responseCode;
+    this.location = location;
+  }
+
+  public int responseCode()
+  {
+    return this.responseCode;
+  }
+
+  public String getReason()
+  {
+    return reason;
+  }
+
+  public String getLocation()
+  {
+    return location;
+  }
+
+}
diff --git a/java/net/ResponseCache.java b/java/net/ResponseCache.java
new file mode 100644
index 0000000..179fa5f
--- /dev/null
+++ b/java/net/ResponseCache.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,69 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* ResponseCache.java --
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.net;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * &amp;lt; at &amp;gt;since 1.5
+ */
+public abstract class ResponseCache
+{
+  private static ResponseCache defaultCache;
+
+  public static ResponseCache getDefault()
+  {
+    return defaultCache;
+  }
+
+  public static void setDefault(ResponseCache cache)
+  {
+    defaultCache = cache;
+  }
+
+  public abstract CacheResponse get(URI uri, String requestMethod,
+                                    Map&amp;lt;String, List&amp;lt;String&amp;gt;&amp;gt; requestHeaders)
+    throws IOException;
+
+  public abstract CacheRequest put(URI uri, URLConnection connection)
+    throws IOException;
+
+}
diff --git a/java/net/SecureCacheResponse.java b/java/net/SecureCacheResponse.java
new file mode 100644
index 0000000..e405484
--- /dev/null
+++ b/java/net/SecureCacheResponse.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,55 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* SecureCacheResponse.java --
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.net;
+
+import java.security.Principal;
+import java.security.cert.Certificate;
+import java.util.List;
+import javax.net.ssl.SSLPeerUnverifiedException;
+
+
+/**
+ * &amp;lt; at &amp;gt;since 1.5
+ */
+public abstract class SecureCacheResponse
+  extends CacheResponse
+{
+  public abstract String getCipherSuite();
+  public abstract List&amp;lt;Certificate&amp;gt; getLocalCertificateChain();
+  public abstract Principal getLocalPrincipal();
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-14T17:32:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13210">
    <title>[RFC/PATCH] Add missing Java 1.5 java/lang/StrictMathmethods</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13210</link>
    <description>&lt;pre&gt;Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/lang/StrictMath.java |   72 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/java/lang/StrictMath.java b/java/lang/StrictMath.java
index 88f5e57..225aaa7 100644
--- a/java/lang/StrictMath.java
+++ b/java/lang/StrictMath.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1317,6 +1317,78 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final strictfp class StrictMath
   }
 
   /**
+   * &amp;lt;p&amp;gt;
+   * Returns the hypotenuse, &amp;lt;code&amp;gt;a&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; + b&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&amp;lt;/code&amp;gt;,
+   * without intermediate overflow or underflow.  The returned result is
+   * within 1 ulp of the exact result.  If one parameter is held constant,
+   * then the result in the other parameter is semi-monotonic.
+   * &amp;lt;/p&amp;gt;
+   * &amp;lt;p&amp;gt;
+   * If either of the arguments is an infinity, then the returned result
+   * is positive infinity.  Otherwise, if either argument is &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt;,
+   * then &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt; is returned.
+   * &amp;lt;/p&amp;gt;
+   *
+   * &amp;lt; at &amp;gt;param a the first parameter.
+   * &amp;lt; at &amp;gt;param b the second parameter.
+   * &amp;lt; at &amp;gt;return the hypotenuse matching the supplied parameters.
+   * &amp;lt; at &amp;gt;since 1.5
+   */
+  public static double hypot(double a, double b)
+  {
+    return VMMath.hypot(a,b);
+  }
+
+  /**
+   * &amp;lt;p&amp;gt;
+   * Returns the base 10 logarithm of the supplied value.  The returned
+   * result is within 1 ulp of the exact result, and the results are
+   * semi-monotonic.
+   * &amp;lt;/p&amp;gt;
+   * &amp;lt;p&amp;gt;
+   * Arguments of either &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt; or less than zero return
+   * &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt;.  An argument of positive infinity returns positive
+   * infinity.  Negative infinity is returned if either positive or negative
+   * zero is supplied.  Where the argument is the result of
+   * &amp;lt;code&amp;gt;10&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; is returned.
+   * &amp;lt;/p&amp;gt;
+   *
+   * &amp;lt; at &amp;gt;param a the numeric argument.
+   * &amp;lt; at &amp;gt;return the base 10 logarithm of &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt;.
+   * &amp;lt; at &amp;gt;since 1.5
+   */
+  public static double log10(double a)
+  {
+    return VMMath.log10(a);
+  }
+
+  /**
+   * &amp;lt;p&amp;gt;
+   * Returns the natural logarithm resulting from the sum of the argument,
+   * &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; and 1.  For values close to 0, the
+   * result of &amp;lt;code&amp;gt;log1p(a)&amp;lt;/code&amp;gt; tend to be much closer to the
+   * exact result than simply &amp;lt;code&amp;gt;log(1.0+a)&amp;lt;/code&amp;gt;.  The returned
+   * result is within 1 ulp of the exact result, and the results are
+   * semi-monotonic.
+   * &amp;lt;/p&amp;gt;
+   * &amp;lt;p&amp;gt;
+   * Arguments of either &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt; or less than -1 return
+   * &amp;lt;code&amp;gt;NaN&amp;lt;/code&amp;gt;.  An argument of positive infinity or zero
+   * returns the original argument.  Negative infinity is returned from an
+   * argument of -1.
+   * &amp;lt;/p&amp;gt;
+   *
+   * &amp;lt; at &amp;gt;param a the numeric argument.
+   * &amp;lt; at &amp;gt;return the natural logarithm of &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; + 1.
+   * &amp;lt; at &amp;gt;since 1.5
+   */
+  public static double log1p(double a)
+  {
+    return VMMath.log1p(a);
+  }
+
+
+  /**
    * Take ln(a) (the natural log).  The opposite of &amp;lt;code&amp;gt;exp()&amp;lt;/code&amp;gt;. If the
    * argument is NaN or negative, the result is NaN; if the argument is
    * positive infinity, the result is positive infinity; and if the argument
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-13T15:31:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13206">
    <title>[RFC/PATCH] Add missing Java 1.6 java/lang/Math.getExponent() methods</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13206</link>
    <description>&lt;pre&gt;While at it, also add missing Java 1.6 java/lang package constants.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/lang/Double.java                              |   17 ++++++-
 java/lang/Float.java                               |   15 ++++++
 java/lang/Math.java                                |   26 ++++++++++
 native/fdlibm/fdlibm.h                             |    1 -
 native/fdlibm/namespace.h                          |    1 -
 native/jni/java-lang/Makefile.am                   |    1 +
 .../jni/java-lang/java_lang_VMDouble_getExponent.c |   50 ++++++++++++++++++++
 native/jni/java-lang/java_lang_VMFloat.c           |   10 ++++
 scripts/math_symbols                               |    1 -
 vm/reference/java/lang/VMDouble.java               |    2 +
 vm/reference/java/lang/VMFloat.java                |    2 +
 11 files changed, 122 insertions(+), 4 deletions(-)
 create mode 100644 native/jni/java-lang/java_lang_VMDouble_getExponent.c

diff --git a/java/lang/Double.java b/java/lang/Double.java
index 3ae1b01..674e9f1 100644
--- a/java/lang/Double.java
+++ b/java/lang/Double.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -96,7 +96,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class Double extends Number implements Comparable&amp;lt;Double&amp;gt;
    */
   public static final int SIZE = 64;
 
- /**
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static final double MIN_NORMAL = 0x1.0p-1022;
+
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static final int MAX_EXPONENT = Math.getExponent(Double.MAX_VALUE);
+
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static final int MIN_EXPONENT = Math.getExponent(Double.MIN_NORMAL);
+
+  /**
    * The primitive type &amp;lt;code&amp;gt;double&amp;lt;/code&amp;gt; is represented by this
    * &amp;lt;code&amp;gt;Class&amp;lt;/code&amp;gt; object.
    * &amp;lt; at &amp;gt;since 1.1
diff --git a/java/lang/Float.java b/java/lang/Float.java
index a4a766e..06525f9 100644
--- a/java/lang/Float.java
+++ b/java/lang/Float.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -104,6 +104,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class Float extends Number implements Comparable&amp;lt;Float&amp;gt;
   public static final int SIZE = 32;
 
   /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static final float MIN_NORMAL = 0x1.0p-126f;
+
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static final int MAX_EXPONENT = Math.getExponent(Float.MAX_VALUE);
+
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static final int MIN_EXPONENT = Math.getExponent(Float.MIN_NORMAL);
+
+  /**
    * Cache representation of 0
    */
   private static final Float ZERO = new Float(0.0f);
diff --git a/java/lang/Math.java b/java/lang/Math.java
index 6cf29b4..8dc911c 100644
--- a/java/lang/Math.java
+++ b/java/lang/Math.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1049,4 +1049,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class Math
       }
     return Float.intBitsToFloat((newExponent &amp;lt;&amp;lt; mantissaBits) | newMantissa);
   }
+
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static int getExponent(float f)
+  {
+    if (Float.isNaN(f) || Float.isInfinite(f))
+      return Float.MAX_EXPONENT + 1;
+    else if (f == 0.0f)
+      return Float.MIN_EXPONENT - 1;
+    else
+      return VMFloat.getExponent(f);
+  }
+
+  /**
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static int getExponent(double d)
+  {
+    if (Double.isNaN(d) || Double.isInfinite(d))
+      return Double.MAX_EXPONENT + 1;
+    else if (d == 0.0)
+      return Double.MIN_EXPONENT - 1;
+    else
+      return VMDouble.getExponent(d);
+  }
 }
diff --git a/native/fdlibm/fdlibm.h b/native/fdlibm/fdlibm.h
index fc10ecc..6883808 100644
--- a/native/fdlibm/fdlibm.h
+++ b/native/fdlibm/fdlibm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -150,7 +150,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern double sinh __P((double));
 extern double tanh __P((double));
 
 extern double exp __P((double));
-extern double frexp __P((double, int *));
 extern double ldexp __P((double, int));
 extern double log __P((double));
 extern double log10 __P((double));
diff --git a/native/fdlibm/namespace.h b/native/fdlibm/namespace.h
index 2e6e52b..c4ee642 100644
--- a/native/fdlibm/namespace.h
+++ b/native/fdlibm/namespace.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -10,7 +10,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define sinh ClasspathMath_sinh
 #define tanh ClasspathMath_tanh
 #define exp ClasspathMath_exp
-#define frexp ClasspathMath_frexp
 #define ldexp ClasspathMath_ldexp
 #define expm1 ClasspathMath_expm1
 #define log ClasspathMath_log
diff --git a/native/jni/java-lang/Makefile.am b/native/jni/java-lang/Makefile.am
index e1bc7ce..b853e72 100644
--- a/native/jni/java-lang/Makefile.am
+++ b/native/jni/java-lang/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3,6 +3,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; nativeexeclib_LTLIBRARIES = libjavalang.la libjavalangreflect.la libjavalangmana
 libjavalang_la_SOURCES = java_lang_VMSystem.c \
  java_lang_VMFloat.c \
  java_lang_VMDouble.c \
+ java_lang_VMDouble_getExponent.c \
  java_lang_VMMath.c \
  java_lang_VMProcess.c
 
diff --git a/native/jni/java-lang/java_lang_VMDouble_getExponent.c b/native/jni/java-lang/java_lang_VMDouble_getExponent.c
new file mode 100644
index 0000000..4f324bc
--- /dev/null
+++ b/native/jni/java-lang/java_lang_VMDouble_getExponent.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,50 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* VMDouble.c - java.lang.VMDouble native functions
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+#include &amp;lt;config.h&amp;gt;
+#include &amp;lt;math.h&amp;gt;
+
+#include "java_lang_VMDouble.h"
+
+JNIEXPORT jint JNICALL
+Java_java_lang_VMDouble_getExponent
+  (JNIEnv *env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jdouble d)
+{
+  return ilogb(d);
+}
diff --git a/native/jni/java-lang/java_lang_VMFloat.c b/native/jni/java-lang/java_lang_VMFloat.c
index acd07ff..bbebe0d 100644
--- a/native/jni/java-lang/java_lang_VMFloat.c
+++ b/native/jni/java-lang/java_lang_VMFloat.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -40,6 +40,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; exception statement from your version. */
 
 #include "java_lang_VMFloat.h"
 
+#include &amp;lt;math.h&amp;gt;
+
 /*
  * Class:     java_lang_VMFloat
  * Method:    floatToRawIntBits
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -69,3 +71,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; Java_java_lang_VMFloat_intBitsToFloat
   u.i = bits;
   return u.f;
 }
+
+JNIEXPORT jint JNICALL
+Java_java_lang_VMFloat_getExponent
+  (JNIEnv *env __attribute__ ((__unused__)),
+   jclass cls __attribute__ ((__unused__)), jfloat f)
+{
+  return ilogbf(f);
+}
diff --git a/scripts/math_symbols b/scripts/math_symbols
index e676a51..6b076a9 100644
--- a/scripts/math_symbols
+++ b/scripts/math_symbols
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -9,7 +9,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cosh
 sinh
 tanh
 exp
-frexp
 ldexp
 expm1
 log
diff --git a/vm/reference/java/lang/VMDouble.java b/vm/reference/java/lang/VMDouble.java
index edfa723..6992f44 100644
--- a/vm/reference/java/lang/VMDouble.java
+++ b/vm/reference/java/lang/VMDouble.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -119,4 +119,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; final class VMDouble
    * &amp;lt; at &amp;gt;throws NullPointerException if str is null
    */
   static native double parseDouble(String str);
+
+  static native int getExponent(double d);
 }
diff --git a/vm/reference/java/lang/VMFloat.java b/vm/reference/java/lang/VMFloat.java
index e6e784f..03843ed 100644
--- a/vm/reference/java/lang/VMFloat.java
+++ b/vm/reference/java/lang/VMFloat.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -117,4 +117,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; final class VMFloat
     // the infinitely precise decimal.
     return (float) Double.parseDouble(str);
   }
+
+  static native int getExponent(float f);
 } // class VMFloat
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-12T21:38:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13205">
    <title>[PATCH] Add missing Java 1.7 AutoCloseable interface</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13205</link>
    <description>&lt;pre&gt;Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 gnu/java/nio/FileLockImpl.java    |    5 +++
 java/beans/XMLDecoder.java        |    1 +
 java/beans/XMLEncoder.java        |    4 ++-
 java/io/Closeable.java            |    1 +
 java/io/ObjectInput.java          |    3 +-
 java/io/ObjectOutput.java         |    3 +-
 java/lang/AutoCloseable.java      |   50 +++++++++++++++++++++++++++++++++++++
 java/nio/channels/FileLock.java   |    1 +
 java/sql/Connection.java          |    1 +
 java/sql/ResultSet.java           |    1 +
 java/sql/Statement.java           |    1 +
 javax/sound/midi/MidiDevice.java  |    1 +
 javax/sound/midi/Receiver.java    |    1 +
 javax/sound/midi/Transmitter.java |    1 +
 javax/sound/sampled/Line.java     |    1 +
 15 files changed, 72 insertions(+), 3 deletions(-)
 create mode 100644 java/lang/AutoCloseable.java

diff --git a/gnu/java/nio/FileLockImpl.java b/gnu/java/nio/FileLockImpl.java
index e714ea3..0c6e468 100644
--- a/gnu/java/nio/FileLockImpl.java
+++ b/gnu/java/nio/FileLockImpl.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -88,6 +88,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class FileLockImpl extends FileLock
     return valid;
   }
 
+  public void close() throws Exception
+  {
+    release();
+  }
+
   /**
    * Releases the lock if it is still valid. Marks this lock as invalid.
    */
diff --git a/java/beans/XMLDecoder.java b/java/beans/XMLDecoder.java
index 2689639..bafafe4 100644
--- a/java/beans/XMLDecoder.java
+++ b/java/beans/XMLDecoder.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -104,6 +104,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import java.util.NoSuchElementException;
  * &amp;lt; at &amp;gt;status updated to 1.5
  */
 public class XMLDecoder
+  implements AutoCloseable
 {
         private Object owner;
 
diff --git a/java/beans/XMLEncoder.java b/java/beans/XMLEncoder.java
index 40cb6db..894e4b8 100644
--- a/java/beans/XMLEncoder.java
+++ b/java/beans/XMLEncoder.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -50,7 +50,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import java.io.OutputStream;
  * &amp;lt; at &amp;gt;author Robert Schuster (robertschuster&amp;lt; at &amp;gt;fsfe.org)
  * &amp;lt; at &amp;gt;since 1.4
  */
-public class XMLEncoder extends Encoder
+public class XMLEncoder
+  extends Encoder
+  implements AutoCloseable
 {
   Object owner;
 
diff --git a/java/io/Closeable.java b/java/io/Closeable.java
index b8523d7..f5f8083 100644
--- a/java/io/Closeable.java
+++ b/java/io/Closeable.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,6 +48,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package java.io;
  * &amp;lt; at &amp;gt;since 1.5
  */
 public interface Closeable
+  extends AutoCloseable
 {
 
   /**
diff --git a/java/io/ObjectInput.java b/java/io/ObjectInput.java
index f8d51e0..071f67d 100644
--- a/java/io/ObjectInput.java
+++ b/java/io/ObjectInput.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,7 +48,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package java.io;
   *
   * &amp;lt; at &amp;gt;see DataInput
   */
-public interface ObjectInput extends DataInput
+public interface ObjectInput
+  extends DataInput, AutoCloseable
 {
   /**
     * This method returns the number of bytes that can be read without
diff --git a/java/io/ObjectOutput.java b/java/io/ObjectOutput.java
index 628f8b9..4ec6c6f 100644
--- a/java/io/ObjectOutput.java
+++ b/java/io/ObjectOutput.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,7 +48,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package java.io;
   *
   * &amp;lt; at &amp;gt;see DataOutput
   */
-public interface ObjectOutput extends DataOutput
+public interface ObjectOutput
+  extends DataOutput, AutoCloseable
 {
   /**
     * This method writes the specified byte to the output stream.
diff --git a/java/lang/AutoCloseable.java b/java/lang/AutoCloseable.java
new file mode 100644
index 0000000..4c1ddaa
--- /dev/null
+++ b/java/lang/AutoCloseable.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,50 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* AutoCloseable.java -- Resource that must be closed after it is no longer
+   used.
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+/**
+ * Resource that must be closed after it is no longer used.
+ *
+ * &amp;lt; at &amp;gt;since 1.7
+ */
+public interface AutoCloseable
+{
+  void close() throws Exception;
+}
diff --git a/java/nio/channels/FileLock.java b/java/nio/channels/FileLock.java
index 78210b3..02b561a 100644
--- a/java/nio/channels/FileLock.java
+++ b/java/nio/channels/FileLock.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import java.io.IOException;
  * &amp;lt; at &amp;gt;since 1.4
  */
 public abstract class FileLock
+  implements AutoCloseable
 {
   private final FileChannel channel;
   private final long position;
diff --git a/java/sql/Connection.java b/java/sql/Connection.java
index f375276..b1e7034 100644
--- a/java/sql/Connection.java
+++ b/java/sql/Connection.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -46,6 +46,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import java.util.Map;
  * &amp;lt; at &amp;gt;author Aaron M. Renn (arenn&amp;lt; at &amp;gt;urbanophile.com)
  */
 public interface Connection
+  extends AutoCloseable
 {
   /**
    * This transaction isolation level indicates that transactions are not
diff --git a/java/sql/ResultSet.java b/java/sql/ResultSet.java
index 3b49a6a..c487bed 100644
--- a/java/sql/ResultSet.java
+++ b/java/sql/ResultSet.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -60,6 +60,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import java.util.Map;
  * &amp;lt; at &amp;gt;author Aaron M. Renn (arenn&amp;lt; at &amp;gt;urbanophile.com)
  */
 public interface ResultSet
+  extends AutoCloseable
 {
   /**
    * The rows will be processed in order from first to last.
diff --git a/java/sql/Statement.java b/java/sql/Statement.java
index 1b57fb3..5f35e7b 100644
--- a/java/sql/Statement.java
+++ b/java/sql/Statement.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -44,6 +44,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package java.sql;
  * &amp;lt; at &amp;gt;author Aaron M. Renn (arenn&amp;lt; at &amp;gt;urbanophile.com)
  */
 public interface Statement
+  extends AutoCloseable
 {
   int CLOSE_CURRENT_RESULT = 1;
   int KEEP_CURRENT_RESULT = 2;
diff --git a/javax/sound/midi/MidiDevice.java b/javax/sound/midi/MidiDevice.java
index 7a0ca7f..7ce22ca 100644
--- a/javax/sound/midi/MidiDevice.java
+++ b/javax/sound/midi/MidiDevice.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -46,6 +46,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package javax.sound.midi;
  *
  */
 public interface MidiDevice
+  extends AutoCloseable
 {
   /**
    * Get the Info object describing this device.
diff --git a/javax/sound/midi/Receiver.java b/javax/sound/midi/Receiver.java
index bc660d0..535c9df 100644
--- a/javax/sound/midi/Receiver.java
+++ b/javax/sound/midi/Receiver.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,6 +47,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package javax.sound.midi;
  *
  */
 public interface Receiver
+  extends AutoCloseable
 {
   /**
    * Send a MIDI message and timestamp.  Some receivers don't support
diff --git a/javax/sound/midi/Transmitter.java b/javax/sound/midi/Transmitter.java
index ab81cc8..2c62795 100644
--- a/javax/sound/midi/Transmitter.java
+++ b/javax/sound/midi/Transmitter.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,6 +47,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package javax.sound.midi;
  *
  */
 public interface Transmitter
+  extends AutoCloseable
 {
   /**
    * Set the Receiver to which MIDI events will be sent.
diff --git a/javax/sound/sampled/Line.java b/javax/sound/sampled/Line.java
index 62d284b..75c7a84 100644
--- a/javax/sound/sampled/Line.java
+++ b/javax/sound/sampled/Line.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -43,6 +43,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; package javax.sound.sampled;
  * &amp;lt; at &amp;gt;since 1.3
  */
 public interface Line
+  extends AutoCloseable
 {
   /**
    * An object of this type holds information about a Line.
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-12T19:21:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13195">
    <title>[RFC/PATCH 1/6] Fixjava/lang/reflect/Member.getDeclaringClass() return type</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13195</link>
    <description>&lt;pre&gt;Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/lang/reflect/Member.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/java/lang/reflect/Member.java b/java/lang/reflect/Member.java
index fed962c..945fbf6 100644
--- a/java/lang/reflect/Member.java
+++ b/java/lang/reflect/Member.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -79,7 +79,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public interface Member
    *
    * &amp;lt; at &amp;gt;return the class that declared this member
    */
-  Class getDeclaringClass();
+  Class&amp;lt;?&amp;gt; getDeclaringClass();
 
   /**
    * Gets the simple name of this member. This will be a valid Java
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-03-12T17:27:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13192">
    <title>FYI: Fix documentation</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13192</link>
    <description>&lt;pre&gt;So I found the problem we were hitting with make distcheck and
the cp-tools documentation.  It turns out that the macro gcctabopt
was only being defined for certain types of output.  A normal build
will run texi2pod, where gcctabopt is defined, but make distcheck
also runs 'make dvi' which in turn leads to building with texi2dvi,
where gcctabopt was not being defined.

When I first found the issue, I did try removing gcctabopt but of
course &amp;lt; at &amp;gt;table does still need an argument so just removing it didn't
fix the issue.  I found that &amp;lt; at &amp;gt;table &amp;lt; at &amp;gt;code did work, so then it was
just a matter of working out why &amp;lt; at &amp;gt;table &amp;lt; at &amp;gt;gcctabopt (which expands
to &amp;lt; at &amp;gt;table &amp;lt; at &amp;gt;code) didn't.

Fixed thusly in the attached patch.

2012-03-07  Andrew John Hughes  &amp;lt;ahughes&amp;lt; at &amp;gt;redhat.com&amp;gt;

* doc/cp-tools.texinfo:
Move macro definition outside of if block
so gcctabopt is always defined.

&lt;/pre&gt;</description>
    <dc:creator>Dr Andrew John Hughes</dc:creator>
    <dc:date>2012-03-08T00:42:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13191">
    <title>FYI: GStreamer -Werror build fix</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13191</link>
    <description>&lt;pre&gt;I've applied the attached simple fix to the GStreamer sources to
remove an unused variable so that it will build with -Werror.

2012-02-15  Andrew John Hughes  &amp;lt;ahughes&amp;lt; at &amp;gt;redhat.com&amp;gt;

* native/jni/gstreamer-peer/gst_classpath_src.c,
(gst_classpath_src_class_init(GstClasspathSrcClass)):
Remove unused gstelement_class.

&lt;/pre&gt;</description>
    <dc:creator>Dr Andrew John Hughes</dc:creator>
    <dc:date>2012-02-22T15:13:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13190">
    <title>Remaining Locale Updates for RH712013</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13190</link>
    <description>&lt;pre&gt;As promised, I've committed the remaining fixes for the locale issues
first discovered in the libgcj Fedora bug, RH712013:

https://bugzilla.redhat.com/show_bug.cgi?id=712013

The following commits finish the job:

1.  https://lists.gnu.org/archive/html/commit-classpath/2012-02/msg00001.html
This alters the cp-tools localegen tool so that it no longer overwrites elements
with the same path within the XML tree.  As an example, in the Welsh locale
(cy.xml in CLDR 1.6.0) there are two paths dates.calendars.calendar.months.monthContext
which are differentiated by the attribute type using the values "format" and "stand-alone".
The default one to use should be "format" but the cp-tools parser has been parsing this
one and then overwriting it with the stand-alone one (which occurs second in the XML file)
as it doesn't check whether there is already a value for that path.  This patch changes
the parser to retain a list of the elements with that path, not just a single one.
The property generator then picks the appropriate one from that list.
2.  https://lists.gnu.org/archive/html/commit-classpath/2012-02/msg00000.html
This patch just updates the locale data in Classpath with the results of using the updated
generator on CLDR 1.6.0.
3.  https://lists.gnu.org/archive/html/commit-classpath/2012-02/msg00005.html
This simple patch just stops the property generator from adding a trailing separator to
ordered list content (months, weekdays, etc.).  There was a FIXME for this in the code already.
4.  https://lists.gnu.org/archive/html/commit-classpath/2012-02/msg00004.html
This is again the corresponding Classpath patch which updates the data and removes the hack
that drops the last character of the input data.

All four patches are attached.
&lt;/pre&gt;</description>
    <dc:creator>Dr Andrew John Hughes</dc:creator>
    <dc:date>2012-02-15T23:12:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13189">
    <title>FYI: Final PR classpath/42390 Fixes</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13189</link>
    <description>&lt;pre&gt;The following two patches I committed fix the remaining issues reported
in PR42390:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42390

1.  https://lists.gnu.org/archive/html/commit-classpath/2012-02/msg00002.html
Add missing security calls in DatagramSocket.connect.
2.  https://lists.gnu.org/archive/html/commit-classpath/2012-02/msg00003.html
Access properties in a privileged block to avoid inappropriate SecurityExceptions being thrown.

ChangeLog:

2012-02-08  Andrew John Hughes  &amp;lt;ahughes&amp;lt; at &amp;gt;redhat.com&amp;gt;

PR classpath/42390
* java/nio/channels/spi/SelectorProvider.java:
(provider()): Retrieve property value using
PrivilegedAction.
* java/security/KeyStore.java:
(getDefaultType()): Likewise.

2012-02-06  Andrew John Hughes  &amp;lt;ahughes&amp;lt; at &amp;gt;redhat.com&amp;gt;

PR classpath/42390
* java/net/DatagramSocket.java:
(connect(InetAddress,int)): Add missing security
checks which OpenJDK performs and we don't.  It's
possible to initialise a DatagramSocket with null
so we should also ensure we are bound.

Patches attached.
&lt;/pre&gt;</description>
    <dc:creator>Dr Andrew John Hughes</dc:creator>
    <dc:date>2012-02-15T23:16:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13188">
    <title>integer fd filedescriptor / mapping special files</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13188</link>
    <description>&lt;pre&gt;Hi list -

I've been using this patch for years to a) allow access to the integer
file descriptor in jni as in [1], and b) to use the FileChannel.map()
method to map special files under linux using jamvm / classpath-0.98
(e.g. /dev/fb0).

Thought I would submit it to the list for inclusion in any new releases.

Feedback from any people wanting to validate is welcome.

If I recall correctly, one shortcoming is that the returned mapped
byte buffer is not 'direct'. Getting a direct map would require some
manipulation of fields in an underlying byte[] somewhere. Obviously, a
direct-mapped byte buffer would be more ideal. I think that requires
using some kind of Unsafe class somewhere, and I stopped at that
point. I don't mind doing the legwork for a direct mapped byte buffer
too, to make it for inclusion in the next release.

C

[1] http://www.kfu.com/~nsayer/Java/jni-filedesc.html
&lt;/pre&gt;</description>
    <dc:creator>Christopher Friedt</dc:creator>
    <dc:date>2012-02-07T15:05:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13186">
    <title>FYI: RH712013: pdftk crashes with java.lang.ArrayIndexOutOfBoundsException</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13186</link>
    <description>&lt;pre&gt;I've just committed what is the first part of a larger fix for:

https://bugzilla.redhat.com/show_bug.cgi?id=712013

As explained in the bug report, this massively reduces the amount of
incorrect locale data (and avoids the exception), but there are still
some errors.  Fixing this requires changing the locale data, which
I'll do in a series of separate patches.


2011-12-12  Andrew John Hughes  &amp;lt;ahughes&amp;lt; at &amp;gt;redhat.com&amp;gt;

RH712013: pdftk crashes with java.lang.ArrayIndexOutOfBoundsException
* java/text/DateFormatSymbols.java:
(getStringArray(List&amp;lt;ResourceBundle&amp;gt;, String, int)):
Calls getStringArray(list,string,int,null).
(getStringArray(List&amp;lt;ResourceBundle&amp;gt;, String, int, String[])):
Populate a String array with locale data.  The data
used is the first non-null non-empty element found
as we traverse the locale hierarchy. May be supplemented
by fallback data.
(DateFormatSymbols(Locale)): Get a list of all bundles up the
locale hierarchy, rather than just using the one specific locale.
Use the improved getStringArray method to populate the arrays,
supplying existing data where "sideways" inheritance takes place.

&lt;/pre&gt;</description>
    <dc:creator>Dr Andrew John Hughes</dc:creator>
    <dc:date>2012-01-12T18:09:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13185">
    <title>[RFC/PATCH v2] Add java/io/Console class andjava/lang/System.console() method</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13185</link>
    <description>&lt;pre&gt;This patch implements java/io/Console and adds a console() method to
java/lang/System. The implementation is lame but it works reasonably well.

2012-01-06  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

* include/Makefile.am:
Add java_io_VMConsole.h.

* java/io/Console:
Add Java 1.6 java/io/Console API.

* java/lang/System.java:
(console): Add Java 1.6 console() API.

* vm/reference/java/io/VMConsole:
Add new class.

* native/jni/java-io/Makefile.am:
Add java_io_VMConsole.c.

* native/jni/java-io/java_io_VMConsole.c:
Add native helpers for java/io/Console.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 include/Makefile.am                    |    3 +
 java/io/Console.java                   |  122 ++++++++++++++++++++++++++++++++
 java/lang/System.java                  |   11 +++-
 native/jni/java-io/Makefile.am         |    3 +-
 native/jni/java-io/java_io_VMConsole.c |   88 +++++++++++++++++++++++
 vm/reference/java/io/VMConsole.java    |   44 ++++++++++++
 6 files changed, 269 insertions(+), 2 deletions(-)
 create mode 100644 java/io/Console.java
 create mode 100644 native/jni/java-io/java_io_VMConsole.c
 create mode 100644 vm/reference/java/io/VMConsole.java

diff --git a/include/Makefile.am b/include/Makefile.am
index 1656c5c..37be91d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -144,6 +144,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gnu_java_nio_VMSelector.h \
 gnu_java_nio_charset_iconv_IconvEncoder.h \
 gnu_java_nio_charset_iconv_IconvDecoder.h \
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h \
+java_io_VMConsole.h \
 java_io_VMFile.h \
 java_io_VMObjectInputStream.h \
 java_io_VMObjectStreamClass.h \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -384,6 +385,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gnu_java_nio_VMSelector.h: $(top_srcdir)/vm/reference/gnu/java/nio/VMSelector.ja
 $(JAVAH) -o $&amp;lt; at &amp;gt; gnu.java.nio.VMSelector
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h: $(top_srcdir)/vm/reference/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java
 $(JAVAH) -o $&amp;lt; at &amp;gt; gnu.java.lang.management.VMOperatingSystemMXBeanImpl
+java_io_VMConsole.h: $(top_srcdir)/vm/reference/java/io/VMConsole.java
+$(JAVAH) -o $&amp;lt; at &amp;gt; java.io.VMConsole
 java_io_VMFile.h: $(top_srcdir)/vm/reference/java/io/VMFile.java
 $(JAVAH) -o $&amp;lt; at &amp;gt; java.io.VMFile
 java_io_VMObjectInputStream.h: $(top_srcdir)/vm/reference/java/io/VMObjectInputStream.java
diff --git a/java/io/Console.java b/java/io/Console.java
new file mode 100644
index 0000000..5434b02
--- /dev/null
+++ b/java/io/Console.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,122 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* Console.java -- A character-based console device
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public final class Console implements Flushable
+{
+  private static Console console = new Console();
+
+  public static Console console()
+  {
+    return console;
+  }
+
+  private Console()
+  {
+  }
+
+  public PrintWriter writer()
+  {
+    return new PrintWriter(new OutputStreamWriter(System.out));
+  }
+
+  public Reader reader()
+  {
+    return new InputStreamReader(System.in);
+  }
+
+  public Console format(String fmt, Object... args)
+  {
+    System.out.printf(fmt, args);
+
+    return this;
+  }
+
+  public Console printf(String fmt, Object... args)
+  {
+    return format(fmt, args);
+  }
+
+  public String readLine(String fmt, Object... args)
+  {
+    format(fmt, args);
+    return readLine();
+  }
+
+  public String readLine()
+  {
+    String result = null;
+    try
+      {
+        result = new BufferedReader(reader()).readLine();
+      }
+    catch (IOException e)
+      {
+        throw new IOError(e);
+      }
+    return result;
+  }
+
+  public char[] readPassword(String fmt, Object... args)
+  {
+    format(fmt, args);
+    return readPassword();
+  }
+
+  public char[] readPassword()
+  {
+    String s = VMConsole.readPassword(this);
+
+    System.out.println();
+
+    if (s == null)
+      {
+        return null;
+      }
+    return s.toCharArray();
+  }
+
+  public void flush() throws IOException
+  {
+    System.out.flush();
+  }
+}
diff --git a/java/lang/System.java b/java/lang/System.java
index 39d6da2..51b3259 100644
--- a/java/lang/System.java
+++ b/java/lang/System.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* System.java -- useful methods to interface with the system
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2012
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import gnu.classpath.VMStackWalker;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
+import java.io.Console;
 import java.nio.channels.Channel;
 import java.nio.channels.spi.SelectorProvider;
 import java.util.AbstractCollection;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -703,6 +704,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class System
     return SelectorProvider.provider().inheritedChannel();
   }
 
+  /*
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static Console console()
+  {
+    return Console.console();
+  }
+
   /**
    * This is a specialised &amp;lt;code&amp;gt;Collection&amp;lt;/code&amp;gt;, providing
    * the necessary provisions for the collections used by the
diff --git a/native/jni/java-io/Makefile.am b/native/jni/java-io/Makefile.am
index 58bd973..80edb32 100644
--- a/native/jni/java-io/Makefile.am
+++ b/native/jni/java-io/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,6 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 nativeexeclib_LTLIBRARIES = libjavaio.la 
 
-libjavaio_la_SOURCES = java_io_VMFile.c \
+libjavaio_la_SOURCES = java_io_VMConsole.c \
+java_io_VMFile.c \
 java_io_VMObjectInputStream.c \
 java_io_VMObjectStreamClass.c
 
diff --git a/native/jni/java-io/java_io_VMConsole.c b/native/jni/java-io/java_io_VMConsole.c
new file mode 100644
index 0000000..cb169f9
--- /dev/null
+++ b/native/jni/java-io/java_io_VMConsole.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,88 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* java_io_VMConsole.c - Native methods for java.io.Console class
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+/* do not move; needed here because of some macro definitions */
+#include &amp;lt;config.h&amp;gt;
+
+#include &amp;lt;termios.h&amp;gt;
+#include &amp;lt;unistd.h&amp;gt;
+
+#include &amp;lt;jni.h&amp;gt;
+
+#include "java_io_VMConsole.h"
+
+/*************************************************************************/
+
+#define TERMIOS_ECHO_IFLAGS (IUCLC|IXON|IXOFF|IXANY)
+#define TERMIOS_ECHO_LFLAGS (ECHO|ECHOE|ECHOK|ECHONL|TOSTOP)
+/*
+ * Class:     java_io_VMConsole
+ * Method:    echo
+ * Signature: (Z)Z
+ */
+JNIEXPORT jstring JNICALL
+Java_java_io_VMConsole_readPassword (JNIEnv *env,
+     jclass clazz __attribute__ ((__unused__)),
+     jobject con)
+{
+  struct termios old, new;
+  jmethodID readLineID;
+  jstring result;
+
+  readLineID = (*env)-&amp;gt;GetMethodID
+    (env, (*env)-&amp;gt;GetObjectClass (env, con),
+     "readLine", "()Ljava/lang/String;");
+  if (!readLineID)
+    {
+      return NULL;
+    }
+
+  tcgetattr (STDIN_FILENO, &amp;amp;old);
+
+  tcgetattr (STDIN_FILENO, &amp;amp;new);
+
+  new.c_iflag &amp;amp;= ~TERMIOS_ECHO_IFLAGS;
+  new.c_lflag &amp;amp;= ~TERMIOS_ECHO_LFLAGS;
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &amp;amp;new);
+
+  result = (*env)-&amp;gt;CallObjectMethod (env, con, readLineID);
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &amp;amp;old);
+
+  return result;
+}
diff --git a/vm/reference/java/io/VMConsole.java b/vm/reference/java/io/VMConsole.java
new file mode 100644
index 0000000..69c9df9
--- /dev/null
+++ b/vm/reference/java/io/VMConsole.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,44 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* VMConsole.java -- helper for java.io.Console
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+public final class VMConsole
+{
+  static native String readPassword(Console con);
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-06T19:57:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13181">
    <title>[RFC/PATCH v2 1/2] Add java.io.IOError class</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13181</link>
    <description>&lt;pre&gt;This patch adds a missing IOError class to GNU Classpath that was introduced in
Java 1.6.

2012-01-05  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

        * java/io/IOError:
        Add new class.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/io/IOError.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 java/io/IOError.java

diff --git a/java/io/IOError.java b/java/io/IOError.java
new file mode 100644
index 0000000..176b4bd
--- /dev/null
+++ b/java/io/IOError.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,54 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* IOError.java -- Throw when unrecoverable I/O error happens.
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * Throw when unrecoverable I/O error happens.
+ *
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public class IOError extends Error
+{
+  private static final long serialVersionUID = 67100927991680413L;
+
+  public IOError(Throwable cause)
+  {
+    super(cause);
+  }
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-05T19:14:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13180">
    <title>[RFC/PATCH] Add java.io.IOError class</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13180</link>
    <description>&lt;pre&gt;This patch adds a missing IOError class to GNU Classpath that was introduced in
Java 1.6.

2012-01-05  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

        * java/io/IOError:
        Add new class.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/io/IOError.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 java/io/IOError.java

diff --git a/java/io/IOError.java b/java/io/IOError.java
new file mode 100644
index 0000000..3ad9f37
--- /dev/null
+++ b/java/io/IOError.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,54 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* IOError.java -- Throw when unrecoverable I/O error happens.
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * Throw when unrecoverable I/O error happens.
+ *
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public class IOError extends Error
+{
+  private static final long serialVersionUID = 67100927991680413L;
+
+  public IOError(String cause)
+  {
+    super(cause);
+  }
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-05T17:25:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13185">
    <title>[RFC/PATCH v2] Add java/io/Console class andjava/lang/System.console() method</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13185</link>
    <description>&lt;pre&gt;This patch implements java/io/Console and adds a console() method to
java/lang/System. The implementation is lame but it works reasonably well.

2012-01-06  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

* include/Makefile.am:
Add java_io_VMConsole.h.

* java/io/Console:
Add Java 1.6 java/io/Console API.

* java/lang/System.java:
(console): Add Java 1.6 console() API.

* vm/reference/java/io/VMConsole:
Add new class.

* native/jni/java-io/Makefile.am:
Add java_io_VMConsole.c.

* native/jni/java-io/java_io_VMConsole.c:
Add native helpers for java/io/Console.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 include/Makefile.am                    |    3 +
 java/io/Console.java                   |  122 ++++++++++++++++++++++++++++++++
 java/lang/System.java                  |   11 +++-
 native/jni/java-io/Makefile.am         |    3 +-
 native/jni/java-io/java_io_VMConsole.c |   88 +++++++++++++++++++++++
 vm/reference/java/io/VMConsole.java    |   44 ++++++++++++
 6 files changed, 269 insertions(+), 2 deletions(-)
 create mode 100644 java/io/Console.java
 create mode 100644 native/jni/java-io/java_io_VMConsole.c
 create mode 100644 vm/reference/java/io/VMConsole.java

diff --git a/include/Makefile.am b/include/Makefile.am
index 1656c5c..37be91d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -144,6 +144,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gnu_java_nio_VMSelector.h \
 gnu_java_nio_charset_iconv_IconvEncoder.h \
 gnu_java_nio_charset_iconv_IconvDecoder.h \
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h \
+java_io_VMConsole.h \
 java_io_VMFile.h \
 java_io_VMObjectInputStream.h \
 java_io_VMObjectStreamClass.h \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -384,6 +385,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gnu_java_nio_VMSelector.h: $(top_srcdir)/vm/reference/gnu/java/nio/VMSelector.ja
 $(JAVAH) -o $&amp;lt; at &amp;gt; gnu.java.nio.VMSelector
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h: $(top_srcdir)/vm/reference/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java
 $(JAVAH) -o $&amp;lt; at &amp;gt; gnu.java.lang.management.VMOperatingSystemMXBeanImpl
+java_io_VMConsole.h: $(top_srcdir)/vm/reference/java/io/VMConsole.java
+$(JAVAH) -o $&amp;lt; at &amp;gt; java.io.VMConsole
 java_io_VMFile.h: $(top_srcdir)/vm/reference/java/io/VMFile.java
 $(JAVAH) -o $&amp;lt; at &amp;gt; java.io.VMFile
 java_io_VMObjectInputStream.h: $(top_srcdir)/vm/reference/java/io/VMObjectInputStream.java
diff --git a/java/io/Console.java b/java/io/Console.java
new file mode 100644
index 0000000..5434b02
--- /dev/null
+++ b/java/io/Console.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,122 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* Console.java -- A character-based console device
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public final class Console implements Flushable
+{
+  private static Console console = new Console();
+
+  public static Console console()
+  {
+    return console;
+  }
+
+  private Console()
+  {
+  }
+
+  public PrintWriter writer()
+  {
+    return new PrintWriter(new OutputStreamWriter(System.out));
+  }
+
+  public Reader reader()
+  {
+    return new InputStreamReader(System.in);
+  }
+
+  public Console format(String fmt, Object... args)
+  {
+    System.out.printf(fmt, args);
+
+    return this;
+  }
+
+  public Console printf(String fmt, Object... args)
+  {
+    return format(fmt, args);
+  }
+
+  public String readLine(String fmt, Object... args)
+  {
+    format(fmt, args);
+    return readLine();
+  }
+
+  public String readLine()
+  {
+    String result = null;
+    try
+      {
+        result = new BufferedReader(reader()).readLine();
+      }
+    catch (IOException e)
+      {
+        throw new IOError(e);
+      }
+    return result;
+  }
+
+  public char[] readPassword(String fmt, Object... args)
+  {
+    format(fmt, args);
+    return readPassword();
+  }
+
+  public char[] readPassword()
+  {
+    String s = VMConsole.readPassword(this);
+
+    System.out.println();
+
+    if (s == null)
+      {
+        return null;
+      }
+    return s.toCharArray();
+  }
+
+  public void flush() throws IOException
+  {
+    System.out.flush();
+  }
+}
diff --git a/java/lang/System.java b/java/lang/System.java
index 39d6da2..51b3259 100644
--- a/java/lang/System.java
+++ b/java/lang/System.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* System.java -- useful methods to interface with the system
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2012
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import gnu.classpath.VMStackWalker;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
+import java.io.Console;
 import java.nio.channels.Channel;
 import java.nio.channels.spi.SelectorProvider;
 import java.util.AbstractCollection;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -703,6 +704,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class System
     return SelectorProvider.provider().inheritedChannel();
   }
 
+  /*
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static Console console()
+  {
+    return Console.console();
+  }
+
   /**
    * This is a specialised &amp;lt;code&amp;gt;Collection&amp;lt;/code&amp;gt;, providing
    * the necessary provisions for the collections used by the
diff --git a/native/jni/java-io/Makefile.am b/native/jni/java-io/Makefile.am
index 58bd973..80edb32 100644
--- a/native/jni/java-io/Makefile.am
+++ b/native/jni/java-io/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,6 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 nativeexeclib_LTLIBRARIES = libjavaio.la 
 
-libjavaio_la_SOURCES = java_io_VMFile.c \
+libjavaio_la_SOURCES = java_io_VMConsole.c \
+java_io_VMFile.c \
 java_io_VMObjectInputStream.c \
 java_io_VMObjectStreamClass.c
 
diff --git a/native/jni/java-io/java_io_VMConsole.c b/native/jni/java-io/java_io_VMConsole.c
new file mode 100644
index 0000000..cb169f9
--- /dev/null
+++ b/native/jni/java-io/java_io_VMConsole.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,88 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* java_io_VMConsole.c - Native methods for java.io.Console class
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+/* do not move; needed here because of some macro definitions */
+#include &amp;lt;config.h&amp;gt;
+
+#include &amp;lt;termios.h&amp;gt;
+#include &amp;lt;unistd.h&amp;gt;
+
+#include &amp;lt;jni.h&amp;gt;
+
+#include "java_io_VMConsole.h"
+
+/*************************************************************************/
+
+#define TERMIOS_ECHO_IFLAGS (IUCLC|IXON|IXOFF|IXANY)
+#define TERMIOS_ECHO_LFLAGS (ECHO|ECHOE|ECHOK|ECHONL|TOSTOP)
+/*
+ * Class:     java_io_VMConsole
+ * Method:    echo
+ * Signature: (Z)Z
+ */
+JNIEXPORT jstring JNICALL
+Java_java_io_VMConsole_readPassword (JNIEnv *env,
+     jclass clazz __attribute__ ((__unused__)),
+     jobject con)
+{
+  struct termios old, new;
+  jmethodID readLineID;
+  jstring result;
+
+  readLineID = (*env)-&amp;gt;GetMethodID
+    (env, (*env)-&amp;gt;GetObjectClass (env, con),
+     "readLine", "()Ljava/lang/String;");
+  if (!readLineID)
+    {
+      return NULL;
+    }
+
+  tcgetattr (STDIN_FILENO, &amp;amp;old);
+
+  tcgetattr (STDIN_FILENO, &amp;amp;new);
+
+  new.c_iflag &amp;amp;= ~TERMIOS_ECHO_IFLAGS;
+  new.c_lflag &amp;amp;= ~TERMIOS_ECHO_LFLAGS;
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &amp;amp;new);
+
+  result = (*env)-&amp;gt;CallObjectMethod (env, con, readLineID);
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &amp;amp;old);
+
+  return result;
+}
diff --git a/vm/reference/java/io/VMConsole.java b/vm/reference/java/io/VMConsole.java
new file mode 100644
index 0000000..69c9df9
--- /dev/null
+++ b/vm/reference/java/io/VMConsole.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,44 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* VMConsole.java -- helper for java.io.Console
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+public final class VMConsole
+{
+  static native String readPassword(Console con);
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-06T19:57:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13181">
    <title>[RFC/PATCH v2 1/2] Add java.io.IOError class</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13181</link>
    <description>&lt;pre&gt;This patch adds a missing IOError class to GNU Classpath that was introduced in
Java 1.6.

2012-01-05  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

        * java/io/IOError:
        Add new class.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/io/IOError.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 java/io/IOError.java

diff --git a/java/io/IOError.java b/java/io/IOError.java
new file mode 100644
index 0000000..176b4bd
--- /dev/null
+++ b/java/io/IOError.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,54 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* IOError.java -- Throw when unrecoverable I/O error happens.
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * Throw when unrecoverable I/O error happens.
+ *
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public class IOError extends Error
+{
+  private static final long serialVersionUID = 67100927991680413L;
+
+  public IOError(Throwable cause)
+  {
+    super(cause);
+  }
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-05T19:14:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13180">
    <title>[RFC/PATCH] Add java.io.IOError class</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13180</link>
    <description>&lt;pre&gt;This patch adds a missing IOError class to GNU Classpath that was introduced in
Java 1.6.

2012-01-05  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

        * java/io/IOError:
        Add new class.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 java/io/IOError.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 java/io/IOError.java

diff --git a/java/io/IOError.java b/java/io/IOError.java
new file mode 100644
index 0000000..3ad9f37
--- /dev/null
+++ b/java/io/IOError.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,54 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* IOError.java -- Throw when unrecoverable I/O error happens.
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * Throw when unrecoverable I/O error happens.
+ *
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public class IOError extends Error
+{
+  private static final long serialVersionUID = 67100927991680413L;
+
+  public IOError(String cause)
+  {
+    super(cause);
+  }
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-05T17:25:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.classpath.patches/13185">
    <title>[RFC/PATCH v2] Add java/io/Console class andjava/lang/System.console() method</title>
    <link>http://comments.gmane.org/gmane.comp.java.classpath.patches/13185</link>
    <description>&lt;pre&gt;This patch implements java/io/Console and adds a console() method to
java/lang/System. The implementation is lame but it works reasonably well.

2012-01-06  Pekka Enberg  &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;

* include/Makefile.am:
Add java_io_VMConsole.h.

* java/io/Console:
Add Java 1.6 java/io/Console API.

* java/lang/System.java:
(console): Add Java 1.6 console() API.

* vm/reference/java/io/VMConsole:
Add new class.

* native/jni/java-io/Makefile.am:
Add java_io_VMConsole.c.

* native/jni/java-io/java_io_VMConsole.c:
Add native helpers for java/io/Console.

Signed-off-by: Pekka Enberg &amp;lt;penberg&amp;lt; at &amp;gt;kernel.org&amp;gt;
---
 include/Makefile.am                    |    3 +
 java/io/Console.java                   |  122 ++++++++++++++++++++++++++++++++
 java/lang/System.java                  |   11 +++-
 native/jni/java-io/Makefile.am         |    3 +-
 native/jni/java-io/java_io_VMConsole.c |   88 +++++++++++++++++++++++
 vm/reference/java/io/VMConsole.java    |   44 ++++++++++++
 6 files changed, 269 insertions(+), 2 deletions(-)
 create mode 100644 java/io/Console.java
 create mode 100644 native/jni/java-io/java_io_VMConsole.c
 create mode 100644 vm/reference/java/io/VMConsole.java

diff --git a/include/Makefile.am b/include/Makefile.am
index 1656c5c..37be91d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -144,6 +144,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gnu_java_nio_VMSelector.h \
 gnu_java_nio_charset_iconv_IconvEncoder.h \
 gnu_java_nio_charset_iconv_IconvDecoder.h \
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h \
+java_io_VMConsole.h \
 java_io_VMFile.h \
 java_io_VMObjectInputStream.h \
 java_io_VMObjectStreamClass.h \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -384,6 +385,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; gnu_java_nio_VMSelector.h: $(top_srcdir)/vm/reference/gnu/java/nio/VMSelector.ja
 $(JAVAH) -o $&amp;lt; at &amp;gt; gnu.java.nio.VMSelector
 gnu_java_lang_management_VMOperatingSystemMXBeanImpl.h: $(top_srcdir)/vm/reference/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java
 $(JAVAH) -o $&amp;lt; at &amp;gt; gnu.java.lang.management.VMOperatingSystemMXBeanImpl
+java_io_VMConsole.h: $(top_srcdir)/vm/reference/java/io/VMConsole.java
+$(JAVAH) -o $&amp;lt; at &amp;gt; java.io.VMConsole
 java_io_VMFile.h: $(top_srcdir)/vm/reference/java/io/VMFile.java
 $(JAVAH) -o $&amp;lt; at &amp;gt; java.io.VMFile
 java_io_VMObjectInputStream.h: $(top_srcdir)/vm/reference/java/io/VMObjectInputStream.java
diff --git a/java/io/Console.java b/java/io/Console.java
new file mode 100644
index 0000000..5434b02
--- /dev/null
+++ b/java/io/Console.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,122 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* Console.java -- A character-based console device
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+/**
+ * &amp;lt; at &amp;gt;since 1.6
+ */
+public final class Console implements Flushable
+{
+  private static Console console = new Console();
+
+  public static Console console()
+  {
+    return console;
+  }
+
+  private Console()
+  {
+  }
+
+  public PrintWriter writer()
+  {
+    return new PrintWriter(new OutputStreamWriter(System.out));
+  }
+
+  public Reader reader()
+  {
+    return new InputStreamReader(System.in);
+  }
+
+  public Console format(String fmt, Object... args)
+  {
+    System.out.printf(fmt, args);
+
+    return this;
+  }
+
+  public Console printf(String fmt, Object... args)
+  {
+    return format(fmt, args);
+  }
+
+  public String readLine(String fmt, Object... args)
+  {
+    format(fmt, args);
+    return readLine();
+  }
+
+  public String readLine()
+  {
+    String result = null;
+    try
+      {
+        result = new BufferedReader(reader()).readLine();
+      }
+    catch (IOException e)
+      {
+        throw new IOError(e);
+      }
+    return result;
+  }
+
+  public char[] readPassword(String fmt, Object... args)
+  {
+    format(fmt, args);
+    return readPassword();
+  }
+
+  public char[] readPassword()
+  {
+    String s = VMConsole.readPassword(this);
+
+    System.out.println();
+
+    if (s == null)
+      {
+        return null;
+      }
+    return s.toCharArray();
+  }
+
+  public void flush() throws IOException
+  {
+    System.out.flush();
+  }
+}
diff --git a/java/lang/System.java b/java/lang/System.java
index 39d6da2..51b3259 100644
--- a/java/lang/System.java
+++ b/java/lang/System.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,5 +1,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 /* System.java -- useful methods to interface with the system
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2012
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; import gnu.classpath.VMStackWalker;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
+import java.io.Console;
 import java.nio.channels.Channel;
 import java.nio.channels.spi.SelectorProvider;
 import java.util.AbstractCollection;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -703,6 +704,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; public final class System
     return SelectorProvider.provider().inheritedChannel();
   }
 
+  /*
+   * &amp;lt; at &amp;gt;since 1.6
+   */
+  public static Console console()
+  {
+    return Console.console();
+  }
+
   /**
    * This is a specialised &amp;lt;code&amp;gt;Collection&amp;lt;/code&amp;gt;, providing
    * the necessary provisions for the collections used by the
diff --git a/native/jni/java-io/Makefile.am b/native/jni/java-io/Makefile.am
index 58bd973..80edb32 100644
--- a/native/jni/java-io/Makefile.am
+++ b/native/jni/java-io/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,6 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 nativeexeclib_LTLIBRARIES = libjavaio.la 
 
-libjavaio_la_SOURCES = java_io_VMFile.c \
+libjavaio_la_SOURCES = java_io_VMConsole.c \
+java_io_VMFile.c \
 java_io_VMObjectInputStream.c \
 java_io_VMObjectStreamClass.c
 
diff --git a/native/jni/java-io/java_io_VMConsole.c b/native/jni/java-io/java_io_VMConsole.c
new file mode 100644
index 0000000..cb169f9
--- /dev/null
+++ b/native/jni/java-io/java_io_VMConsole.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,88 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* java_io_VMConsole.c - Native methods for java.io.Console class
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+/* do not move; needed here because of some macro definitions */
+#include &amp;lt;config.h&amp;gt;
+
+#include &amp;lt;termios.h&amp;gt;
+#include &amp;lt;unistd.h&amp;gt;
+
+#include &amp;lt;jni.h&amp;gt;
+
+#include "java_io_VMConsole.h"
+
+/*************************************************************************/
+
+#define TERMIOS_ECHO_IFLAGS (IUCLC|IXON|IXOFF|IXANY)
+#define TERMIOS_ECHO_LFLAGS (ECHO|ECHOE|ECHOK|ECHONL|TOSTOP)
+/*
+ * Class:     java_io_VMConsole
+ * Method:    echo
+ * Signature: (Z)Z
+ */
+JNIEXPORT jstring JNICALL
+Java_java_io_VMConsole_readPassword (JNIEnv *env,
+     jclass clazz __attribute__ ((__unused__)),
+     jobject con)
+{
+  struct termios old, new;
+  jmethodID readLineID;
+  jstring result;
+
+  readLineID = (*env)-&amp;gt;GetMethodID
+    (env, (*env)-&amp;gt;GetObjectClass (env, con),
+     "readLine", "()Ljava/lang/String;");
+  if (!readLineID)
+    {
+      return NULL;
+    }
+
+  tcgetattr (STDIN_FILENO, &amp;amp;old);
+
+  tcgetattr (STDIN_FILENO, &amp;amp;new);
+
+  new.c_iflag &amp;amp;= ~TERMIOS_ECHO_IFLAGS;
+  new.c_lflag &amp;amp;= ~TERMIOS_ECHO_LFLAGS;
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &amp;amp;new);
+
+  result = (*env)-&amp;gt;CallObjectMethod (env, con, readLineID);
+
+  tcsetattr (STDIN_FILENO, TCSANOW, &amp;amp;old);
+
+  return result;
+}
diff --git a/vm/reference/java/io/VMConsole.java b/vm/reference/java/io/VMConsole.java
new file mode 100644
index 0000000..69c9df9
--- /dev/null
+++ b/vm/reference/java/io/VMConsole.java
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,44 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/* VMConsole.java -- helper for java.io.Console
+   Copyright (C) 2012  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.io;
+
+public final class VMConsole
+{
+  static native String readPassword(Console con);
+}
&lt;/pre&gt;</description>
    <dc:creator>Pekka Enberg</dc:creator>
    <dc:date>2012-01-06T19:57:11</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.java.classpath.patches">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.java.classpath.patches</link>
  </textinput>
</rdf:RDF>

