Groovy 1.7.4 和1.8.0-beta-1版本发布
程序员文章站
2022-04-03 13:22:59
...
Groovy 1.7.4 和1.8.0-beta-1版本同时发布。
Groovy 1.7.4
此版本主要是对bug的修复,还添加了新的GDK方法,如:File.renameTo(String path)等。查看1.7.4发布文档:http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=16563
Groovy 1.8.0-beta-1
此版本主要是针对1.7中bug的修复和性能的提升,1.8.0最终版将在今年年底发布。
改进:
- closures are now "callable" (inheriting from java.util.concurrent.Callable)
- new AST transformations like
- @Log to inject a logger in your classes
- @ScriptField for creating a field in a script (should be renamed to @Field in the next beta)
- @PackageScope now working also on methods and classes (not just fields as before)
- @Synchronized for providing safer synchronization semantics
- @InheritConstructors to inherit constructors, like often the case when extending exception classes
- @IndexedProperties to add JavaBeans indexed property support
- @AutoClone providing automatic cloning support to your beans
- @AutoExternalize providing automatic externalization of your POGOs
- @Canonical adding proper equals(), hashCode(), toString() methods
- @EqualsAndHashCode adding an equals() and hashCode() method
- @ToString for creating a default readable toString() method
- @TupleConstructor for adding a tuple constructor
- an additional syntax for strings, with $/.../$, to circumvent various escaping corner cases, like for example $/a/b\c$$ $//$
- new GDK methods like Map.countBy{}, Map.collectEntries{}, Date.putAt() (subscript operator), Date.updated()
- + obviously all other incremental improvements and new features
from the Groovy 1.7 branch like
- the new String methods like tr(), stripMargin(), stripIndent(), (un)expand(),
- Map's withDefault{} method,
- Closure's ncury() and rcury()
- Sql's withBatch{} and withTransaction{}
查看详细发布文档:http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=16013
上一篇: 低质量软件编程成本价格表
推荐阅读
-
三星Galaxy S21 FE跑分和发布日期曝光:骁龙/Exynos双版本
-
企业微信1.3版本发布下载:允许个人注册和使用企业微信
-
用数据库和JDBC完成控制台版本的简易新闻发布系统
-
Excel和Word 简易工具类,JEasyPoi 2.1.7 版本发布
-
TarsGo新版本发布,支持protobuf,zipkin和自定义插件
-
微信iOS 8.0.8版本发布:终于支持更换消息提示音和来电铃声
-
Wi-Fi 6 2.0版本正式发布:速度更快、延迟和功耗更低
-
Eclipse 3.7和4.1 M3版本发布
-
IPython 4.0发布:Jupyter和IPython分离后的首个版本
-
Rails 发布两个新版本:2.3.11 和 3.0.4