[Jython-checkins] jython: Fix more javadoc 8 errors.

jeff.allen jython-checkins at python.org
Sat Sep 28 04:47:32 EDT 2019


https://hg.python.org/jython/rev/bd853a8783a5
changeset:   8301:bd853a8783a5
user:        Jeff Allen <ja.py at farowl.co.uk>
date:        Mon Sep 23 22:42:47 2019 +0100
summary:
  Fix more javadoc 8 errors.

Not sure why these escaped the first attempt at a clean-up.

files:
  build.gradle                                   |   2 +-
  src/com/ziclix/python/sql/DateFactory.java     |  30 +++---
  src/com/ziclix/python/sql/JavaDateFactory.java |  43 +++++----
  src/com/ziclix/python/sql/pipe/Pipe.java       |   5 +-
  src/com/ziclix/python/sql/util/BCP.java        |  16 ++-
  src/org/python/antlr/PythonTokenSource.java    |  18 ++-
  src/org/python/core/BaseBytes.java             |   6 +-
  src/org/python/core/PyBuiltinMethodNarrow.java |   9 +-
  src/org/python/core/PyObject.java              |   7 +-
  src/org/python/core/PySequence.java            |   9 +-
  src/org/python/core/buffer/BaseBuffer.java     |   2 +-
  11 files changed, 85 insertions(+), 62 deletions(-)


diff --git a/build.gradle b/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -688,9 +688,9 @@
 /*
  * The JavaDoc, anyway.
  */
-
 javadoc {
     options.encoding = 'UTF-8'
+    source = fileTree(dir: 'src', include: '**/*.java')
 }
 
 // ---------------- Publication ------------------------------------------------
diff --git a/src/com/ziclix/python/sql/DateFactory.java b/src/com/ziclix/python/sql/DateFactory.java
--- a/src/com/ziclix/python/sql/DateFactory.java
+++ b/src/com/ziclix/python/sql/DateFactory.java
@@ -19,33 +19,33 @@
     /**
      * This function constructs an object holding a date value.
      *
-     * @param year
-     * @param month
-     * @param day
-     * @return PyObject
+     * @param year to set
+     * @param month to set
+     * @param day to set
+     * @return date as PyObject
      */
     public PyObject Date(int year, int month, int day);
 
     /**
      * This function constructs an object holding a time value.
      *
-     * @param hour
-     * @param minute
-     * @param second
-     * @return PyObject
+     * @param hour to set
+     * @param minute to set
+     * @param second to set
+     * @return time as PyObject
      */
     public PyObject Time(int hour, int minute, int second);
 
     /**
      * This function constructs an object holding a time stamp value.
      *
-     * @param year
-     * @param month
-     * @param day
-     * @param hour
-     * @param minute
-     * @param second
-     * @return PyObject
+     * @param year to set
+     * @param month to set
+     * @param day to set
+     * @param hour to set
+     * @param minute to set
+     * @param second to set
+     * @return time stamp as PyObject
      */
     public PyObject Timestamp(int year, int month, int day, int hour, int minute, int second);
 
diff --git a/src/com/ziclix/python/sql/JavaDateFactory.java b/src/com/ziclix/python/sql/JavaDateFactory.java
--- a/src/com/ziclix/python/sql/JavaDateFactory.java
+++ b/src/com/ziclix/python/sql/JavaDateFactory.java
@@ -1,10 +1,9 @@
+// Copyright (c)2019 Jython Developers
 /*
  * Jython Database Specification API 2.0
- *
- *
- * Copyright (c) 2003 brian zimmer <bzimmer at ziclix.com>
- *
+ * Copyright (c) 2001 brian zimmer <bzimmer at ziclix.com>
  */
+// Licensed to the PSF under a Contributor Agreement
 package com.ziclix.python.sql;
 
 import org.python.core.Py;
@@ -24,11 +23,12 @@
     /**
      * This function constructs an object holding a date value.
      *
-     * @param year
-     * @param month
-     * @param day
-     * @return PyObject
+     * @param year to set
+     * @param month to set
+     * @param day to set
+     * @return date as PyObject
      */
