Hi!

On Tue, Jul 7, 2009 at 11:46, Michael Jakl<jakl.mich...@gmail.com> wrote:
> Hi!
>
> On Tue, Jul 7, 2009 at 11:18, Bernd Fondermann<bf_...@brainlounge.de> wrote:
>>> Take the sender address either from the "from" attribute provided in the 
>>> stanza or, if it is not present, take the JID from the initiating entity.
>>
>> I'd like to propose to move
>>  AbstractPublishSubscribeIQHandler.getFromAddress()
>> up to XMPPCoreStanzaHandler.
>
> Sure, I'd do it in the evening if you agree.

Lo and behold, there already was something like that: determineFrom. I tried to
rework it a little bit, because the logic is not exactly what I wanted. Every
change broke something, so I renamed determineFrom to extractUniqueSenderJID
(that's what it does), and extractSenderJID is the former getFromAddress
(pulled up from AbstractPublishSubscribeIQHandler).

I'm not very comfortable with the return null of extractUniqueSenderJID but
every try to change it broke something. Wouldn't it be better to just return
the bare JID if we cannot determine a unique bound resource - similar to what
extractSenderJID does?

I hope you're OK with the changes?

Michael

Ps: I also added a small comment to getFrom of Stanza to make sure future-me
knows what it does ;)

Reply via email to