Apache Groovy v2.4.7 發布

jopen 8年前發布 | 13K 次閱讀 Java JVM Apache Groovy

Groovy 是一種動態語言。它和 Java 一樣,也運行于 Java 虛擬機中。你可以認為 Groovy 擴展了 Java 語言。Groovy 對自己的定義就是:Groovy 是在 java 平臺上的、 具有像 Python, Ruby 和 Smalltalk 語言特性的靈活動態語言, Groovy 保證了這些特性像 Java 語法一樣被 Java 開發者使用。除了語言和 Java 相通外,Groovy 有時候又像一種腳本語言。執行 Groovy 腳本時,Groovy 會先將其編譯成 Java 類字節碼,然后通過 Jvm 來執行這個 Java 類。Groovy的主要特點:

  • 使JAVA程序員以幾乎為0的學習曲線獲得現代的編程特性
  • 為你的代碼提供靜態檢查和靜態編譯能力以提供健壯性和高性能
  • 提供領域特定語言(Domain-Specific Languages)和其他緊湊的語法使你的代碼變得容易閱讀和維護
  • 使用強大的處理原生類型,面向對象和Ant DSL使編寫shell和腳本變得容易
  • 在開發Web,GUI,數據庫或控制臺程序時通過減少框架的代碼提高開發人員的生產力
  • 通過提供的單元測試和模擬開箱即用(out-of-the-box)來簡化測試
  • 與所有現有的Java類和庫無縫集成
  • 直接編譯成JAVA字節碼,所以你可以用在任何你用JAVA的地方

更新日志 

Bug修復

  • [GROOVY-6203] - GroovyScriptEngine does not take script base class into account
  • [GROOVY-7312] - Compiler generates invalid inner class constructor
  • [GROOVY-7530] - disjoint() does not work correctly if objects don't implement Comparable
  • [GROOVY-7580] - ExpandoMetaClass append method does not throw an exception as per docs
  • [GROOVY-7602] - Intersect returns an empty list when the contents of the compared Collections are Maps
  • [GROOVY-7620] - No error if abstract getter is not implemented but static field exists
  • [GROOVY-7723] - propertyMissing(String,Object) called for missing getter
  • [GROOVY-7728] - LAX parser: Commenting out key/val pairs doesn't work
  • [GROOVY-7751] - CallableStatement leak in Sql.call() method
  • [GROOVY-7758] - GroovyCastException when both @CompileStatic and @Newify are used
  • [GROOVY-7761] - Groovydoc incorrectly rejects dollar signs and mucks up some backslashes during @code tag replacement.
  • [GROOVY-7773] - Enum constructor with value throws "unexpected token" error
  • [GROOVY-7777] - groovysh cannot load script with shebang
  • [GROOVY-7781] - GPathResult: Cannot retrieve XML attribute with namespace
  • [GROOVY-7783] - Redundant computation in ObservableList
  • [GROOVY-7784] - TypeChecked/CompileStatic: IndexOutOfBoundsException
  • [GROOVY-7793] - Compiler compiles class with private abstract method
  • [GROOVY-7798] - Sql.query methods pass java.sql.ResultSet to the closure, instead of GroovyResultSet
  • [GROOVY-7804] - @CompileStatic/@TypeChecked unexpected NullpointerException compiler bug
  • [GROOVY-7806] - @interface has too-stringent requirement for newline
  • [GROOVY-7808] - XmlSlurper unprefixed attributes should not be in the default namespace
  • [GROOVY-7810] - XmlSluper default constructor documentation about namespace aware incorrect.
  • [GROOVY-7813] - Calling a non-static outer class method from a static class passes STC
  • [GROOVY-7816] - ObservableList addAll method property change event index off by one
  • [GROOVY-7820] - CachedMethod.compareToCachedMethod throws "Should never happen"
  • [GROOVY-7822] - Redundant computation in ObservableSet
  • [GROOVY-7826] - Infinite recursion in genericTypeAsString
  • [GROOVY-7832] - NullPointerException in GroovyConsole with an input method
  • [GROOVY-7833] - exception in phase 'conversion'
  • [GROOVY-7841] - Assert fails when accessing particular primitive values with @CompileStatic
  • [GROOVY-7846] - A trait that defines a static method that uses generic return types throws "BUG! Type is null"

文檔

  • [GROOVY-7604] - traits docs diamond problem explanation

改進

  • [GROOVY-6950] - StringGroovyMethods improve performance
  • [GROOVY-7775] - JavadocAssertionTestBuilder should handle escapes needed for HTML within javadoc, e.g. @ for @ and {@code ...}

下載

 

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!