Remove a dangling import, and another unused Messages.java.

Also tidy up our two awt.font classes.

Change-Id: I931d348eef7265190f76c31f74c9a5d9ec5d6597
diff --git a/libcore/awt-kernel/src/main/java/java/awt/font/NumericShaper.java b/libcore/awt-kernel/src/main/java/java/awt/font/NumericShaper.java
index e8ea693..b170f25 100644
--- a/libcore/awt-kernel/src/main/java/java/awt/font/NumericShaper.java
+++ b/libcore/awt-kernel/src/main/java/java/awt/font/NumericShaper.java
@@ -22,13 +22,8 @@
 
 import java.io.IOException;
 import java.io.Serializable;
-
-// BEGIN android-deleted
-//import org.apache.harmony.awt.internal.nls.Messages;
-// END android-deleted
 import org.apache.harmony.misc.HashCode;
 
-
 /**
  * The Class NumericShaper provides methods to convert latin character codes
  * to unicode character codes.
@@ -467,10 +462,8 @@
      * @return one of the script indices according to the specified range.
      */
     private int getIndexFromRange(int range){
-        if (range == 0){
-            // BEGIN android-changed
-            throwRange(range);
-            // END android-changed
+        if (range == 0) {
+            throw rangeException(range);
         }
 
         int index = 0;
@@ -481,10 +474,7 @@
             index++;
         }
 
-        // BEGIN android-changed
-        throwRange(range);
-        return -1; // Never executed; quiets the compiler.
-        // END android-changed
+        throw rangeException(range);
     }
 
     /**
@@ -496,31 +486,16 @@
      */
     private int getRangeFromIndex(int index){
         if (index < 0 || index >= MAX_INDEX){
-            // BEGIN android-changed
-            throwRange(index);
-            // END android-changed
+            throw rangeException(index);
         }
 
         return 1 << index;
     }
 
