A while ago, I broached the topic of code standards, and there was a certain 
amount of agreement on a few general points, none of which were terribly 
controversial. 

I want to open a similar topic: code formatting. There are a variety of 
different forms of code layout in Jena, which is not surprising for a project 
of long running and much participation. I’d like to suggest that Jena normalize 
its codebase in two very simple and pretty boring ways. These are just 
suggestions, of course. If there is agreement on one or both of them, I would 
be happy to do the work to format the current codebase to match, which, being 
entirely non-functional, shouldn’t require much review.

1) Braces and control statements and declarations: braces to be used with 
control statements only where required, and when used with either control 
statements or declarations, to open on the same line, so:

public void foo() {
// do stuff
}

instead of:

public void foo() 
{
// do stuff
}

2) Single-statement or empty declarations on one line, so:

protected Foo() { this(false) ; }
    
and not:

protected Foo() {
    this(false) ;
}

I think introducing that little bit of uniformity would make the code a little 
easier to scan and read at almost no cost. Thoughts? Diasgreements? Rotten 
tomatoes? {grin}

---
A. Soroka
The University of Virginia Library

Reply via email to