commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Hodges (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-621) ReflectionToStringBuilder.toString does not debug 3rd party object fields within 3rd party object
Date Tue, 04 May 2010 08:45:56 GMT

     [ https://issues.apache.org/jira/browse/LANG-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Philip Hodges updated LANG-621:
-------------------------------

     Issue Type: Improvement  (was: Bug)
    Description: 
{code:title=Reflect.java|borderStyle=solid}
import org.apache.commons.lang.builder.ReflectionToStringBuilder;

public class Reflect {

    public static void main(String[] args) {
        // "You can also use the builder to debug 3rd party objects:"
        // System.out.println("An object: " + ReflectionToStringBuilder.toString(anObject));

        // expected: Reflect$CompoundReflectionFieldsFixture@a83b8a[instanceInt=67890,fixture=Reflect$SimpleReflectionFieldsFixture@1d1acd3[instanceInt=67890]]
        // actual: Reflect$CompoundReflectionFieldsFixture@a83b8a[instanceInt=67890,fixture=Reflect$SimpleReflectionFieldsFixture@1d1acd3]
        System.out.println(ReflectionToStringBuilder.toString(new CompoundReflectionFieldsFixture()));
    }

    static class CompoundReflectionFieldsFixture {
        private int instanceInt = 67890;
        private SimpleReflectionFieldsFixture fixture = new SimpleReflectionFieldsFixture();
    }

    static class SimpleReflectionFieldsFixture {
        private int instanceInt = 67890;
    }

}
{code}


  was:
import org.apache.commons.lang.builder.ReflectionToStringBuilder;

public class Reflect {

    public static void main(String[] args) {
        // "You can also use the builder to debug 3rd party objects:"
        // System.out.println("An object: " + ReflectionToStringBuilder.toString(anObject));

        // expected: Reflect$CompoundReflectionFieldsFixture@a83b8a[instanceInt=67890,fixture=Reflect$SimpleReflectionFieldsFixture@1d1acd3[instanceInt=67890]]
        // actual: Reflect$CompoundReflectionFieldsFixture@a83b8a[instanceInt=67890,fixture=Reflect$SimpleReflectionFieldsFixture@1d1acd3]
        System.out.println(ReflectionToStringBuilder.toString(new CompoundReflectionFieldsFixture()));
    }

    static class CompoundReflectionFieldsFixture {
        private int instanceInt = 67890;
        private SimpleReflectionFieldsFixture fixture = new SimpleReflectionFieldsFixture();
    }

    static class SimpleReflectionFieldsFixture {
        private int instanceInt = 67890;
    }

}


       Priority: Minor  (was: Major)

> ReflectionToStringBuilder.toString does not debug 3rd party object fields within 3rd
party object
> -------------------------------------------------------------------------------------------------
>
>                 Key: LANG-621
>                 URL: https://issues.apache.org/jira/browse/LANG-621
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.builder.*
>    Affects Versions: 2.5
>            Reporter: Philip Hodges
>            Priority: Minor
>
> {code:title=Reflect.java|borderStyle=solid}
> import org.apache.commons.lang.builder.ReflectionToStringBuilder;
> public class Reflect {
>     public static void main(String[] args) {
>         // "You can also use the builder to debug 3rd party objects:"
>         // System.out.println("An object: " + ReflectionToStringBuilder.toString(anObject));
>         // expected: Reflect$CompoundReflectionFieldsFixture@a83b8a[instanceInt=67890,fixture=Reflect$SimpleReflectionFieldsFixture@1d1acd3[instanceInt=67890]]
>         // actual: Reflect$CompoundReflectionFieldsFixture@a83b8a[instanceInt=67890,fixture=Reflect$SimpleReflectionFieldsFixture@1d1acd3]
>         System.out.println(ReflectionToStringBuilder.toString(new CompoundReflectionFieldsFixture()));
>     }
>     static class CompoundReflectionFieldsFixture {
>         private int instanceInt = 67890;
>         private SimpleReflectionFieldsFixture fixture = new SimpleReflectionFieldsFixture();
>     }
>     static class SimpleReflectionFieldsFixture {
>         private int instanceInt = 67890;
>     }
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message