I have a class with an object which contains a list of Strings. In this class I have a runnable method where I want to access this object to add an element in his list.
However, it seems that in my runnable method, the object is not modified. No error is happening.
Also...maybe there are bits missing that would change this interpretation, but it looks like you're asking the Runnable to be executed in another thread, but then immediately checking the size of the list. Even if the Runnable is being executed correctly, there's no reason to believe that it would have been executed by the time you check it.
(I'm assuming that line 15 should be o.getList().size() or similar)
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com