commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <brit...@apache.org>
Subject Re: svn commit: r1554633 - in /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex: ./ package.html
Date Wed, 01 Jan 2014 17:03:28 GMT
2014/1/1 Oliver Heger <oliver.heger@oliver-heger.de>

> Am 01.01.2014 17:40, schrieb Benedikt Ritter:
> > Hello Oliver,
> >
> > this looks strange to me. Exceptions should be packaged at API level, not
> > by their nature. In other words: one shoot put exceptions next to the
> > classes that throw them.
> In any case I want to avoid cyclic dependencies - there are currently a
> lot in the code base. The exceptions being defined in the top-level
> package and thrown by classes in multiple sub packages are a source of
> this.
>

I agree that cycles should be avoided in most cases. However I also think
that creating and exception package is also wrong. Think of it this way:
you wouldn't create a "class" or "interface" package to break cycles.

I'll try to have a look at configuration later this week. Maybe I see some
way to avoid the exception package while also avoiding cycles.

Benedikt


>
> Oliver
>
> >
> > Benedikt
> >
> >
> > 2014/1/1 <oheger@apache.org>
> >
> >> Author: oheger
> >> Date: Wed Jan  1 16:35:37 2014
> >> New Revision: 1554633
> >>
> >> URL: http://svn.apache.org/r1554633
> >> Log:
> >> Added a new package for exception classes.
> >>
> >> Currently, exception classes defined by this library are located in the
> >> top-level package. If sub packages throw exceptions of these types, this
> >> may
> >> cause cyclic dependencies. To avoid this, all exceptions classes are
> moved
> >> into
> >> a separate package.
> >>
> >> Added:
> >>
> >>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex/
> >>
> >>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex/package.html
> >>
> >> Added:
> >>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex/package.html
> >> URL:
> >>
> http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex/package.html?rev=1554633&view=auto
> >>
> >>
> ==============================================================================
> >> ---
> >>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex/package.html
> >> (added)
> >> +++
> >>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ex/package.html
> >> Wed Jan  1 16:35:37 2014
> >> @@ -0,0 +1,36 @@
> >> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> >> +<!--
> >> +Licensed to the Apache Software Foundation (ASF) under one or more
> >> +contributor license agreements.  See the NOTICE file distributed with
> >> +this work for additional information regarding copyright ownership.
> >> +The ASF licenses this file to You under the Apache License, Version 2.0
> >> +(the "License"); you may not use this file except in compliance with
> >> +the License.  You may obtain a copy of the License at
> >> +
> >> +     http://www.apache.org/licenses/LICENSE-2.0
> >> +
> >> +Unless required by applicable law or agreed to in writing, software
> >> +distributed under the License is distributed on an "AS IS" BASIS,
> >> +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> >> +See the License for the specific language governing permissions and
> >> +limitations under the License.
> >> +-->
> >> +<html>
> >> +<head>
> >> +</head>
> >> +<body>
> >> +
> >> +<p>
> >> +This package contains all exception classes used by this library.
> >> +</p>
> >> +<p>
> >> +<em>Commons Configuration</em> defines a small number of exception
> >> classes.
> >> +Because these classes are referenced by multiple other packages, they
> are
> >> +located in their own package to avoid cyclic dependencies.
> >> +</p>
> >> +<p>
> >> +<font size="-2">$Id$</font>
> >> +</p>
> >> +
> >> +</body>
> >> +</html>
> >>
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message