Antonio Gallardo wrote:
Hi:
AFAIK, the methods names should start with a lowercase char. I found some classes wich methods are Capitalized:
src/java/org/apache/cocoon/components/xpointer/parser/TokenMgrError.java
Method names should be verbs or active forms, so LexicalError() should be something like "createLexicalError()". But there's something more bad in this class: it extends Error which is intended for serious problems that a normal application should not try to handle. It really doesn't seem to be the case here, and this should be Exception or RuntimeException (which, as Error, doesn't need to be declared in the throws clause).
src/java/org/apache/cocoon/components/xpointer/parser/SimpleCharStream.java
I know this is a cosmetic change.
I already changed the protected methods to avoid breaking compatibility.
The idea to keep compatibility is deprecate the current public methods and
create new methods starting with a lowercase char. The methods starting
with uppercase will call the lowercased methods. They will be removed in a
future release (perhaps 2.1.8 or 2.2).
Honestly, I'm not sure many people use these classes directly (what for?) so IMO we don't need some deprecation plan here.
Also there is a class wich name start with a lower case:
src/blocks/itext/java/org/apache/cocoon/serialization/iTextSerializer.java
can we switch it to:
src/blocks/itext/java/org/apache/cocoon/serialization/ITextSerializer.java
Mmmh... in that case, this is the name of the "iText" product. Maybe this is an acceptable exception...
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
