sonatype-lift[bot] commented on code in PR #1747:
URL: https://github.com/apache/groovy/pull/1747#discussion_r922570145


##########
src/test/groovy/lang/MetaClassRegistryTest.groovy:
##########
@@ -28,7 +30,7 @@ class MetaClassRegistryTest extends GroovyTestCase {
     static initSize
     static {
         try {
-            Class.forName("org.codehaus.groovy.vmplugin.v7.IndyInterface", 
true, MetaClassRegistryTest.classLoader)
+            Class.forName("org.codehaus.groovy.vmplugin.v8.IndyInterface", 
true, MetaClassRegistryTest.classLoader)

Review Comment:
   *ClassForName:*  Violation in class groovy.lang.MetaClassRegistryTest. 
Methods calls to Class.forName(...) can create resource leaks and should almost 
always be replaced with calls to ClassLoader.loadClass(...)
   
   Reply with *"**@sonatype-lift help**"* for info about LiftBot commands.
   Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the 
above finding from this PR.
   Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all 
the findings from this PR and from the status bar in Github.
   
   When talking to LiftBot, you need to **refresh** the page to see its 
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get 
to know more about LiftBot commands.
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=298936468&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936468&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936468&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936468&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=298936468&lift_comment_rating=5)
 ]



##########
src/test/groovy/lang/MetaClassRegistryTest.groovy:
##########
@@ -28,7 +30,7 @@ class MetaClassRegistryTest extends GroovyTestCase {
     static initSize
     static {
         try {
-            Class.forName("org.codehaus.groovy.vmplugin.v7.IndyInterface", 
true, MetaClassRegistryTest.classLoader)
+            Class.forName("org.codehaus.groovy.vmplugin.v8.IndyInterface", 
true, MetaClassRegistryTest.classLoader)
         } catch (e) {

Review Comment:
   *EmptyCatchBlock:*  The catch block is empty
   
   Reply with *"**@sonatype-lift help**"* for info about LiftBot commands.
   Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the 
above finding from this PR.
   Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all 
the findings from this PR and from the status bar in Github.
   
   When talking to LiftBot, you need to **refresh** the page to see its 
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get 
to know more about LiftBot commands.
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=298936469&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936469&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936469&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936469&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=298936469&lift_comment_rating=5)
 ]



##########
src/test/groovy/lang/StringConcatTest.groovy:
##########
@@ -18,6 +18,8 @@
  */
 package groovy.lang
 
+import groovy.test.GroovyTestCase
+
 class StringConcatTest extends GroovyTestCase{
   void testMe () {

Review Comment:
   *EmptyMethod:*  Violation in class StringConcatTest. The method testMe is 
both empty and not marked with @Override
   
   Reply with *"**@sonatype-lift help**"* for info about LiftBot commands.
   Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the 
above finding from this PR.
   Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all 
the findings from this PR and from the status bar in Github.
   
   When talking to LiftBot, you need to **refresh** the page to see its 
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get 
to know more about LiftBot commands.
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=298936473&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936473&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936473&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936473&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=298936473&lift_comment_rating=5)
 ]



##########
src/test/groovy/transform/stc/GenericsSTCTest.groovy:
##########
@@ -1824,28 +4217,45 @@ assert result == 'ok'
         '''
     }
 
-    static class MyList extends LinkedList<String> {}
+    // GROOVY-10528
+    void testRawTypeGuard() {
+        assertScript '''
+            void test(... args) {
+                args.each { object ->
+                    if (object instanceof Iterable) {
+                        object.each { test(it) }
+                    }
+                }
+            }
+            test(1,[2,3])
+        '''
+    }
+
+    
//--------------------------------------------------------------------------
+
+    static class MyList
+        extends LinkedList<String> {
+    }
 
-    public static class ClassA<T> {
-        public <X> Class<X> foo(Class<X> classType) {
+    static class ClassA<T> {
+        def <X> Class<X> foo(Class<X> classType) {
             return classType;
         }
-
-        public <X> Class<X> bar(Class<T> classType) {
+        def <X> Class<X> bar(Class<T> classType) {
             return null;
         }
     }
 
-    public static class JavaClassSupport {
-        public static class Container<T> {
+    static class JavaClassSupport {
+        static class Container<T> {
         }
-
-        public static class StringContainer extends Container<String> {
+        static class StringContainer extends Container<String> {
         }
-
-        public static <T> List<T> unwrap(Collection<? extends Container<T>> 
list) {
+        static <T> List<T> unwrap(Collection<? extends Container<T>> list) {

Review Comment:
   *EmptyMethod:*  Violation in class GenericsSTCTest$JavaClassSupport. The 
method unwrap is both empty and not marked with @Override
   
   Reply with *"**@sonatype-lift help**"* for info about LiftBot commands.
   Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the 
above finding from this PR.
   Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all 
the findings from this PR and from the status bar in Github.
   
   When talking to LiftBot, you need to **refresh** the page to see its 
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get 
to know more about LiftBot commands.
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=298936508&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936508&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936508&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=298936508&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=298936508&lift_comment_rating=5)
 ]



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to