You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/02/18 07:18:55 UTC

[commons-geometry] branch master updated (f84ae36 -> 0d064e4)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git.


    from f84ae36  Remove unnecessary else clauses.
     new 76166d1  Add missing import
     new 55a07ec  Remove trailing whitespace.
     new 0d064e4  Update PMD rules

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../euclidean/threed/SphereGenerator.java          |  2 +-
 .../enclosing/euclidean/twod/DiskGenerator.java    |  4 ++--
 .../euclidean/threed/shapes/Parallelepiped.java    |  1 +
 src/changes/changes.xml                            |  2 +-
 src/main/resources/pmd/pmd-ruleset.xml             | 20 +++++++++++++++++
 src/site/xdoc/developers.xml                       | 26 +++++++++++-----------
 6 files changed, 38 insertions(+), 17 deletions(-)


[commons-geometry] 01/03: Add missing import

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit 76166d1d4447322f25a1c180a2597e36938af61e
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 06:55:27 2020 +0000

    Add missing import
---
 .../apache/commons/geometry/euclidean/threed/shapes/Parallelepiped.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/shapes/Parallelepiped.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/shapes/Parallelepiped.java
index ccf1ba5..e2355fa 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/shapes/Parallelepiped.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/shapes/Parallelepiped.java
@@ -20,6 +20,7 @@ import java.util.Arrays;
 import java.util.List;
 
 import org.apache.commons.geometry.core.precision.DoublePrecisionContext;
