ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vyacheslav Koptilin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-7193) IgniteReflectionFactory does not handle primitive data types.
Date Wed, 13 Dec 2017 15:46:02 GMT

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

Vyacheslav Koptilin updated IGNITE-7193:
----------------------------------------
    Description: 
{code:java}
public class TestClass {
    public static final int INITIAL_VALUE = 12;
    public static final int UPDATED_VALUE = 42;

    private int field = INITIAL_VALUE;

    public void setField(int value) {
        this.field = value;
    }

    public int getField() {
        return this.field;
    }

    public static void main(String[] args) {
        Map<String, Serializable> props = new HashMap<>();
        props.put("field", UPDATED_VALUE);

        IgniteReflectionFactory<ExampleNodeStartup.TestClass> factory = new IgniteReflectionFactory<>(ExampleNodeStartup.TestClass.class);
        factory.setProperties(props);

        assertEquals(UPDATED_VALUE, factory.create().getField());
    }
}
{code}


> IgniteReflectionFactory does not handle primitive data types.
> -------------------------------------------------------------
>
>                 Key: IGNITE-7193
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7193
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vyacheslav Koptilin
>            Assignee: Vyacheslav Koptilin
>            Priority: Minor
>
> {code:java}
> public class TestClass {
>     public static final int INITIAL_VALUE = 12;
>     public static final int UPDATED_VALUE = 42;
>     private int field = INITIAL_VALUE;
>     public void setField(int value) {
>         this.field = value;
>     }
>     public int getField() {
>         return this.field;
>     }
>     public static void main(String[] args) {
>         Map<String, Serializable> props = new HashMap<>();
>         props.put("field", UPDATED_VALUE);
>         IgniteReflectionFactory<ExampleNodeStartup.TestClass> factory = new IgniteReflectionFactory<>(ExampleNodeStartup.TestClass.class);
>         factory.setProperties(props);
>         assertEquals(UPDATED_VALUE, factory.create().getField());
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message