mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Some comments about the last VYSPER commits
Date Fri, 03 Jul 2009 23:01:42 GMT
Hi guys,

just a few comments and suggestions :

* http://svn.apache.org/viewvc?rev=790998&view=rev

tests can be defined using annotations, like :

    @Test
    public void testPublishNoSuchNode() throws Exception {

if Junit 4.4+ is used. 

Junit 4.4(+ has the big advantage to allow the use of @beforeClass and @AfterClass annotations,
allowing you to run a method before and after *all* the tests. A very powerful feature.


http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/PubsubFeatures.java?rev=791030&view=auto

...
public class PubsubFeatures {
    public static final PubsubFeature access_authorize = new PubsubFeature("access-authorize",
"The default access model is \"authorize\".", "OPTIONAL", "Nodes Access Models");
... (and all the following)

constants should be uppercased, accordingly to the current coding 
convention we are using. These lines should be :

...
public class PubsubFeatures {
    public static final PubsubFeature ACCESS_AUTHORIZE = new PubsubFeature("access-authorize",
"The default access model is \"authorize\".", "OPTIONAL", "Nodes Access Models");

That helps to keep the code consistant :

...
         infoElements.add(new Feature(NamespaceURIs.XEP0060_PUBSUB));
         infoElements.add(new Feature(PubsubFeatures.access_open.toString()));
...

Would be better as :

...
         infoElements.add(new Feature(NamespaceURIs.XEP0060_PUBSUB));
         infoElements.add(new Feature(PubsubFeatures.ACCESS_OPEN.toString()));
...



That's pretty much it, the remaining code is just fine !

Thanks!

( I wish I have time to work on vysper actively ... :/ )

-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message