You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/04/22 12:59:42 UTC

[groovy] branch master updated (2d441b5 -> dffbc50)

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

paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from 2d441b5  fix typo
     new ec68924  fix spotbugs warning (throw NoSuchElementException rather than ArrayIndexOutOfBoundsException when accessing exhausted iterator)
     new dffbc50  GROOVY-9520: Update Spotbugs/Spotbugs plugin to 4.0.2/4.0.5

The 2 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:
 build.gradle                                              | 6 +++---
 gradle/quality.gradle                                     | 2 +-
 src/main/java/org/codehaus/groovy/util/ArrayIterator.java | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)


[groovy] 02/02: GROOVY-9520: Update Spotbugs/Spotbugs plugin to 4.0.2/4.0.5

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

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit dffbc50b50672caee2a619ad98062d5a6b1ba6e2
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Apr 22 22:59:33 2020 +1000

    GROOVY-9520: Update Spotbugs/Spotbugs plugin to 4.0.2/4.0.5
---
 build.gradle          | 6 +++---
 gradle/quality.gradle | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build.gradle b/build.gradle
index 4e0b819..e04f2d6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,7 +46,7 @@ buildscript {
 
 plugins {
     id 'me.champeau.buildscan-recipes' version '0.2.3'
-    id 'com.github.spotbugs' version '4.0.2'
+    id 'com.github.spotbugs' version '4.0.5'
     id 'com.github.ben-manes.versions' version '0.28.0'
     id 'com.github.blindpirate.osgi' version '0.0.3'
     id 'org.sonarqube' version '2.8'
@@ -149,8 +149,8 @@ ext {
     xmlunitVersion = '1.6'
     xstreamVersion = '1.4.11.1'
     spockVersion = '2.0-groovy-3.0-SNAPSHOT' // supports up to 9.9.99
-    spotbugsVersion = '4.0.1'
-    spotbugsAnnotationsVersion = '4.0.1'
+    spotbugsVersion = '4.0.2'
+    spotbugsAnnotationsVersion = '4.0.2'
     checkstyleVersion = '8.30'
     junit5Version = '5.6.2'
     junit5PlatformVersion = '1.6.2'
diff --git a/gradle/quality.gradle b/gradle/quality.gradle
index 3c5731a..b553f6e 100644
--- a/gradle/quality.gradle
+++ b/gradle/quality.gradle
@@ -152,7 +152,7 @@ allprojects { proj ->
             xml.enabled = false
             html {
                 enabled = true
-                stylesheet = 'fancy-hist.xsl'
+                stylesheet = 'plain.xsl'
             }
         }
     }


[groovy] 01/02: fix spotbugs warning (throw NoSuchElementException rather than ArrayIndexOutOfBoundsException when accessing exhausted iterator)

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

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ec68924d6de100f3d2d1916fec1d7dbe24f89d87
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Apr 22 22:59:08 2020 +1000

    fix spotbugs warning (throw NoSuchElementException rather than ArrayIndexOutOfBoundsException when accessing exhausted iterator)
---
 src/main/java/org/codehaus/groovy/util/ArrayIterator.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/util/ArrayIterator.java b/src/main/java/org/codehaus/groovy/util/ArrayIterator.java
index 53b1d92..27bc880 100644
--- a/src/main/java/org/codehaus/groovy/util/ArrayIterator.java
+++ b/src/main/java/org/codehaus/groovy/util/ArrayIterator.java
@@ -20,6 +20,7 @@ package org.codehaus.groovy.util;
 
 import java.lang.reflect.Array;
 import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 public class ArrayIterator<T> implements Iterator<T> {
     private final T[] array;
@@ -37,6 +38,9 @@ public class ArrayIterator<T> implements Iterator<T> {
 
     @SuppressWarnings("unchecked")
     public T next() {
+        if (!hasNext()) {
+            throw new NoSuchElementException();
+        }
         return (T) Array.get(array, index++);
     }