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/27 11:12:23 UTC
[groovy] branch GROOVY_3_0_X updated (2442370 -> c414dd6)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a change to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git.
from 2442370 GROOVY-9527: Bump javaparser to 3.15.21 (#1233)
new ddac9b1 GROOVY-9520: Update Spotbugs/Spotbugs plugin to 4.0.2/4.0.5
new c414dd6 fix spotbugs warning (throw NoSuchElementException rather than ArrayIndexOutOfBoundsException when accessing exhausted iterator)
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] 01/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 GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit ddac9b164c11e232832c91d71b93330c8a79793a
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 89376dd..831e595 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'
@@ -151,8 +151,8 @@ ext {
xmlunitVersion = '1.6'
xstreamVersion = '1.4.11.1'
spockVersion = '2.0-M2-groovy-3.0'
- 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 807a9b6..d13952b 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] 02/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 GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit c414dd68df7680b3d82d100751fdeaa1561b8e0e
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++);
}