sonatype-lift[bot] commented on code in PR #1747:
URL: https://github.com/apache/groovy/pull/1747#discussion_r922570687
##########
src/test/org/codehaus/groovy/runtime/powerassert/AssertionTestUtil.groovy:
##########
@@ -18,21 +18,26 @@
*/
package org.codehaus.groovy.runtime.powerassert
+import groovy.transform.AutoFinal
import org.junit.Assert
/**
* Utility methods for testing power assertions.
*/
+@AutoFinal
+final class AssertionTestUtil {
-abstract class AssertionTestUtil {
- static fails(Closure assertion) {
+ private AssertionTestUtil() {
+ }
+
+ static fails(Closure<Void> assertion) {
try {
assertion.call();
Assert.fail("assertion should have failed but didn't")
} catch (PowerAssertionError expected) {}
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=298936603&lift_comment_rating=1)
] - [ [😕 Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=298936603&lift_comment_rating=2)
] - [ [😑 Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=298936603&lift_comment_rating=3)
] - [ [🙂 Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=298936603&lift_comment_rating=4)
] - [ [😊 Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=298936603&lift_comment_rating=5)
]
##########
src/test/org/codehaus/groovy/transform/packageScope/DifferentPackageTest.groovy:
##########
@@ -187,32 +186,30 @@ final class DifferentPackageTest {
assert loader.loadClass('p.Peer').half() == 21
}
- @Test @NotYetImplemented // GROOVY-9093
- void testDifferentPackageShouldNotSeeInstanceProps() {
- def err = shouldFail CompilationFailedException, {
- def loader = addSources(
- One: P_DOT_ONE,
- Two: '''
- package q
+ @Test // GROOVY-9093
+ void testDifferentPackageShouldNotSeeObjectProps1() {
+ def loader = addSources(
+ One: P_DOT_ONE,
+ Two: '''
+ package q
- @groovy.transform.CompileStatic
- class Two extends p.One {
- int valueSize() {
- value.size() // not visible
- }
+ @groovy.transform.CompileStatic
+ class Two extends p.One {
+ int valueSize() {
+ value.size() // not visible
}
- ''')
- // TODO: Don't need this once compiler errors
+ }
+ ''')
+ try { // TODO: Don't need this once compiler emits error
assert loader.loadClass('q.Two').newInstance().valueSize() == 5
+ } catch (MissingPropertyException java9plus) {
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=298936648&lift_comment_rating=1)
] - [ [😕 Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=298936648&lift_comment_rating=2)
] - [ [😑 Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=298936648&lift_comment_rating=3)
] - [ [🙂 Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=298936648&lift_comment_rating=4)
] - [ [😊 Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=298936648&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]