-
Bug
-
Resolution: Fixed
-
Major
-
OS: openSUSE 12.2 (x86_64)
1. Configure URL for monitoring similar to the following: http://som.where.com/xx/xxxxx/?param1=val1¶m2=val2¶m3=val3&_param4=-val4&_param5=1&_format=json
2. Configured to inspect URL content
3. Configured JSON path as follows: $['_list'][0]['id']
4. Observing the URLTrigger Log
Actual behavior:
====
Inspecting the content
[ERROR] - Polling error...
[ERROR] - Error message: The size between old results and new results has to be the same.
====
Expected behavior:
something similar to:
====
Inspecting the content
Capturing URL context. Waiting next schedule to check a change.
Polling complete. Took 0.73 sec.
No changes.
====
Analysis performed:
Searched for the error text in sources, identified the following block in the following file (isTriggeringBuildForContent method) as a possible source: "src\main\java\org\jenkinsci\plugins\urltrigger\content\JSONContentType.java":
====
if (results.size() != newResults.size())
====
Further code review indicated the issue might be due to the initialization of "results" member, so changed to:
====
private transient Map<String, Object> results = null;
====
rebuilt and verified with the above change - the issue no longer manifesting itself.