maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trygve Laugstøl <trygv...@student.matnat.uio.no>
Subject RE: cvs commit: maven-components/maven-model maven.mdo
Date Thu, 03 Feb 2005 12:04:45 GMT
On Thu, 2005-02-03 at 12:53 +0100, Maczka Michal wrote:
> > ----------------------------------------------------------------------
> >    
> >   -    public List getSortedProjects( List projects ) throws Exception
> >   +    public List getSortedProjects( List projects )
> >   +    throws Exception
> 
> 
> is this really preferred way of formatting?
> 
> IMO the first version is much more readable. I only move declaration of
> exceptions to next line when 
> method signature is long (I try not to exceed 80 characters in single line).

throws Exception should always be on the next line, but indented. This
is what everyone else is using and what we've been using for ages now.

--
Trygve

> 
> In such case I also indent the code differently
> 
> 
> so in my case
> public List getSortedProjects( List projects ) throws Exception
> 
> 
> will become:
> public List getSortedProjects( List projects ) 
>             throws Exception

IIRC we indent it 4 spaces from the previous line so it will become:

public List getSortedProjects( List properties )
    throws Exception

As far as I know this is what most people use and is definitely
supported by all IDEs.

--
Trygve

> 
> 
> michal


Mime
View raw message