[Yanel-dev] cleanup comments

Guillaume Déflache guillaume.deflache at wyona.com
Wed Dec 10 09:27:07 CET 2008


Hi!

First many thanks to Alec for the patch and to Michi for applying it, it
must have tedious for both!

A few comments on the big cleanup:

michi at wyona.com schrieb:
> Author: michi
> Date: 2008-12-09 16:15:58 +0100 (Tue, 09 Dec 2008)
> New Revision: 40379
> 
> Modified:
>    public/yanel/trunk/src/contributions/resources/timeline/src/java/edu/mit/simile/yanel/impl/resources/timeline/TimelineResource.java
> Log:
> use package
> 
> Modified: public/yanel/trunk/src/contributions/resources/timeline/src/java/edu/mit/simile/yanel/impl/resources/timeline/TimelineResource.java
> ===================================================================
> --- public/yanel/trunk/src/contributions/resources/timeline/src/java/edu/mit/simile/yanel/impl/resources/timeline/TimelineResource.java	2008-12-09 15:15:36 UTC (rev 40378)
> +++ public/yanel/trunk/src/contributions/resources/timeline/src/java/edu/mit/simile/yanel/impl/resources/timeline/TimelineResource.java	2008-12-09 15:15:58 UTC (rev 40379)
> @@ -165,7 +165,7 @@
>       * Get introspection for Introspectable interface
>       */
>      public String getIntrospection() throws Exception {
> -        String name = PathUtil.getName(getPath());
> +        String name = org.wyona.commons.io.PathUtil.getName(getPath());
>          StringBuffer sb = new StringBuffer("<?xml version=\"1.0\"?>");
>          sb.append("<introspection xmlns=\"http://www.wyona.org/neutron/2.0\">");

I wonder what is the rationale for this: why not use an import for
static accesses as well?
I reckon it make use of static methods or classes look even uglier,
which is probably a good idea OOP-wise, but is there a more practical
reason?


Also an unrelated question: I always use curly braces for if and else
branches, except for guards like:
if (log.isDebugEnabled()) log.debug("foo: ", foo);
...and I am tempted to do that for early returns as well, always keeping
everything on the same line to avoid mistakes.
Can we tolerate these exceptions without bothering anyone and some
static code checker?
I don't mind too much either way really, I just don't want to throw
spurious warnings onto anyone's screen! ;)

Cheers,
    Guillaume



More information about the Yanel-development mailing list