+import org.apache.commons.geometry.euclidean.threed.Facet;
 import org.apache.commons.geometry.euclidean.threed.Vector3D;
 
 /** Class containing utility methods for constructing parallelepipeds. Parallelepipeds


[commons-geometry] 03/03: Update PMD rules

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit 0d064e42e6bbe05c074ff2de691fb81cbed8a048
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 07:18:51 2020 +0000

    Update PMD rules
    
    Allow 'NaN' as constant name.
    Relax utility class pattern.
    Allow short method names.
---
 src/main/resources/pmd/pmd-ruleset.xml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
index 0307f27..24c4280 100644
--- a/src/main/resources/pmd/pmd-ruleset.xml
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -25,6 +25,7 @@
 
   <rule ref="category/java/bestpractices.xml">
     <exclude name="UseVarargs" />
+    <exclude name="ReplaceVectorWithList" />
   </rule>
   <rule ref="category/java/codestyle.xml">
     <exclude name="MethodArgumentCouldBeFinal" />
@@ -68,4 +69,23 @@
     </properties>
   </rule>
 
+  <rule ref="category/java/codestyle.xml/FieldNamingConventions">
+    <properties>
+      <property name="publicConstantPattern" value="([A-Z][A-Z_0-9]*)|NaN" />
+    </properties>
+  </rule>
+
+  <rule ref="category/java/codestyle.xml/ClassNamingConventions">
+    <properties>
+      <property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]+" />
+    </properties>
+  </rule>
+
+  <rule ref="category/java/codestyle.xml/ShortMethodName">
+    <properties>
+        <!-- Allow short method names such as 'eq' and 'of' -->
+      <property name="minimum" value="2" />
+    </properties>
+  </rule>
+
 </ruleset>


[commons-geometry] 02/03: Remove trailing whitespace.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit 55a07ec684fe627ffe1cf3a486f460e71e58c28f
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 06:57:14 2020 +0000

    Remove trailing whitespace.
---
 .../euclidean/threed/SphereGenerator.java          |  2 +-
 .../enclosing/euclidean/twod/DiskGenerator.java    |  4 ++--
 src/changes/changes.xml                            |  2 +-
 src/site/xdoc/developers.xml                       | 26 +++++++++++-----------
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/threed/SphereGenerator.java b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/threed/SphereGenerator.java
index 2902818..0aab6d3 100644
--- a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/threed/SphereGenerator.java
+++ b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/threed/SphereGenerator.java
@@ -58,7 +58,7 @@ public class SphereGenerator implements SupportBallGenerator<Vector3D> {
             return new EnclosingBall<>(Vector3D.linearCombination(0.5, vA, 0.5, vB),
                                        0.5 * vA.distance(vB),
                                        Arrays.asList(vA, vB));
-        } 
+        }
         final Vector3D vC = support.get(2);
         if (support.size() < 4) {
             final Plane p = Plane.fromPoints(vA, vB, vC, precision);
diff --git a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/twod/DiskGenerator.java b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/twod/DiskGenerator.java
index 053caaf..b61912f 100644
--- a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/twod/DiskGenerator.java
+++ b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/euclidean/twod/DiskGenerator.java
@@ -34,11 +34,11 @@ public class DiskGenerator implements SupportBallGenerator<Vector2D> {
     public EnclosingBall<Vector2D> ballOnSupport(final List<Vector2D> support) {
         if (support.isEmpty()) {
             return new EnclosingBall<>(Vector2D.ZERO, Double.NEGATIVE_INFINITY, Collections.emptyList());
-        } 
+        }
         final Vector2D vA = support.get(0);
         if (support.size() < 2) {
             return new EnclosingBall<>(vA, 0, Arrays.asList(vA));
-        } 
+        }
         final Vector2D vB = support.get(1);
         if (support.size() < 3) {
             return new EnclosingBall<>(Vector2D.linearCombination(0.5, vA, 0.5, vB),
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index f4763e6..bc9ed7d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -36,7 +36,7 @@ The <action> type attribute can be add,update,fix,remove.
 -->
 
 <!-- NOTE:
-The description attribute entries below are specially formatted 
+The description attribute entries below are specially formatted
 so as to improve the layout of the generated text release notes.
 
 The parsing process removes all line feeds, replacing them with a single space.
diff --git a/src/site/xdoc/developers.xml b/src/site/xdoc/developers.xml
index 9575821..622dae4 100644
--- a/src/site/xdoc/developers.xml
+++ b/src/site/xdoc/developers.xml
@@ -15,12 +15,12 @@
    See the License for the specific language governing permissions and
    limitations under the License.
   -->
-  
+
 <document>
   <properties>
     <title>Developers Guide</title>
   </properties>
-  
+
   <body>
 
     <section name="Aims">
@@ -30,7 +30,7 @@
         to ensure that the code they create can be successfully maintained by others.
       </p>
     </section>
-    
+
     <section name='Guidelines'>
       <p>
         Developers are asked to comply with the following development guidelines.
@@ -55,8 +55,8 @@
             </li>
             <li>
               Like most commons components, Commons Geometry uses Apache Maven as our
-              build tool. The sources can also be built using Ant (a working 
-              Ant build.xml is included in the top level project directory). 
+              build tool. The sources can also be built using Ant (a working
+              Ant build.xml is included in the top level project directory).
               To build Commons Geometry using Maven, you can follow the instructions for
               <a href="http://maven.apache.org/run-maven/index.html">Building a
               project with Maven</a>.
@@ -68,7 +68,7 @@
               Maven.
             </li>
             <li>
-              Be sure to join the commons-dev and commons-user 
+              Be sure to join the commons-dev and commons-user
               <a href="mail-lists.html">
                 email lists</a> and use them appropriately (make sure the string
                 "[Geometry]" starts the Subject line of all your postings).
@@ -79,11 +79,11 @@
                 Setup an account on JIRA
               </a>
               and use it to submit patches and
-              identify bugs. Read the 
+              identify bugs. Read the
               <a href="https://issues.apache.org/bugwritinghelp.html">
               directions</a>
               for submitting bugs and search the database to
-              determine if an issue exists or has already been dealt with.        
+              determine if an issue exists or has already been dealt with.
               <p>
                 See the <a href="https://commons.apache.org/geometry/issue-tracking.html">
                 Commons Geometry Issue Tracking Page</a>
@@ -105,7 +105,7 @@
         <p>
           Follow the steps below when making suggestions for additions or
           enhancements to Commons Geometry. This will make it easier for the community
-          to comment on your ideas and for the committers to keep track of them. 
+          to comment on your ideas and for the committers to keep track of them.
           Thanks in advance!
           <ol>
             <li>Start with a post to the commons-dev mailing list, with [Geometry] at
@@ -137,7 +137,7 @@
             ticket if a patch goes more than a few days with no comment or commit.
             </li>
           </ol>
-        </p>   
+        </p>
       </subsection>
 
       <subsection name='Coding Style'>
@@ -198,7 +198,7 @@
           </li>
           <li>
             Implementations <i>should</i> use standard algorithms and
-            references or full descriptions of all algorithms <i>should</i> be 
+            references or full descriptions of all algorithms <i>should</i> be
             provided.
           </li>
           <li>
@@ -243,7 +243,7 @@
             License in a comment that begins the file.
           </li>
           <li>
-            All contributions must comply with the terms of the Apache 
+            All contributions must comply with the terms of the Apache
             <a href="http://www.apache.org/licenses/cla.pdf">Contributor License
             Agreement (CLA)</a>.
           </li>
@@ -257,7 +257,7 @@
           <li>
             References to source materials covered by restrictive proprietary
             licenses should be avoided.  In particular, contributions should not
-            implement or include references to algorithms in 
+            implement or include references to algorithms in
             <a href="http://www.nr.com/">Numerical Recipes (NR)</a>.
             Any questions about copyright or patent issues should be raised on
             the commons-dev mailing list before contributing or committing code.