You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2022/09/17 14:00:04 UTC

[groovy] 01/06: assert fails because by default `@ToString` `includePackage` property is set to `true` returning package name along with object name i.e. `groovy.Element(Helium, 2)` is returned value on the right hand side

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit e0f7331de61188d7ca805beca6d5dbac72bbd742
Author: Alex Golub <a1...@gmail.com>
AuthorDate: Fri Sep 16 14:08:04 2022 +0300

    assert fails because by default `@ToString` `includePackage` property is set to `true` returning package name along with object name i.e. `groovy.Element(Helium, 2)` is returned value on the right hand side
    
    (cherry picked from commit 1fdcedb590a743a5b2cc1fec525031a2a92360cc)
---
 src/spec/doc/core-operators.adoc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/spec/doc/core-operators.adoc b/src/spec/doc/core-operators.adoc
index 78726bf59b..5a92a0ff1a 100644
--- a/src/spec/doc/core-operators.adoc
+++ b/src/spec/doc/core-operators.adoc
@@ -357,7 +357,7 @@ Groovy 3.0.0 introduces the Elvis operator, for example:
 --------------------------------------
 import groovy.transform.ToString
 
-@ToString
+@ToString(includePackage = false)
 class Element {
     String name
     int atomicNumber
@@ -1004,4 +1004,3 @@ Here is a complete list of the operators and their corresponding methods:
 | `~a`
 | a.bitwiseNegate()
 |====
-