jvermillard / leshan

OMA Lightweight M2M java implementation - LWM2M
40 stars 25 forks source link

Update Resources.java #40

Closed alseddnm closed 9 years ago

alseddnm commented 9 years ago

I have added a new method to get the objectSpec from the OBJECTS map. I am using leshan API, and I had a use case where I need to get the Object Spec and resources at the time of client registration.

sbernard31 commented 9 years ago

Thx Nizar, nice catch! This is a really short and focused pull-request, we :heart: that !

_Some remarks below :_ Next time please use our formatter, available at /eclipse/eclipse-code-style.xml directory.

I rename the method used to get resource spec from getDescription() to getResourceSpec() to have a consistent naming.

I simplify the code too (the null testing is not really necessary).

For commit comment, try to make a first line sentence not too generic. Something which helps to understand what is the purpose of the commit.