English 中文(简体)
如何在 grooovy 中报告错误
原标题:How to report bug in groovy
  • 时间:2012-05-22 14:21:37
  •  标签:
  • groovy

这些代码:

if (false)
    int number = 0

1..3.each{
    println number
}

return bug:

BUG! 在源单位 Script7.groovy 中, Script7.groovy 的相级类生成例外, 试图获得一个以名称编号为堆叠变量的变量, 但是没有创建此名称的变量

我使用1.8.0版本。

最佳回答

您可以在它们的 < a href=> 上报告 Groovy bugs 上“https://issues.apache.org/jira/projects/GROOVY/issues” rel=“不跟随无悔者” >public JIRA

张贴到groovy用户邮件列表或许也是个好主意, 解释这个问题, 并与您创建的 JIRA 报告的链接。

Btw: 在Groovy 1.8.6 上也未能做到这一点(它总是值得检查最新版本的Groovy,因为它可能已经固定)


我想即使设置了固定, 仍然会失败( 但不是在 < code> BUG! faility) 。 要让它生效, 您需要做 :

int number = 1

if (false)
    number = 0

(1..3).each{
    println number
}
问题回答

暂无回答




相关问题
Groovy - how to exit each loop?

I m new to Grails/Groovy and am trying to find a node in a an xml file; I ve figured out how to iterate over all of them, but I want to exit the loop when the target node is found. I ve read that ...

Eclipse Spring Builder set properties with Groovy beans

I typically use groovy to construct simple bean but the Spring IDE plugin to eclipse fails to build when I try to set a property that is generated by groovy without an explicit setter. For example, ...

How can I get this snippet to work?

I d like to port a little piece of code from Ruby to Groovy, and I m stuck at this: def given(array,closure) { closure.delegate = array closure() } given([1,2,3,4]) { findAll { it > 4} ...

Changing the value in a map in Groovy

This is about a very basic program I m writing in Groovy. I have defined a map inside a method: def addItem() { print("Enter the item name: ") def itemName = reader.readLine() print(...

Is functional Clojure or imperative Groovy more readable?

OK, no cheating now. No, really, take a minute or two and try this out. What does "positions" do? Edit: simplified according to cgrand s suggestion. (defn redux [[current next] flag] [(if flag ...

热门标签