-    // BEGIN android-added
-    /**
-     * Throws a standard "out of range" exception.
-     * 
-     * @param value the bogus value
-     */
-    private static void throwRange(int value) {
-        throw new IllegalArgumentException(
-                "Illegal range argument value: " + value);
+    private static IllegalArgumentException rangeException(int value) {
+        throw new IllegalArgumentException("Illegal range argument value: " + value);
     }
-    // END android-added
 
-    /**
-     * Returns a hash code of this NumericShaper.
-     * 
-     * @return a hash code of this NumericShaper.
-     */
     @Override
     public int hashCode() {
         HashCode hash = new HashCode();
@@ -533,14 +508,6 @@
 
     }
 
-    /**
-     * Compares this NumericShaper object with the specified Object.
-     * 
-     * @param obj the Object to be compared.
-     * 
-     * @return true, if this NumericShaper object is equal to
-     * the specified Object, false otherwise.
-     */
     @Override
     public boolean equals(Object obj) {
         if (obj == null) {
@@ -562,11 +529,6 @@
         return false;
     }
 
-    /**
-     * Returns a string representation of this NumericShaper.
-     * 
-     * @return the string representation of this NumericShaper.
-     */
     @Override
     public String toString() {
         /* !! There is no description in the documentation what this method must
diff --git a/libcore/awt-kernel/src/main/java/java/awt/font/TextAttribute.java b/libcore/awt-kernel/src/main/java/java/awt/font/TextAttribute.java
index f887540..0f00ae8 100644
--- a/libcore/awt-kernel/src/main/java/java/awt/font/TextAttribute.java
+++ b/libcore/awt-kernel/src/main/java/java/awt/font/TextAttribute.java
@@ -25,10 +25,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-// BEGIN android-deleted
-//import org.apache.harmony.awt.internal.nls.Messages;
-// END android-deleted
-
 /**
  * The TextAttribute class defines attribute keys and attribute values 
  * for text rendering. Each TextAttributes should have the following
@@ -73,9 +69,7 @@
         if (result != null) {
             return result;
         }
-        // BEGIN android-changed
         throw new InvalidObjectException("Unknown attribute name");
-        // END android-changed
     }
 
     /** 
diff --git a/libcore/luni/src/main/java/org/apache/harmony/misc/internal/nls/Messages.java b/libcore/luni/src/main/java/org/apache/harmony/misc/internal/nls/Messages.java
deleted file mode 100644
index 128545b..0000000
--- a/libcore/luni/src/main/java/org/apache/harmony/misc/internal/nls/Messages.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-
-/*
- * THE FILE HAS BEEN AUTOGENERATED BY MSGTOOL TOOL.
- * All changes made to this file manually will be overwritten 
- * if this tool runs again. Better make changes in the template file.
- */
-
-package org.apache.harmony.misc.internal.nls;
-
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-// BEGIN android-changed
-import org.apache.harmony.luni.util.MsgHelp;
-// END android-changed
-
-/**
- * This class retrieves strings from a resource bundle and returns them,
- * formatting them with MessageFormat when required.
- * <p>
- * It is used by the system classes to provide national language support, by
- * looking up messages in the <code>
- *    org.apache.harmony.misc.internal.nls.messages
- * </code>
- * resource bundle. Note that if this file is not available, or an invalid key
- * is looked up, or resource bundle support is not available, the key itself
- * will be returned as the associated message. This means that the <em>KEY</em>
- * should a reasonable human-readable (English) string.
- * 
- */
-public class Messages {
-
-    // BEGIN android-changed
-    private static final String sResource =
-        "org.apache.harmony.misc.internal.nls.messages"; //$NON-NLS-1$
-    // END android-changed
-    /**
-     * Retrieves a message which has no arguments.
-     * 
-     * @param msg
-     *            String the key to look up.
-     * @return String the message for that key in the system message bundle.
-     */
-    static public String getString(String msg) {
-        // BEGIN android-changed
-        return MsgHelp.getString(sResource, msg);
-        // END android-changed
-    }
-
-    /**
-     * Retrieves a message which takes 1 argument.
-     * 
-     * @param msg
-     *            String the key to look up.
-     * @param arg
-     *            Object the object to insert in the formatted output.
-     * @return String the message for that key in the system message bundle.
-     */
-    static public String getString(String msg, Object arg) {
-        return getString(msg, new Object[] { arg });
-    }
-
-    /**
-     * Retrieves a message which takes 1 integer argument.
-     * 
-     * @param msg
-     *            String the key to look up.
-     * @param arg
-     *            int the integer to insert in the formatted output.
-     * @return String the message for that key in the system message bundle.
-     */
-    static public String getString(String msg, int arg) {
-        return getString(msg, new Object[] { Integer.toString(arg) });
-    }
-
-    /**
-     * Retrieves a message which takes 1 character argument.
-     * 
-     * @param msg
-     *            String the key to look up.
-     * @param arg
-     *            char the character to insert in the formatted output.
-     * @return String the message for that key in the system message bundle.
-     */
-    static public String getString(String msg, char arg) {
-        return getString(msg, new Object[] { String.valueOf(arg) });
-    }
-
-    /**
-     * Retrieves a message which takes 2 arguments.
-     * 
-     * @param msg
-     *            String the key to look up.
-     * @param arg1
-     *            Object an object to insert in the formatted output.
-     * @param arg2
-     *            Object another object to insert in the formatted output.
-     * @return String the message for that key in the system message bundle.
-     */
-    static public String getString(String msg, Object arg1, Object arg2) {
-        return getString(msg, new Object[] { arg1, arg2 });
-    }
-
-    /**
-     * Retrieves a message which takes several arguments.
-     * 
-     * @param msg
-     *            String the key to look up.
-     * @param args
-     *            Object[] the objects to insert in the formatted output.
-     * @return String the message for that key in the system message bundle.
-     */
-    static public String getString(String msg, Object[] args) {
-        // BEGIN android-changed
-        return MsgHelp.getString(sResource, msg, args);
-        // END android-changed
-    }
-
-    // BEGIN android-note
-    // Duplicate code was dropped in favor of using MsgHelp.
-    // END android-note
-}
diff --git a/libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java b/libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
index 68b85b2..b289f2c 100644
--- a/libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
+++ b/libcore/nio/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
@@ -41,7 +41,6 @@
 import org.apache.harmony.luni.platform.Platform;
 import org.apache.harmony.luni.platform.PlatformAddress;
 import org.apache.harmony.luni.platform.PlatformAddressFactory;
-import org.apache.harmony.nio.internal.nls.Messages;
 
 /*
  * The file channel impl class is the bridge between the logical channels