List Info

Thread: small modifications in rss package




small modifications in rss package
user name
2007-09-05 09:03:28
Hi Mihaï,

I don't know if you have already noticed that I have made
some little  
modification on files in :
    src/net/java/sip/communicator/impl/protocol/rss/
I am got there at random. Not really, my newly installed
netbeans 6  
(due to cvs to svn migration) pointed me by signaling some
(painless)  
warning. So I have attempted to "fix" them. That
is for the story.

Now about the changes :

   1- I have renamed RSSItemKey.java to RssItemKey.java, to
fit the  
class name which is "RssItemKey" hence I moved the
class declaration  
from
    class RssItemKey
to
    public class RssItemKey
which was not possible before because the file name was
different of  
the class name.

   2- in ContactRssImpl.java, after
         lastItem = RssItemKey.deserialize(persistentData);
I have removed
         lastItem.deserialize(persistentData);
The second line is of no effect as deserialize() is a static
method,  
and I think the aim to have persistantData deserialized in
lastItem is  
well achieved with the first line 

   3- added the method hashCode() according to informations
found in  
documentation here :  
http://java.sun.com/j2se/1.4.2/docs/api/java
/lang/Object.html#equals(java.lang.Object)
Quote :
"... it is generally necessary to override the hashCode
 method  
whenever this method [(equals method)] is overridden, so as
to  
maintain the general contract for the hashCode method, which
states  
that equal objects must have equal hash codes ..."

Please, let me know what you think on all those changes, and
if I  
missed something or made something wrong, don't hesitate to
notice so  
we can step back and/or fix.

best regards.



------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: small modifications in rss package
user name
2007-09-06 09:05:40
Hi Sympo,
I haven't got the chance to move on to SVN, as I just came
back home.
I'll try to catch up ASAP. In the mean time, see inline:
See inline:

On 9/5/07, Sympho <symphorien.wanko-tchuenteulp.u-strasbg.fr> wrote:
> Hi Mihaï,
>
> I don't know if you have already noticed that I have
made some little
> modification on files in :
>     src/net/java/sip/communicator/impl/protocol/rss/
> I am got there at random. Not really, my newly
installed netbeans 6
> (due to cvs to svn migration) pointed me by signaling
some (painless)
> warning. So I have attempted to "fix" them.
That is for the story.
>
> Now about the changes :
>
>    1- I have renamed RSSItemKey.java to
RssItemKey.java, to fit the
> class name which is "RssItemKey" hence I
moved the class declaration
> from
>     class RssItemKey
> to
>     public class RssItemKey
> which was not possible before because the file name was
different of
> the class name.

Ooops, must have slipped somehow. Thanks for fixing it (it's
strange
though, as Eclipse 3.3 didn't complain about anything).

>    2- in ContactRssImpl.java, after
>          lastItem =
RssItemKey.deserialize(persistentData);
> I have removed
>          lastItem.deserialize(persistentData);
> The second line is of no effect as deserialize() is a
static method,
> and I think the aim to have persistantData deserialized
in lastItem is
> well achieved with the first line 

Good catch. I've made some changes in the way I thought the
classes
but it seems I haven't changed everything. I suspect that
was causing
the problem Damian reported a couple of weeks ago (I don't
have the
precise URL at hand, I'll have to look into it a little
more)

>    3- added the method hashCode() according to
informations found in
> documentation here :
> http://java.sun.com/j2se/1.4.2/docs/api/java
/lang/Object.html#equals(java.lang.Object)
> Quote :
> "... it is generally necessary to override the
hashCode  method
> whenever this method [(equals method)] is overridden,
so as to
> maintain the general contract for the hashCode method,
which states
> that equal objects must have equal hash codes ..."
>
> Please, let me know what you think on all those
changes, and if I
> missed something or made something wrong, don't
hesitate to notice so
> we can step back and/or fix.
>
> best regards.

Best,
Mihai
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )