[Jython-checkins] jython: Javadoc changes only.

jeff.allen jython-checkins at python.org
Tue Feb 12 16:29:19 CET 2013


http://hg.python.org/jython/rev/0f9f62df2182
changeset:   7047:0f9f62df2182
user:        Jeff Allen <ja...py at farowl.co.uk>
date:        Tue Feb 12 00:45:24 2013 +0000
summary:
  Javadoc changes only.
Loosely-related Javadoc errors corrected. No code changes.

files:
  src/org/python/core/buffer/SimpleStringBuffer.java |  10 +++---
  src/org/python/core/codecs.java                    |  10 +++---
  src/org/python/modules/_codecs.java                |   8 ++---
  src/org/python/modules/_io/OpenMode.java           |   9 ++---
  src/org/python/modules/_io/PyIOBase.java           |   1 -
  src/org/python/modules/_io/PyRawIOBase.java        |   2 +-
  src/org/python/util/ProxyCompiler.java             |  15 +++++----
  7 files changed, 26 insertions(+), 29 deletions(-)


diff --git a/src/org/python/core/buffer/SimpleStringBuffer.java b/src/org/python/core/buffer/SimpleStringBuffer.java
--- a/src/org/python/core/buffer/SimpleStringBuffer.java
+++ b/src/org/python/core/buffer/SimpleStringBuffer.java
@@ -6,11 +6,11 @@
 /**
  * Buffer API that appears to be a one-dimensional array of one-byte items providing read-only API,
  * but which is actually backed by a Java String. Some of the buffer API absolutely needs access to
- * the data as a byte array (those parts that involve a {@link PyBuffer.Pointer} result), and therefore
- * this class must create a byte array from the String for them. However, it defers creation of a
- * byte array until that part of the API is actually used. Where possible, this class overrides
- * those methods in SimpleBuffer that would otherwise access the byte array attribute to use the
- * String instead.
+ * the data as a byte array (those parts that involve a <code>PyBuffer.Pointer</code> result), and
+ * therefore this class must create a byte array from the String for them. However, it defers
+ * creation of a byte array until that part of the API is actually used. Where possible, this class
+ * overrides those methods in SimpleBuffer that would otherwise access the byte array attribute to
+ * use the String instead.
  */
 public class SimpleStringBuffer extends SimpleBuffer {
 
diff --git a/src/org/python/core/codecs.java b/src/org/python/core/codecs.java
--- a/src/org/python/core/codecs.java
+++ b/src/org/python/core/codecs.java
@@ -919,11 +919,11 @@
      * This method differs from the CPython equivalent (in <code>Object/unicodeobject.c</code>)
      * which works with an array of code points that are, in a wide build, Unicode code points.
      *
-     * @param unicode
-     * @param base64SetO
-     * @param base64WhiteSpace
-     * @param errors
-     * @return
+     * @param unicode to be encoded
+     * @param base64SetO true if characters in "set O" should be translated to base64
+     * @param base64WhiteSpace true if white-space characters should be translated to base64
+     * @param errors error policy name (e.g. "ignore", "replace")
+     * @return bytes representing the encoded unicode string
      */
     public static String PyUnicode_EncodeUTF7(String unicode, boolean base64SetO,
             boolean base64WhiteSpace, String errors) {
diff --git a/src/org/python/modules/_codecs.java b/src/org/python/modules/_codecs.java
--- a/src/org/python/modules/_codecs.java
+++ b/src/org/python/modules/_codecs.java
@@ -314,12 +314,12 @@
      * @param mapping to convert bytes to characters
      * @return decoded string and number of bytes consumed
      */
-    public static PyTuple charmap_decode(String str, String errors, PyObject mapping) {
+    public static PyTuple charmap_decode(String bytes, String errors, PyObject mapping) {
         if (mapping == null || mapping == Py.None) {
             // Default to Latin-1
-            return latin_1_decode(str, errors);
+            return latin_1_decode(bytes, errors);
         } else {
-            return charmap_decode(str, errors, mapping, false);
+            return charmap_decode(bytes, errors, mapping, false);
         }
     }
 
@@ -1290,7 +1290,6 @@
      * @param bytes to be decoded (Jython {@link PyString} convention)
      * @param errors error policy name (e.g. "ignore", "replace")
      * @param byteorder decoding "endianness" specified (in the Python -1, 0, +1 convention)
-     * @param isFinal if a "final" call, meaning the input must all be consumed
      * @return tuple (unicode_result, bytes_consumed, endianness)
      */
     public static PyTuple utf_32_ex_decode(String bytes, String errors, int byteorder) {
@@ -1335,7 +1334,6 @@
      * @param order LE, BE or UNDEFINED (meaning bytes may begin with a byte order mark)
      * @param isFinal if a "final" call, meaning the input must all be consumed
      * @param findOrder if the returned tuple should include a report of the byte order
-     * @return tuple containing unicode result (as UTF-16 Java String)
      * @return tuple (unicode_result, bytes_consumed [, endianness])
      */
     private static PyTuple PyUnicode_DecodeUTF32Stateful(String bytes, String errors,
diff --git a/src/org/python/modules/_io/OpenMode.java b/src/org/python/modules/_io/OpenMode.java
--- a/src/org/python/modules/_io/OpenMode.java
+++ b/src/org/python/modules/_io/OpenMode.java
@@ -43,8 +43,7 @@
     /**
      * Error message describing the way in which the mode is invalid, or null if no problem has been
      * found. This field may be set by the constructor (in the case of duplicate or unrecognised
-     * mode letters), by the {@link #isValid()} method, or by client code. A non-null value will
-     * cause {@link #isValid()} to return false.
+     * mode letters), by the {@link #validate()} method, or by client code.
      */
     public String message;
 
@@ -52,7 +51,7 @@
      * Decode the given string to an OpenMode object, checking for duplicate or unrecognised mode
      * letters. Valid letters are those in "rwa+btU". Errors in the mode string do not raise an
      * exception, they simply generate an appropriate error message in {@link #message}. After
-     * construction, a client should always call {@link #isValid()} to complete validity checks.
+     * construction, a client should always call {@link #validate()} to complete validity checks.
      *
      * @param mode
      */
@@ -196,7 +195,7 @@
      */
     public void checkValid() throws PyException {
 
-        // Actually peform the check
+        // Actually perform the check
         validate();
 
         // The 'other' flag reports alien symbols in the original mode string
@@ -215,7 +214,7 @@
     /**
      * The mode string we need when constructing a <code>FileIO</code> initialised with the present
      * mode. Note that this is not the same as the full open mode because it omits the text-based
-     * attributes, and not the same as {@link #raw()}.
+     * attributes.
      *
      * @return "r", "w", or "a" with optional "+".
      */
diff --git a/src/org/python/modules/_io/PyIOBase.java b/src/org/python/modules/_io/PyIOBase.java
--- a/src/org/python/modules/_io/PyIOBase.java
+++ b/src/org/python/modules/_io/PyIOBase.java
@@ -160,7 +160,6 @@
      * Truncate file to <code>size</code> bytes to the current position (as reported by
      * <code>tell()</code>).
      *
-     * @param size requested for stream (or null for default)
      * @return the new size
      */
     public long truncate() {
diff --git a/src/org/python/modules/_io/PyRawIOBase.java b/src/org/python/modules/_io/PyRawIOBase.java
--- a/src/org/python/modules/_io/PyRawIOBase.java
+++ b/src/org/python/modules/_io/PyRawIOBase.java
@@ -187,7 +187,7 @@
      * of bytes written.
      *
      * @param b buffer of bytes to be written
-     * @return
+     * @return the number of bytes written
      */
     public PyObject write(PyObject b) {
         return _RawIOBase_write(b);
diff --git a/src/org/python/util/ProxyCompiler.java b/src/org/python/util/ProxyCompiler.java
--- a/src/org/python/util/ProxyCompiler.java
+++ b/src/org/python/util/ProxyCompiler.java
@@ -5,21 +5,22 @@
 import org.python.core.PySystemState;
 
 public class ProxyCompiler {
+
     /**
      * Compiles the python file by loading it
-     * 
-     * FIXME: this is quite hackish right now. It basically starts a whole interpreter
-     * and set's proxyDebugDirectory as the destination for the compiled proxy class 
-     * 
-     * @param filename: python filename to exec
-     * @param destDir: destination directory for the proxy classes
+     *
+     * FIXME: this is quite hackish right now. It basically starts a whole interpreter and sets
+     * proxyDebugDirectory as the destination for the compiled proxy class
+     *
+     * @param filename python filename to exec
+     * @param destDir destination directory for the proxy classes
      */
     public static void compile(String filename, String destDir) {
         Properties props = new Properties(System.getProperties());
         props.setProperty(PySystemState.PYTHON_CACHEDIR_SKIP, "true");
         PySystemState.initialize(props, null);
         PythonInterpreter interp = new PythonInterpreter();
-        
+
         String origProxyDir = org.python.core.Options.proxyDebugDirectory;
         try {
             org.python.core.Options.proxyDebugDirectory = destDir;

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list