Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.16.2
-
None
-
OpenJDK Runtime Environment (IcedTea 2.6.4) (Arch Linux build 7.u95_2.6.4-1-x86_64)
-
Unknown
Description
I've configured a polling Facebook consumer with nearly default Spring configuration as follows:
<camel:from uri="facebook://getFeed?
reading.since=2016-01-01T00:00:00Z&
userId=myUserId&
consumer.delay=60000&
oAuthAppId=[s]&
oAuthAppSecret=[s]&
oAuthAccessToken=[s]
"/>
However, an IllegalArgument is thrown with any reading.* parameter regardless of endpoint:
java.lang.IllegalArgumentException: No matching operation for getFeed, with arguments [readingOptions, reading, userId]
On debugging, the method FacebookEndpoint.configureProperties sets two properties on the configuration object: (readingOptions, reading).
FacebookPropertiesHelper.configureReadingProperties(configuration, options);
readingOptions is a Map which is finally size 0 after all the relevant properties are extracted into the reading parameter. However, it isn't nullified.
In the subsequent method initState(), it tries to look for a method in FacebookMethodTypes with the signature:
getFeed(String userId, Reading reading)
Because readingOptions is non null, it looks for a readingOptions parameter as well which doesn't exist, throwing the Exception.
Is there a workaround I can use for the moment? Thanks!