Hi Chris,

Thank you for reply. The device is used for medical megentic bead transferring.

The schema is Android -> Ethernet to CAN converter -> CANOpen Node … -> CANOpen 
Node. It has implemented in PC, now I’m migrating the host node program to 
Android.

I will try to send PR

Yang Lin


发件人: Christofer Dutz<mailto:christofer.d...@c-ware.de>
发送时间: 2022年1月19日 21:05
收件人: dev@plc4x.apache.org<mailto:dev@plc4x.apache.org>
主题: RE: [DISCUSS] Remove commons-beanutils dependency

HI Yang,

welcome to our little community.

That's interesting feedback. I didn't know about that. But ... Android -> PLC 
... would you mind elaborating a tiny bit on the use-case (Just out of 
curiosity)?

How about you whip up a PR and submit your first PR to the project ... that 
would make us even happier than fixing this for you :-)

Chris



-----Original Message-----
From: 杨 林 <todoub...@hotmail.com>
Sent: Mittwoch, 19. Januar 2022 13:54
To: dev@plc4x.apache.org
Subject: [DISCUSS] Remove commons-beanutils dependency

Hi all,

I’m using plc4j in Android, commons-beanutils is the only thing to obstacle me 
to do that ,because Android does not have java.beans.PropertyDescriptor.

org.apache.commons.beanutils.BeanUtils is used only in 
org.apache.plc4x.java.spi.configuration.ConfigurationFactory (Line 93 and Line 
103). I think It could be replace by simple reflect:

field.setAccessible(true);

if (field.getType() == String.class) {
    field.set(instance, valueString);
} else if ((field.getType() == boolean.class) || (field.getType() == 
Boolean.class)) {
    field.setBoolean(instance, Boolean.parseBoolean(valueString));
} else if …

Any help?

Yang Lin

Reply via email to