knut 2004/07/11 16:31:28
Modified: framework/src/java/org/apache/hivemind/order Orderer.java
package.html
. status.xml
framework/src/test/org/apache/hivemind/order
TestOrderer.java
Log:
PR: HIVEMIND-6
Replaced use of RuntimeException with ApplicationRuntimeException.
Revision Changes Path
1.8 +7 -5
jakarta-hivemind/framework/src/java/org/apache/hivemind/order/Orderer.java
Index: Orderer.java
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/order/Orderer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Orderer.java 11 Jul 2004 16:14:37 -0000 1.7
+++ Orderer.java 11 Jul 2004 23:31:28 -0000 1.8
@@ -23,6 +23,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.hivemind.ApplicationRuntimeException;
import org.apache.hivemind.ErrorHandler;
import org.apache.hivemind.HiveMind;
import org.apache.hivemind.util.StringUtils;
@@ -220,7 +221,7 @@
if (node != _trailer)
_trailer.addDependency(node);
}
- catch (RuntimeException ex)
+ catch (ApplicationRuntimeException ex)
{
// This code is unreachable ... but nonetheless.
@@ -259,7 +260,7 @@
{
node.addDependency(prenode);
}
- catch (RuntimeException ex)
+ catch (ApplicationRuntimeException ex)
{
_errorHandler.error(_log,
OrdererMessages.dependencyCycle(_objectType,
ordering, ex),
HiveMind.getLocation(ordering.getObject()), ex);
@@ -294,7 +295,7 @@
{
postnode.addDependency(node);
}
- catch (RuntimeException ex)
+ catch (ApplicationRuntimeException ex)
{
_errorHandler.error(_log,
OrdererMessages.dependencyCycle(_objectType,
ordering, ex),
HiveMind.getLocation(ordering.getObject()), ex);
@@ -324,8 +325,9 @@
public void addDependency(Node n)
{
if (n.isReachable(this))
- throw new RuntimeException("A cycle has been detected from
the initial goal ["
- + _name + "]");
+ throw new ApplicationRuntimeException(
+ "A cycle has been detected from the initial object
[" + _name + "]",
+ HiveMind.getLocation(_object), null);
else
_dependencies.add(n);
}
1.2 +3 -4
jakarta-hivemind/framework/src/java/org/apache/hivemind/order/package.html
Index: package.html
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/order/package.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- package.html 18 Apr 2004 17:39:57 -0000 1.1
+++ package.html 11 Jul 2004 23:31:28 -0000 1.2
@@ -17,7 +17,6 @@
<body>
-Classes and interfaces for ordering objects based on dependencies. The
underlying
-approach is provided by <a href="http://werkz.codehaus.org/">Werkz</a>.
+Classes and interfaces for ordering objects based on dependencies.
- </body>
\ No newline at end of file
+</body>
\ No newline at end of file
1.22 +6 -0 jakarta-hivemind/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/jakarta-hivemind/status.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- status.xml 11 Jul 2004 17:25:05 -0000 1.21
+++ status.xml 11 Jul 2004 23:31:28 -0000 1.22
@@ -18,6 +18,9 @@
<developers>
<person name="Howard M. Lewis Ship" email="[EMAIL PROTECTED]" id="HLS" />
</developers>
+ <developers>
+ <person name="Knut Wannheden" email="[EMAIL PROTECTED]" id="KW" />
+ </developers>
<todo>
<actions priority="Release 1.0">
<action context="lib" dev="HLS">JMX Integration</action>
@@ -32,6 +35,9 @@
<changes>
<release version="1.0.beta-2" date="unreleased">
+ <action type="fix" dev="KW" fixes-bug="HIVEMIND-6">
+ Removed dependency on Werkz.
+ </action>
<action type="update" dev="HLS">
Add link to the Jakarta mailing lists page.
</action>
1.7 +5 -4
jakarta-hivemind/framework/src/test/org/apache/hivemind/order/TestOrderer.java
Index: TestOrderer.java
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/test/org/apache/hivemind/order/TestOrderer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestOrderer.java 11 Jul 2004 16:12:59 -0000 1.6
+++ TestOrderer.java 11 Jul 2004 23:31:28 -0000 1.7
@@ -20,6 +20,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.hivemind.ApplicationRuntimeException;
import org.apache.hivemind.ErrorHandler;
import org.apache.hivemind.impl.DefaultErrorHandler;
import org.easymock.AbstractMatcher;
@@ -175,9 +176,9 @@
eh.error(
LOG,
"Unable to order cartoon character 'wilma' due to dependency
cycle:"
- + " A cycle has been detected from the initial goal [wilma]",
+ + " A cycle has been detected from the initial object
[wilma]",
null,
- new RuntimeException());
+ new ApplicationRuntimeException(""));
c.setMatcher(new ExceptionAwareArgumentsMatcher());
@@ -204,9 +205,9 @@
eh.error(
LOG,
- "Unable to order cartoon character 'betty' due to dependency
cycle: A cycle has been detected from the initial goal [fred]",
+ "Unable to order cartoon character 'betty' due to dependency
cycle: A cycle has been detected from the initial object [fred]",
null,
- new RuntimeException());
+ new ApplicationRuntimeException(""));
c.setMatcher(new ExceptionAwareArgumentsMatcher());
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]