Apache Groovy v2.4.7 发布
jopen 8年前
<p style="text-align: center;"><img alt="" src="https://simg.open-open.com/show/676c0340b8391530dbad82db7fb060f2.jpg" /></p> <p>Groovy 是一种动态语言。它和 Java 一样,也运行于 Java 虚拟机中。你可以认为 Groovy 扩展了 Java 语言。Groovy 对自己的定义就是:Groovy 是在 java 平台上的、 具有像 Python, Ruby 和 Smalltalk 语言特性的灵活动态语言, Groovy 保证了这些特性像 Java 语法一样被 Java 开发者使用。除了语言和 Java 相通外,Groovy 有时候又像一种脚本语言。执行 Groovy 脚本时,Groovy 会先将其编译成 Java 类字节码,然后通过 Jvm 来执行这个 Java 类。Groovy的主要特点:</p> <ul> <li>使JAVA程序员以几乎为0的学习曲线获得现代的编程特性</li> <li>为你的代码提供静态检查和静态编译能力以提供健壮性和高性能</li> <li>提供领域特定语言(Domain-Specific Languages)和其他紧凑的语法使你的代码变得容易阅读和维护</li> <li>使用强大的处理原生类型,面向对象和Ant DSL使编写shell和脚本变得容易</li> <li>在开发Web,GUI,数据库或控制台程序时通过减少框架的代码提高开发人员的生产力</li> <li>通过提供的单元测试和模拟开箱即用(out-of-the-box)来简化测试</li> <li>与所有现有的Java类和库无缝集成</li> <li>直接编译成JAVA字节码,所以你可以用在任何你用JAVA的地方</li> </ul> <h2>更新日志 </h2> <h3>Bug修复</h3> <ul> <li>[<a href="/misc/goto?guid=4958991295717405522">GROOVY-6203</a>] - GroovyScriptEngine does not take script base class into account</li> <li>[<a href="/misc/goto?guid=4958991295817641037">GROOVY-7312</a>] - Compiler generates invalid inner class constructor</li> <li>[<a href="/misc/goto?guid=4958991295904667972">GROOVY-7530</a>] - disjoint() does not work correctly if objects don't implement Comparable</li> <li>[<a href="/misc/goto?guid=4958991296000139668">GROOVY-7580</a>] - ExpandoMetaClass append method does not throw an exception as per docs</li> <li>[<a href="/misc/goto?guid=4958991296092597850">GROOVY-7602</a>] - Intersect returns an empty list when the contents of the compared Collections are Maps</li> <li>[<a href="/misc/goto?guid=4958991296182962727">GROOVY-7620</a>] - No error if abstract getter is not implemented but static field exists</li> <li>[<a href="/misc/goto?guid=4958991296275908354">GROOVY-7723</a>] - propertyMissing(String,Object) called for missing getter</li> <li>[<a href="/misc/goto?guid=4958991296358981250">GROOVY-7728</a>] - LAX parser: Commenting out key/val pairs doesn't work</li> <li>[<a href="/misc/goto?guid=4958991296449708929">GROOVY-7751</a>] - CallableStatement leak in Sql.call() method</li> <li>[<a href="/misc/goto?guid=4958991296547717744">GROOVY-7758</a>] - GroovyCastException when both @CompileStatic and @Newify are used</li> <li>[<a href="/misc/goto?guid=4958991296633027792">GROOVY-7761</a>] - Groovydoc incorrectly rejects dollar signs and mucks up some backslashes during @code tag replacement.</li> <li>[<a href="/misc/goto?guid=4958991296728164517">GROOVY-7773</a>] - Enum constructor with value throws "unexpected token" error</li> <li>[<a href="/misc/goto?guid=4958991296817958813">GROOVY-7777</a>] - groovysh cannot load script with shebang</li> <li>[<a href="/misc/goto?guid=4958991296921930818">GROOVY-7781</a>] - GPathResult: Cannot retrieve XML attribute with namespace</li> <li>[<a href="/misc/goto?guid=4958991297002434617">GROOVY-7783</a>] - Redundant computation in ObservableList</li> <li>[<a href="/misc/goto?guid=4958991297103937901">GROOVY-7784</a>] - TypeChecked/CompileStatic: IndexOutOfBoundsException</li> <li>[<a href="/misc/goto?guid=4958991297199293424">GROOVY-7793</a>] - Compiler compiles class with private abstract method</li> <li>[<a href="/misc/goto?guid=4958991297289949830">GROOVY-7798</a>] - Sql.query methods pass java.sql.ResultSet to the closure, instead of GroovyResultSet</li> <li>[<a href="/misc/goto?guid=4958991297382172685">GROOVY-7804</a>] - @CompileStatic/@TypeChecked unexpected NullpointerException compiler bug</li> <li>[<a href="/misc/goto?guid=4958991297475652997">GROOVY-7806</a>] - @interface has too-stringent requirement for newline</li> <li>[<a href="/misc/goto?guid=4958991297568097888">GROOVY-7808</a>] - XmlSlurper unprefixed attributes should not be in the default namespace</li> <li>[<a href="/misc/goto?guid=4958991297658312762">GROOVY-7810</a>] - XmlSluper default constructor documentation about namespace aware incorrect.</li> <li>[<a href="/misc/goto?guid=4958991297743355202">GROOVY-7813</a>] - Calling a non-static outer class method from a static class passes STC</li> <li>[<a href="/misc/goto?guid=4958991297835983207">GROOVY-7816</a>] - ObservableList addAll method property change event index off by one</li> <li>[<a href="/misc/goto?guid=4958991297924523059">GROOVY-7820</a>] - CachedMethod.compareToCachedMethod throws "Should never happen"</li> <li>[<a href="/misc/goto?guid=4958991298019413934">GROOVY-7822</a>] - Redundant computation in ObservableSet</li> <li>[<a href="/misc/goto?guid=4958990910321079033">GROOVY-7826</a>] - Infinite recursion in genericTypeAsString</li> <li>[<a href="/misc/goto?guid=4958991298142911102">GROOVY-7832</a>] - NullPointerException in GroovyConsole with an input method</li> <li>[<a href="/misc/goto?guid=4958991298236122480">GROOVY-7833</a>] - exception in phase 'conversion'</li> <li>[<a href="/misc/goto?guid=4958991298333634873">GROOVY-7841</a>] - Assert fails when accessing particular primitive values with @CompileStatic</li> <li>[<a href="/misc/goto?guid=4958991298421472549">GROOVY-7846</a>] - A trait that defines a static method that uses generic return types throws "BUG! Type is null"</li> </ul> <h3>文档</h3> <ul> <li>[<a href="/misc/goto?guid=4958991298518291160">GROOVY-7604</a>] - traits docs diamond problem explanation</li> </ul> <h2>改进</h2> <ul> <li>[<a href="/misc/goto?guid=4958991298606676578">GROOVY-6950</a>] - StringGroovyMethods improve performance</li> <li>[<a href="/misc/goto?guid=4958991298706393467">GROOVY-7775</a>] - JavadocAssertionTestBuilder should handle escapes needed for HTML within javadoc, e.g. @ for @ and {@code ...}</li> </ul> <h2>下载</h2> <ul> <li><a href="/misc/goto?guid=4958991298803783670" rel="nofollow"><strong>Source code</strong> (zip)</a></li> <li><a href="/misc/goto?guid=4958991298893166759" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li> <li><a href="/misc/goto?guid=4958991298980374673">官方下载</a></li> </ul> <h2> </h2>