History | Log In      
Issue Details (XML | Word | Printable)

Key: TFJ-4
Type: Bug
Status: Closed
Resolution: Fixed
Priority: Major
Assignee: Yusuke Yamamoto
Reporter: Yusuke Yamamoto
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

getDirectMessages() throws TwitterException when response contains no messages

Created: 22/Jun/07 12:13 AM   Updated: 22/Jun/07 12:19 AM
Component/s: Core
Affects Version/s: 1.0
Fix Version/s: 1.0.1

 Description  « Hide
getDirectMessages() throws TwitterException unexpectedly.
Twitter returns <nil-classes> instead of <direct-messages> when it returns empty message list.

The exception stacktrace is as follows:
twitter4j.TwitterException: Unexpected root node name:nil-classes. Expected:direct-messages. Check Twitter service availability.
at twitter4j.TwitterResponse.ensureRootNodeNameIs(TwitterResponse.java:26)
at twitter4j.DirectMessage.constructDirectMessages(DirectMessage.java:52)
at twitter4j.Twitter.getDirectMessages(Twitter.java:335)
at twitter4j.TwitterTestUnit.testGetDirectMessages(TwitterTestUnit.java:162)

 All   Comments   Change History   Subversion Commits      Sort Order:
Yusuke Yamamoto - [22/Jun/07 12:19 AM ]
Added a testcase for this issue.
Now DirectMessage, Status and User classes are <nil-class> element aware.