+    @Override
     public PyObject Date(int year, int month, int day) {
 
         Calendar c = Calendar.getInstance();
@@ -43,11 +43,12 @@
     /**
      * This function constructs an object holding a time value.
      *
-     * @param hour
-     * @param minute
-     * @param second
-     * @return PyObject
+     * @param hour to set
+     * @param minute to set
+     * @param second to set
+     * @return time as PyObject
      */
+    @Override
     public PyObject Time(int hour, int minute, int second) {
 
         Calendar c = Calendar.getInstance();
@@ -62,14 +63,15 @@
     /**
      * This function constructs an object holding a time stamp value.
      *
-     * @param year
-     * @param month
-     * @param day
-     * @param hour
-     * @param minute
-     * @param second
-     * @return PyObject
+     * @param year to set
+     * @param month to set
+     * @param day to set
+     * @param hour to set
+     * @param minute to set
+     * @param second to set
+     * @return time stamp as PyObject
      */
+    @Override
     public PyObject Timestamp(int year, int month, int day, int hour, int minute, int second) {
 
         Calendar c = Calendar.getInstance();
@@ -98,6 +100,7 @@
      * @param ticks number of seconds since the epoch
      * @return PyObject
      */
+    @Override
     public PyObject DateFromTicks(long ticks) {
 
         Calendar c = Calendar.getInstance();
@@ -124,6 +127,7 @@
      * @param ticks number of seconds since the epoch
      * @return PyObject
      */
+    @Override
     public PyObject TimeFromTicks(long ticks) {
         return Py.java2py(new Time(ticks * 1000));
     }
@@ -141,6 +145,7 @@
      * @param ticks number of seconds since the epoch
      * @return PyObject
      */
+    @Override
     public PyObject TimestampFromTicks(long ticks) {
         return Py.java2py(new Timestamp(ticks * 1000));
     }
diff --git a/src/com/ziclix/python/sql/pipe/Pipe.java b/src/com/ziclix/python/sql/pipe/Pipe.java
--- a/src/com/ziclix/python/sql/pipe/Pipe.java
+++ b/src/com/ziclix/python/sql/pipe/Pipe.java
@@ -30,7 +30,7 @@
     }
 
     /**
-     * Start the processing of the Source->Sink.
+     * Start the processing of the Source to the Sink.
      *
      * @param source the data generator
      * @param sink   the consumer of the data
@@ -144,6 +144,7 @@
     /**
      * Method run
      */
+    @Override
     public void run() {
 
         try {
@@ -216,6 +217,7 @@
      *
      * @throws InterruptedException
      */
+    @Override
     protected void pipe() throws InterruptedException {
 
         PyObject row = Py.None;
@@ -270,6 +272,7 @@
      *
      * @throws InterruptedException
      */
+    @Override
     protected void pipe() throws InterruptedException {
 
         PyObject row = Py.None;
diff --git a/src/com/ziclix/python/sql/util/BCP.java b/src/com/ziclix/python/sql/util/BCP.java
--- a/src/com/ziclix/python/sql/util/BCP.java
+++ b/src/com/ziclix/python/sql/util/BCP.java
@@ -1,10 +1,9 @@
+// Copyright (c)2019 Jython Developers
 /*
  * Jython Database Specification API 2.0
- *
- *
  * Copyright (c) 2001 brian zimmer <bzimmer at ziclix.com>
- *
  */
+// Licensed to the PSF under a Contributor Agreement
 package com.ziclix.python.sql.util;
 
 import org.python.core.ClassDictInit;
@@ -68,7 +67,7 @@
         this.batchsize = batchsize;
         this.queuesize = 0;
     }
-    
+
     /**
      * Field __methods__
      */
@@ -99,6 +98,7 @@
      *
      * @return a string representation of the object.
      */
+    @Override
     public String toString() {
         return "<BCP object instance at " + hashCode() + ">";
     }
@@ -109,6 +109,7 @@
      * @param name
      * @param value
      */
+    @Override
     public void __setattr__(String name, PyObject value) {
 
         if ("destinationDataHandler".equals(name)) {
@@ -130,6 +131,7 @@
      * @param name
      * @return the attribute for the given name
      */
+    @Override
     public PyObject __findattr_ex__(String name) {
 
         if ("destinationDataHandler".equals(name)) {
@@ -206,7 +208,7 @@
 }
 
 /**
- * @copyright 2001 brian zimmer
+ * Copyright 2001 brian zimmer
  */
 class BCPFunc extends PyBuiltinMethodSet {
 
@@ -224,6 +226,7 @@
      * @param arg
      * @return PyObject
      */
+    @Override
     public PyObject __call__(PyObject arg) {
 
         BCP bcp = (BCP) __self__;
@@ -246,6 +249,7 @@
         }
     }
 
+    @Override
     public PyObject __call__(PyObject arga, PyObject argb) {
 
         BCP bcp = (BCP) __self__;
@@ -269,6 +273,7 @@
         }
     }
 
+    @Override
     public PyObject __call__(PyObject arga, PyObject argb, PyObject argc) {
 
         BCP bcp = (BCP) __self__;
@@ -292,6 +297,7 @@
         }
     }
 
+    @Override
     public PyObject __call__(PyObject[] args, String[] keywords) {
 
         BCP bcp = (BCP) __self__;
diff --git a/src/org/python/antlr/PythonTokenSource.java b/src/org/python/antlr/PythonTokenSource.java
--- a/src/org/python/antlr/PythonTokenSource.java
+++ b/src/org/python/antlr/PythonTokenSource.java
@@ -38,17 +38,17 @@
  This is an interesting lexical problem because multiple DEDENT
  tokens should be sent to the parser sometimes without a corresponding
  input symbol!  Consider the following example:
-
+ <pre>{@literal
  a=1
  if a>1:
      print a
  b=3
-
+}</pre>
  Here the "b" token on the left edge signals that a DEDENT is needed
  after the "print a \n" and before the "b".  The sequence should be
-
+<pre>
  ... 1 COLON NEWLINE INDENT PRINT a NEWLINE DEDENT b ASSIGN 3 ...
-
+</pre>
  For more examples, see the big comment at the bottom of this file.
 
  This TokenStream normally just passes tokens through to the parser.
@@ -131,6 +131,7 @@
      EOF to have char pos 0 even though with UNIX it's hard to get EOF
      at a non left edge.
      */
+    @Override
     public Token nextToken() {
         // if something in queue, just remove and return it
         if (tokens.size() > 0) {
@@ -366,6 +367,7 @@
         return buf.toString();
     }
 
+    @Override
     public String getSourceName() {
         return filename;
     }
@@ -383,13 +385,13 @@
 a  c
  b
 c
-a c \n INDENT b \n DEDENT c \n EOF 
+a c \n INDENT b \n DEDENT c \n EOF
 ------- t3 -------
 a
         b
                 c
 d
-a \n INDENT b \n INDENT c \n DEDENT DEDENT d \n EOF 
+a \n INDENT b \n INDENT c \n DEDENT DEDENT d \n EOF
 ------- t4 -------
 a
     c
@@ -401,12 +403,12 @@
              i
               j
     k
-a \n INDENT c \n INDENT d \n DEDENT e \n f \n INDENT g \n h \n i \n INDENT j \n DEDENT DEDENT k \n DEDENT EOF 
+a \n INDENT c \n INDENT d \n DEDENT e \n f \n INDENT g \n h \n i \n INDENT j \n DEDENT DEDENT k \n DEDENT EOF
 ------- t5 -------
 a
         b
         c
                 d
                 e
-a \n INDENT b \n c \n INDENT d \n e \n DEDENT DEDENT EOF 
+a \n INDENT b \n c \n INDENT d \n e \n DEDENT DEDENT EOF
 */
diff --git a/src/org/python/core/BaseBytes.java b/src/org/python/core/BaseBytes.java
--- a/src/org/python/core/BaseBytes.java
+++ b/src/org/python/core/BaseBytes.java
@@ -283,7 +283,7 @@
      *
      * @param start index in this byte array at which the first character code lands
      * @param value source of characters
-     * @throws PyException {@code ValueError} if any value[i] > 255
+     * @throws PyException {@code ValueError} if any {@code value[i] > 255}
      */
     protected void setBytes(int start, String value) throws PyException {
         int n = value.length();
@@ -299,7 +299,7 @@
      *
      * @param start index in this byte array at which the first character code lands
      * @param value source of characters
-     * @throws PyException {@code ValueError} if any value[i] > 255
+     * @throws PyException {@code ValueError} if any {@code value[i] > 255}
      */
     protected void setBytes(int start, int step, String value) throws PyException {
         int n = value.length();
@@ -4225,7 +4225,7 @@
      * for small array sizes to avoid needless reallocation.
      *
      * @param size of storage actually needed
-     * @return n >= size a recommended storage array size
+     * @return n ≥ size a recommended storage array size
      */
     protected static final int roundUp(int size) {
         /*
diff --git a/src/org/python/core/PyBuiltinMethodNarrow.java b/src/org/python/core/PyBuiltinMethodNarrow.java
--- a/src/org/python/core/PyBuiltinMethodNarrow.java
+++ b/src/org/python/core/PyBuiltinMethodNarrow.java
@@ -9,7 +9,7 @@
     }
 
     /**
-     * Creates a method for the <code>name<code> that takes exactly <code>numArgs</code> arguments.
+     * Creates a method for the <code>name</code> that takes exactly <code>numArgs</code> arguments.
      */
     protected PyBuiltinMethodNarrow(String name, int numArgs) {
         this(name, numArgs, numArgs);
@@ -31,6 +31,7 @@
         super(type, self, info);
     }
 
+    @Override
     public PyObject __call__(PyObject[] args, String[] keywords) {
         if(keywords.length != 0) {
             throw info.unexpectedCall(args.length, true);
@@ -38,6 +39,7 @@
         return __call__(args);
     }
 
+    @Override
     public PyObject __call__(PyObject[] args) {
         switch(args.length){
             case 0:
@@ -55,22 +57,27 @@
         }
     }
 
+    @Override
     public PyObject __call__() {
         throw info.unexpectedCall(0, false);
     }
 
+    @Override
     public PyObject __call__(PyObject arg0) {
         throw info.unexpectedCall(1, false);
     }
 
+    @Override
     public PyObject __call__(PyObject arg0, PyObject arg1) {
         throw info.unexpectedCall(2, false);
     }
 
+    @Override
     public PyObject __call__(PyObject arg0, PyObject arg1, PyObject arg2) {
         throw info.unexpectedCall(3, false);
     }
 
+    @Override
     public PyObject __call__(PyObject arg0,
                              PyObject arg1,
                              PyObject arg2,
diff --git a/src/org/python/core/PyObject.java b/src/org/python/core/PyObject.java
--- a/src/org/python/core/PyObject.java
+++ b/src/org/python/core/PyObject.java
@@ -128,10 +128,9 @@
      * {@link org.python.core.finalization.FinalizablePyObject}.
      * <p>
      * Note that this empty finalizer implementation is optimized away by the JVM. (See <a
-     * href=http://www.javaspecialists.eu/archive/Issue170.html}>Discovering Objects with
-     * Non-trivial Finalizers</a>). So {@code PyObject}s are not expensively treated as finalizable
-     * objects by the Java-GC. Its single intention is to prevent subclasses from having Java-style
-     * finalizers.
+     * href=http://www.javaspecialists.eu/archive/Issue170.html>Discovering Objects with Non-trivial
+     * Finalizers</a>). So {@code PyObject}s are not expensively treated as finalizable objects by
+     * the Java-GC. Its single intention is to prevent subclasses from having Java-style finalizers.
      */
     @SuppressWarnings("deprecation") // See the Javadoc
     @Override
diff --git a/src/org/python/core/PySequence.java b/src/org/python/core/PySequence.java
--- a/src/org/python/core/PySequence.java
+++ b/src/org/python/core/PySequence.java
@@ -280,8 +280,8 @@
     /**
      * Compare the specified object/length pairs.
      *
-     * @return value >= 0 is the index where the sequences differs. -1: reached the end of o1
-     *         without a difference -2: reached the end of both seqeunces without a difference -3:
+     * @return value ≥ 0 is the index where the sequences differs. -1: reached the end of o1
+     *         without a difference -2: reached the end of both sequences without a difference -3:
      *         reached the end of o2 without a difference
      */
     protected static int cmp(PyObject o1, int ol1, PyObject o2, int ol2) {
@@ -334,8 +334,9 @@
     }
 
     /**
-     * Adjusts <code>index</code> such that it's >= 0 and <= __len__. If <code>index</code> starts
-     * off negative, it's treated as an index from the end of the sequence going back to the start.
+     * Adjusts <code>index</code> such that it's ≥0 and ≤ __len__. If <code>index</code>
+     * starts off negative, it's treated as an index from the end of the sequence going back to the
+     * start.
      */
     protected int boundToSequence(int index) {
         int length = __len__();
diff --git a/src/org/python/core/buffer/BaseBuffer.java b/src/org/python/core/buffer/BaseBuffer.java
--- a/src/org/python/core/buffer/BaseBuffer.java
+++ b/src/org/python/core/buffer/BaseBuffer.java
@@ -182,7 +182,7 @@
     /**
      * Remove features from this buffer expressed using the constants defined in {@link PyBUF},
      * clearing individual flags specified while leaving others already set. Equivalent to
-     * <code>setFeatureFlags(~flags & getFeatureFlags())</code>.
+     * {@code setFeatureFlags(~flags & getFeatureFlags())}.
      *
      * @param flags to clear within the feature flags
      */

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


More information about the Jython-checkins mailing list