Jive Software Open Source

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Tinder
  • TINDER-45

JID#toString() doesn't handle null-values well

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.1
  • Fix Version/s: 1.2.3
  • Labels:
    None
  • Ignite Forum URL:
    http://community.igniterealtime.org/message/205426#205426
  • Acceptance Test - Add?:
    No

Description

During a recent rewrite (post 1.2 release), the toString() method of the JID class got messed up. If JIDs have no node or resource parts, the method adds 'null' instead of neglecting the part in the String representation (e.g: null@mydomain.org ).

Issue Links

is related to

Task - A task that needs to be done. OF-399 Upgrade Tinder to anything higher than version 1.2.2

  • Blocker - Blocks development and/or testing work, production could not run.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Source
  • Reviews
  • Builds
Hide
Permalink
Guus der Kinderen added a comment - 08/08/10 07:43 AM

Modified unit tests and fixed the erroneous code.

Show
Guus der Kinderen added a comment - 08/08/10 07:43 AM Modified unit tests and fixed the erroneous code.
Hide
Permalink
Kevin Day added a comment - 09/01/10 11:32 PM

This issue is also happening in toBareJID() - sorry for posting here, but I don't seem to have Create permissions in Jira to create a new issue.

This issue kills disco requests of certain types of plugins (asterisk-im, for example, winds up presenting itself with null@phone.server instead of phone.server. This causes all sorts of mayhem when the client attempts to use that JID for further requests.

public String toBareJID() {
final StringBuilder sb = new StringBuilder();
if (this.node != null) { sb.append(this.node); sb.append('@'); }
sb.append(this.domain);
return sb.toString();
}

Show
Kevin Day added a comment - 09/01/10 11:32 PM This issue is also happening in toBareJID() - sorry for posting here, but I don't seem to have Create permissions in Jira to create a new issue. This issue kills disco requests of certain types of plugins (asterisk-im, for example, winds up presenting itself with null@phone.server instead of phone.server. This causes all sorts of mayhem when the client attempts to use that JID for further requests. public String toBareJID() { final StringBuilder sb = new StringBuilder(); if (this.node != null) { sb.append(this.node); sb.append('@'); } sb.append(this.domain); return sb.toString(); }
Hide
Permalink
Guus der Kinderen added a comment - 09/02/10 03:31 PM

Bloody... you're right! I'll fix this in a bit. Thanks for reporting!

Show
Guus der Kinderen added a comment - 09/02/10 03:31 PM Bloody... you're right! I'll fix this in a bit. Thanks for reporting!
Hide
Permalink
Guus der Kinderen added a comment - 09/02/10 03:36 PM

I've committed a fix for the bare JID problem.

Show
Guus der Kinderen added a comment - 09/02/10 03:36 PM I've committed a fix for the bare JID problem.
Hide
Permalink
Kevin Day added a comment - 09/02/10 03:42 PM

heh - thanks for the quick turnaround. It took us many, many hours to track down the root cause on this (it's hard to get a full build of openfire up and running in Eclipse - I guess some day they'll Mavenize it, eh?)

Show
Kevin Day added a comment - 09/02/10 03:42 PM heh - thanks for the quick turnaround. It took us many, many hours to track down the root cause on this (it's hard to get a full build of openfire up and running in Eclipse - I guess some day they'll Mavenize it, eh?)
Hide
Permalink
Guus der Kinderen added a comment - 09/02/10 03:53 PM

I'm sorry to hear that. Issues like these shouldn't be in anything that is released, not even betas. I'm updating the tinder.jar in Openfire as-we-type. You should be able to use Openfire nightlies (did you find our Bamboo server at http://bamboo.igniterealtime.org ) starting tomorrow.

Show
Guus der Kinderen added a comment - 09/02/10 03:53 PM I'm sorry to hear that. Issues like these shouldn't be in anything that is released, not even betas. I'm updating the tinder.jar in Openfire as-we-type. You should be able to use Openfire nightlies (did you find our Bamboo server at http://bamboo.igniterealtime.org ) starting tomorrow.
Hide
Permalink
Kevin Day added a comment - 09/02/10 04:40 PM

Thanks for the bamboo link - I had not seen that. I do a ton of open source work, so I'm generally quite comfortable with checking out code and working with it - OF is just a really big project, and it takes a lot of effort to get it set up in a debugging environment. No worries - I'm delighted to have it working.

Show
Kevin Day added a comment - 09/02/10 04:40 PM Thanks for the bamboo link - I had not seen that. I do a ton of open source work, so I'm generally quite comfortable with checking out code and working with it - OF is just a really big project, and it takes a lot of effort to get it set up in a debugging environment. No worries - I'm delighted to have it working.

People

  • Assignee:
    Guus der Kinderen
    Reporter:
    Guus der Kinderen
Vote (0)
Watch (1)

Dates

  • Created:
    08/08/10 07:35 AM
    Updated:
    11/13/10 03:33 AM
    Resolved:
    09/02/10 03:36 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for igniterealtime.org. Try JIRA - bug tracking software for your team.