[CVS nanning] Backported everything to JDK 1.3, included using ORO for regexps, reimplementing some Collections and ofcourse converting asserts to if statements

Lecando Shared <[email protected]> Fri, 5 Sep 2003 02:56:50 -0500
Newsgroups gmane.comp.java.nanning.devel
Message-ID <200309050756.h857uoU15577__43876.1715581224$1062751570@hogshead.codehaus.org>
<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffd=
d}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" rules=3D"cols">
<tr class=3D"head"><td colspan=3D"4">Commit in <b><tt>nanning</tt></b> on=
 <span id=3D"info">MAIN</span></td></tr>
<tr><td><tt><a href=3D"#file1">project.xml</a></tt></td><td align=3D"righ=
t" id=3D"added">+5</td><td></td><td nowrap=3D"nowrap" align=3D"center">1.=
61 -&gt; 1.62</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/attribute/<a href=3D"#file2">pro=
ject.xml</a></tt></td><td align=3D"right" id=3D"added">+4</td><td></td><t=
d nowrap=3D"nowrap" align=3D"center">1.5 -&gt; 1.6</td></tr>
<tr><td><tt>src/frameworks/cache/<a href=3D"#file3">project.xml</a></tt><=
/td><td align=3D"right" id=3D"added">+4</td><td></td><td nowrap=3D"nowrap=
" align=3D"center">1.5 -&gt; 1.6</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/contract/<a href=3D"#file4">proj=
ect.xml</a></tt></td><td align=3D"right" id=3D"added">+4</td><td></td><td=
 nowrap=3D"nowrap" align=3D"center">1.6 -&gt; 1.7</td></tr>
<tr><td><tt>src/frameworks/contract/src/main/org/codehaus/nanning/contrac=
t/<a href=3D"#file5">ContractInterceptor.java</a></tt></td><td align=3D"r=
ight" id=3D"added">+12</td><td align=3D"right" id=3D"removed">-12</td><td=
 nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/contract/src/test/org/codehaus/n=
anning/contract/<a href=3D"#file6">ContractInterceptorTest.java</a></tt><=
/td><td align=3D"right" id=3D"added">+3</td><td align=3D"right" id=3D"rem=
oved">-3</td><td nowrap=3D"nowrap" align=3D"center">1.2 -&gt; 1.3</td></t=
r>
<tr><td><tt>src/frameworks/definition/<a href=3D"#file7">project.xml</a><=
/tt></td><td align=3D"right" id=3D"added">+5</td><td></td><td nowrap=3D"n=
owrap" align=3D"center">1.6 -&gt; 1.7</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/definition/src/main/org/codehaus=
/nanning/definition/<a href=3D"#file8">AspectRepository.java</a></tt></td=
><td align=3D"right" id=3D"added">+6</td><td align=3D"right" id=3D"remove=
d">-3</td><td nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file9">BasicInter=
ceptor.java</a></tt></td><td align=3D"right" id=3D"added">+6</td><td alig=
n=3D"right" id=3D"removed">-6</td><td nowrap=3D"nowrap" align=3D"center">=
1.1 -&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#fil=
e10">ConfigureException.java</a></tt></td><td align=3D"right" id=3D"added=
">+5</td><td align=3D"right" id=3D"removed">-3</td><td nowrap=3D"nowrap" =
align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr><td><tt>src/frameworks/locking/<a href=3D"#file11">project.xml</a></t=
t></td><td align=3D"right" id=3D"added">+8</td><td></td><td nowrap=3D"now=
rap" align=3D"center">1.7 -&gt; 1.8</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/locking/src/main/org/codehaus/na=
nning/locking/<a href=3D"#file12">SimpleMixinAspect.java</a></tt></td><td=
 align=3D"right" id=3D"added">+5</td><td align=3D"right" id=3D"removed">-=
3</td><td nowrap=3D"nowrap" align=3D"center">1.2 -&gt; 1.3</td></tr>
<tr><td><tt>src/frameworks/prevayler/<a href=3D"#file13">project.xml</a><=
/tt></td><td align=3D"right" id=3D"added">+4</td><td></td><td nowrap=3D"n=
owrap" align=3D"center">1.6 -&gt; 1.7</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/prevayler/src/main/org/codehaus/=
nanning/prevayler/<a href=3D"#file14">BasicIdentifyingSystem.java</a></tt=
></td><td align=3D"right" id=3D"added">+18</td><td align=3D"right" id=3D"=
removed">-7</td><td nowrap=3D"nowrap" align=3D"center">1.2 -&gt; 1.3</td>=
</tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file15">Call.java</a></tt></t=
d><td align=3D"right" id=3D"added">+1</td><td align=3D"right" id=3D"remov=
ed">-1</td><td nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file16">Current=
Prevayler.java</a></tt></td><td align=3D"right" id=3D"added">+12</td><td =
align=3D"right" id=3D"removed">-4</td><td nowrap=3D"nowrap" align=3D"cent=
er">1.2 -&gt; 1.3</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file17">IdentifyingMarshaller=
.java</a></tt></td><td align=3D"right" id=3D"added">+7</td><td align=3D"r=
ight" id=3D"removed">-3</td><td nowrap=3D"nowrap" align=3D"center">1.4 -&=
gt; 1.5</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file18">InvokeC=
ommand.java</a></tt></td><td align=3D"right" id=3D"added">+9</td><td alig=
n=3D"right" id=3D"removed">-4</td><td nowrap=3D"nowrap" align=3D"center">=
1.2 -&gt; 1.3</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file19">InvokeTransaction.jav=
a</a></tt></td><td align=3D"right" id=3D"added">+9</td><td align=3D"right=
" id=3D"removed">-6</td><td nowrap=3D"nowrap" align=3D"center">1.1 -&gt; =
1.2</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file20">Marshal=
lingCall.java</a></tt></td><td align=3D"right" id=3D"added">+5</td><td al=
ign=3D"right" id=3D"removed">-4</td><td nowrap=3D"nowrap" align=3D"center=
">1.2 -&gt; 1.3</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file21">SoftMap.java</a></tt>=
</td><td align=3D"right" id=3D"added">+7</td><td align=3D"right" id=3D"re=
moved">-2</td><td nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2</td></=
tr>
<tr class=3D"alt"><td><tt>src/frameworks/prevayler/src/test/org/codehaus/=
nanning/prevayler/<a href=3D"#file22">IdentifyingMarshallerTest.java</a><=
/tt></td><td align=3D"right" id=3D"added">+1</td><td align=3D"right" id=3D=
"removed">-4</td><td nowrap=3D"nowrap" align=3D"center">1.3 -&gt; 1.4</td=
></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file23">PrevaylerTest.java</a=
></tt></td><td align=3D"right" id=3D"added">+7</td><td align=3D"right" id=
=3D"removed">-10</td><td nowrap=3D"nowrap" align=3D"center">1.7 -&gt; 1.8=
</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/profiler/<a href=3D"#file24">pro=
ject.xml</a></tt></td><td align=3D"right" id=3D"added">+4</td><td></td><t=
d nowrap=3D"nowrap" align=3D"center">1.7 -&gt; 1.8</td></tr>
<tr><td><tt>src/frameworks/profiler/src/test/org/codehaus/nanning/profile=
r/<a href=3D"#file25">ProfilerTest.java</a></tt></td><td align=3D"right" =
id=3D"added">+3</td><td align=3D"right" id=3D"removed">-1</td><td nowrap=3D=
"nowrap" align=3D"center">1.2 -&gt; 1.3</td></tr>
<tr class=3D"alt"><td><tt>src/frameworks/remote/<a href=3D"#file26">proje=
ct.xml</a></tt></td><td align=3D"right" id=3D"added">+6</td><td></td><td =
nowrap=3D"nowrap" align=3D"center">1.5 -&gt; 1.6</td></tr>
<tr><td><tt>src/frameworks/remote/src/main/org/codehaus/nanning/remote/<a=
 href=3D"#file27">ObjectTable.java</a></tt></td><td align=3D"right" id=3D=
"added">+4</td><td align=3D"right" id=3D"removed">-1</td><td nowrap=3D"no=
wrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;/<a href=3D"#file28">RMIException.java</a></tt></td><td align=3D=
"right" id=3D"added">+3</td><td align=3D"right" id=3D"removed">-1</td><td=
 nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a h=
ref=3D"#file29">RemoteAspect.java</a></tt></td><td align=3D"right" id=3D"=
added">+5</td><td align=3D"right" id=3D"removed">-7</td><td nowrap=3D"now=
rap" align=3D"center">1.3 -&gt; 1.4</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;/<a href=3D"#file30">RemoteCallServer.java</a></tt></td><td></td=
><td align=3D"right" id=3D"removed">-1</td><td nowrap=3D"nowrap" align=3D=
"center">1.2 -&gt; 1.3</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a h=
ref=3D"#file31">RemoteMarshaller.java</a></tt></td><td align=3D"right" id=
=3D"added">+13</td><td align=3D"right" id=3D"removed">-5</td><td nowrap=3D=
"nowrap" align=3D"center">1.2 -&gt; 1.3</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;/<a href=3D"#file32">SocketRemoteCallServer.java</a></tt></td><t=
d align=3D"right" id=3D"added">+7</td><td align=3D"right" id=3D"removed">=
-5</td><td nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr><td><tt>src/frameworks/remote/src/test/org/codehaus/nanning/remote/<a=
 href=3D"#file33">RemoteCallServerTest.java</a></tt></td><td align=3D"rig=
ht" id=3D"added">+1</td><td align=3D"right" id=3D"removed">-1</td><td now=
rap=3D"nowrap" align=3D"center">1.2 -&gt; 1.3</td></tr>
<tr class=3D"alt"><td><tt>src/main/org/codehaus/nanning/<a href=3D"#file3=
4"><span id=3D"added">AssertionException.java</span></a></tt></td><td ali=
gn=3D"right" id=3D"added">+10</td><td></td><td nowrap=3D"nowrap" align=3D=
"right">added 1.1</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file35">AspectExcept=
ion.java</a></tt></td><td align=3D"right" id=3D"added">+5</td><td align=3D=
"right" id=3D"removed">-3</td><td nowrap=3D"nowrap" align=3D"center">1.1 =
-&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file36=
">AspectInstance.java</a></tt></td><td align=3D"right" id=3D"added">+14</=
td><td align=3D"right" id=3D"removed">-14</td><td nowrap=3D"nowrap" align=
=3D"center">1.3 -&gt; 1.4</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file37">Mixin.java</=
a></tt></td><td align=3D"right" id=3D"added">+5</td><td align=3D"right" i=
d=3D"removed">-3</td><td nowrap=3D"nowrap" align=3D"center">1.3 -&gt; 1.4=
</td></tr>
<tr class=3D"alt"><td><tt>src/main/org/codehaus/nanning/attribute/<a href=
=3D"#file38">AttributeException.java</a></tt></td><td align=3D"right" id=3D=
"added">+3</td><td align=3D"right" id=3D"removed">-1</td><td nowrap=3D"no=
wrap" align=3D"center">1.1 -&gt; 1.2</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file39">AttributesBuilder.java</a=
></tt></td><td align=3D"right" id=3D"added">+5</td><td align=3D"right" id=
=3D"removed">-2</td><td nowrap=3D"nowrap" align=3D"center">1.1 -&gt; 1.2<=
/td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file40">ClassAttrib=
utes.java</a></tt></td><td align=3D"right" id=3D"added">+5</td><td align=3D=
"right" id=3D"removed">-1</td><td nowrap=3D"nowrap" align=3D"center">1.1 =
-&gt; 1.2</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file41">ClassPropertiesHelper.jav=
a</a></tt></td><td align=3D"right" id=3D"added">+12</td><td align=3D"righ=
t" id=3D"removed">-8</td><td nowrap=3D"nowrap" align=3D"center">1.2 -&gt;=
 1.3</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file42">PropertyFil=
eAttributeLoader.java</a></tt></td><td align=3D"right" id=3D"added">+3</t=
d><td align=3D"right" id=3D"removed">-1</td><td nowrap=3D"nowrap" align=3D=
"center">1.1 -&gt; 1.2</td></tr>
<tr><td><tt>src/main/org/codehaus/nanning/config/<a href=3D"#file43">Find=
TargetMixinAspect.java</a></tt></td><td align=3D"right" id=3D"added">+4</=
td><td align=3D"right" id=3D"removed">-1</td><td nowrap=3D"nowrap" align=3D=
"center">1.2 -&gt; 1.3</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file44">InterceptorAspect.java</a></t=
t></td><td align=3D"right" id=3D"added">+4</td><td align=3D"right" id=3D"=
removed">-2</td><td nowrap=3D"nowrap" align=3D"center">1.4 -&gt; 1.5</td>=
</tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;/<a href=3D"#file45">P.java</a></tt></td><td align=3D"right" id=3D=
"added">+3</td><td align=3D"right" id=3D"removed">-3</td><td nowrap=3D"no=
wrap" align=3D"center">1.3 -&gt; 1.4</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file46">Pointcut.java</a></tt></td><t=
d align=3D"right" id=3D"added">+2</td><td align=3D"right" id=3D"removed">=
-5</td><td nowrap=3D"nowrap" align=3D"center">1.3 -&gt; 1.4</td></tr>
<tr><td><tt>src/main/org/codehaus/nanning/samples/<a href=3D"#file47">Sto=
pWatch.java</a></tt></td><td align=3D"right" id=3D"added">+12</td><td ali=
gn=3D"right" id=3D"removed">-4</td><td nowrap=3D"nowrap" align=3D"center"=
>1.1 -&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>src/main/org/codehaus/nanning/util/<a href=3D"#=
file48"><span id=3D"added">LinkedHashSet.java</span></a></tt></td><td ali=
gn=3D"right" id=3D"added">+81</td><td></td><td nowrap=3D"nowrap" align=3D=
"right">added 1.1</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a=
 href=3D"#file49"><span id=3D"added">Matcher.java</span></a></tt></td><td=
 align=3D"right" id=3D"added">+27</td><td></td><td nowrap=3D"nowrap" alig=
n=3D"right">added 1.1</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;/<a href=3D"#file50"><span id=3D"added">OroUtils.java</span></=
a></tt></td><td align=3D"right" id=3D"added">+18</td><td></td><td nowrap=3D=
"nowrap" align=3D"right">added 1.1</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a=
 href=3D"#file51"><span id=3D"added">RegexpPattern.java</span></a></tt></=
td><td align=3D"right" id=3D"added">+30</td><td></td><td nowrap=3D"nowrap=
" align=3D"right">added 1.1</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;/<a href=3D"#file52"><span id=3D"added">WrappedException.java<=
/span></a></tt></td><td align=3D"right" id=3D"added">+51</td><td></td><td=
 nowrap=3D"nowrap" align=3D"right">added 1.1</td></tr>
<tr><td><tt>src/test/org/codehaus/nanning/attribute/<a href=3D"#file53">A=
ttributesTest.java</a></tt></td><td align=3D"right" id=3D"added">+3</td><=
td align=3D"right" id=3D"removed">-3</td><td nowrap=3D"nowrap" align=3D"c=
enter">1.1 -&gt; 1.2</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href=3D"#file54">ClassProper=
tiesHelperTest.java</a></tt></td><td align=3D"right" id=3D"added">+4</td>=
<td align=3D"right" id=3D"removed">-2</td><td nowrap=3D"nowrap" align=3D"=
center">1.2 -&gt; 1.3</td></tr>
<tr><td><tt>src/test/org/codehaus/nanning/util/<a href=3D"#file55"><span =
id=3D"added">LinkedHashSetTest.java</span></a></tt></td><td align=3D"righ=
t" id=3D"added">+48</td><td></td><td nowrap=3D"nowrap" align=3D"right">ad=
ded 1.1</td></tr>
<tr class=3D"alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;/<a href=3D"#file56"><span id=3D"added">RegexpPatternTest.java=
</span></a></tt></td><td align=3D"right" id=3D"added">+32</td><td></td><t=
d nowrap=3D"nowrap" align=3D"right">added 1.1</td></tr>
<tr><td></td><td align=3D"right" id=3D"added">+574</td><td align=3D"right=
" id=3D"removed">-150</td><td></td></tr>
</table>
<small id=3D"info">8 added + 48 modified, total 56 files</small><br />
<div class=3D"tasklist"><ul>
<li><a href=3D"#task1">TODO: fix this</a></li>
</ul></div>
<pre class=3D"comment">
Backported everything to JDK 1.3, included using ORO for regexps, reimple=
menting some Collections and ofcourse converting asserts to if statements
</pre>
<hr /><a name=3D"file1" /><div class=3D"file">
<span class=3D"pathname">nanning<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.61 -&gt; 1.62</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.61 -r1.62
--- project.xml	10 Aug 2003 16:18:17 -0000	1.61
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.62
@@ -165,6 +165,11 @@
</small></pre><pre class=3D"diff" id=3D"context">             &lt;version=
&gt;1.5.2&lt;/version&gt;
         &lt;/dependency&gt;
=20
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
+       =20
</pre><pre class=3D"diff" id=3D"context">     &lt;/dependencies&gt;
=20
     &lt;build&gt;
</pre></div>
<hr /><a name=3D"file2" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/attribute<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.5 -&gt; 1.6</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.5 -r1.6
--- project.xml	24 Jul 2003 16:46:10 -0000	1.5
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.6
@@ -41,6 +41,10 @@
</small></pre><pre class=3D"diff" id=3D"context">             &lt;version=
&gt;2.1&lt;/version&gt;
         &lt;/dependency&gt;
=20
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
</pre><pre class=3D"diff" id=3D"context">     &lt;/dependencies&gt;
=20
 &lt;/project&gt;
</pre></div>
<hr /><a name=3D"file3" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/cache<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.5 -&gt; 1.6</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.5 -r1.6
--- project.xml	10 Aug 2003 16:18:17 -0000	1.5
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.6
@@ -25,6 +25,10 @@
</small></pre><pre class=3D"diff" id=3D"context">     &lt;/developers&gt;
=20
     &lt;dependencies&gt;
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
</pre><pre class=3D"diff" id=3D"context">=20
     &lt;/dependencies&gt;
=20
</pre></div>
<hr /><a name=3D"file4" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/contract<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.6 -&gt; 1.7</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.6 -r1.7
--- project.xml	24 Jul 2003 16:46:10 -0000	1.6
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.7
@@ -31,6 +31,10 @@
</small></pre><pre class=3D"diff" id=3D"context">             &lt;version=
&gt;2.3.2&lt;/version&gt;
         &lt;/dependency&gt;
=20
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
</pre><pre class=3D"diff" id=3D"context">     &lt;/dependencies&gt;
=20
 &lt;/project&gt;
</pre></div>
<hr /><a name=3D"file5" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/contract/src/main/org/cod=
ehaus/nanning/contract<br /></span>
<div class=3D"fileheader"><big><b>ContractInterceptor.java</b></big> <sma=
ll id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- ContractInterceptor.java	4 Jul 2003 10:53:57 -0000	1.1
+++ ContractInterceptor.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -5,16 +5,16 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
</pre><pre class=3D"diff" id=3D"removed">-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
</pre><pre class=3D"diff" id=3D"context">=20
</pre><pre class=3D"diff" id=3D"removed">-import org.codehaus.nanning.Inv=
ocation;
-import org.codehaus.nanning.MethodInterceptor;
-import org.codehaus.nanning.attribute.Attributes;
</pre><pre class=3D"diff" id=3D"context"> import ognl.MethodFailedExcepti=
on;
 import ognl.Ognl;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Invoc=
ation;
+import org.codehaus.nanning.MethodInterceptor;
+import org.codehaus.nanning.attribute.Attributes;
+import org.codehaus.nanning.util.Matcher;
+import org.codehaus.nanning.util.RegexpPattern;
</pre><pre class=3D"diff" id=3D"context">=20
 /**
  * TODO document ContractInterceptor.
</pre><pre class=3D"diff"><small id=3D"info">@@ -22,12 +22,12 @@
</small></pre><pre class=3D"diff" id=3D"context">  * you can enable and d=
isable contract-checking in the same way you enable and disable assertion=
s (java -ea and so on).
  *
  * @author &lt;a href=3D"mailto:[email protected]"&gt;Jon Tirs=E9n&lt=
;/a&gt;
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  */
 public class ContractInterceptor implements MethodInterceptor {
     private static final Log logger =3D LogFactory.getLog(ContractInterc=
eptor.class);
</pre><pre class=3D"diff" id=3D"removed">-    private static final Patter=
n oldPattern =3D
-            Pattern.compile("(.*)\\{old (.*?)}(.*)");
</pre><pre class=3D"diff" id=3D"added">+    private static final RegexpPa=
ttern oldPattern =3D
+            RegexpPattern.compile("(.*)\\{old (.*?)}(.*)");
</pre><pre class=3D"diff" id=3D"context">=20
     /**
      * If this is non-null don't execute contracts, used when executing =
the expressions.
</pre><pre class=3D"diff"><small id=3D"info">@@ -98,7 +98,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         try {
             return executeExpression(expression, invocation.getProxy(), =
context);
         } catch (Exception e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new RuntimeEx=
ception("Could not execute: " + expression<span id=3D"removedchars">,</sp=
an> e);
</pre><pre class=3D"diff" id=3D"added">+            throw new RuntimeExce=
ption("Could not execute: " + expression<span id=3D"addedchars">&nbsp;+</=
span> e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -131,18 +131,18 @@
</small></pre><pre class=3D"diff" id=3D"context">                 Boolean=
 aBoolean =3D (Boolean) executeExpression(expression, root, context);
                 result =3D aBoolean.booleanValue();
                 if (!result) {
</pre><pre class=3D"diff" id=3D"removed">-                    throw new <=
span id=3D"removedchars">Assertion</span>Error(message);
</pre><pre class=3D"diff" id=3D"added">+                    throw new Err=
or(message);
</pre><pre class=3D"diff" id=3D"context">                 }
             } catch (MethodFailedException e) {
                 if (e.getReason() instanceof Error) {
                     throw (Error) e.getReason();
                 } else {
                     logger.error("Could not execute expression: " + expr=
ession);
</pre><pre class=3D"diff" id=3D"removed">-                    throw new <=
span id=3D"removedchars">Assertion</span>Error("Could not execute express=
ion: " + expression);
</pre><pre class=3D"diff" id=3D"added">+                    throw new Err=
or("Could not execute expression: " + expression);
</pre><pre class=3D"diff" id=3D"context">                 }
             } catch (Exception e) {
                 logger.error("Could not execute expression: " + expressi=
on);
</pre><pre class=3D"diff" id=3D"removed">-                throw new <span=
 id=3D"removedchars">Assertion</span>Error("Could not execute expression:=
 " + expression);
</pre><pre class=3D"diff" id=3D"added">+                throw new Error("=
Could not execute expression: " + expression);
</pre><pre class=3D"diff" id=3D"context">             } finally {
                 checkContracts.set(null);
             }
</pre></div>
<hr /><a name=3D"file6" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/contract/src/test/org/cod=
ehaus/nanning/contract<br /></span>
<div class=3D"fileheader"><big><b>ContractInterceptorTest.java</b></big> =
<small id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- ContractInterceptorTest.java	12 Jul 2003 16:48:16 -0000	1.2
+++ ContractInterceptorTest.java	5 Sep 2003 07:56:42 -0000	1.3
@@ -10,7 +10,7 @@
</small></pre><pre class=3D"diff" id=3D"context">  * TODO document Contra=
ctInterceptorTest
  *
  * @author &lt;a href=3D"mailto:[email protected]"&gt;Jon Tirs?n&lt;/=
a&gt;
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">2</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">3</span> $
</pre><pre class=3D"diff" id=3D"context">  */
 public class ContractInterceptorTest extends AbstractAttributesTest {
     public void test() throws MalformedURLException {
</pre><pre class=3D"diff"><small id=3D"info">@@ -23,7 +23,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         try {
             contract.increaseBy(-1);
             fail("call allowed with pre-condition violation");
</pre><pre class=3D"diff" id=3D"removed">-        } catch (<span id=3D"re=
movedchars">Assertion</span>Error shouldHappen) {
</pre><pre class=3D"diff" id=3D"added">+        } catch (Error shouldHapp=
en) {
</pre><pre class=3D"diff" id=3D"context">         }
=20
         contract.increaseBy(1);
</pre><pre class=3D"diff"><small id=3D"info">@@ -31,7 +31,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         try {
             contract.setValue(-1);
             fail("call did not fail with class-invariant violation");
</pre><pre class=3D"diff" id=3D"removed">-        } catch (<span id=3D"re=
movedchars">Assertion</span>Error shouldHappen) {
</pre><pre class=3D"diff" id=3D"added">+        } catch (Error shouldHapp=
en) {
</pre><pre class=3D"diff" id=3D"context">         }
     }
 }
</pre></div>
<hr /><a name=3D"file7" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/definition<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.6 -&gt; 1.7</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.6 -r1.7
--- project.xml	24 Jul 2003 16:46:10 -0000	1.6
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.7
@@ -46,6 +46,11 @@
</small></pre><pre class=3D"diff" id=3D"context">             &lt;version=
&gt;1.5&lt;/version&gt;
         &lt;/dependency&gt;
=20
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
+       =20
</pre><pre class=3D"diff" id=3D"context">     &lt;/dependencies&gt;
=20
 &lt;/project&gt;
</pre></div>
<hr /><a name=3D"file8" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/definition/src/main/org/c=
odehaus/nanning/definition<br /></span>
<div class=3D"fileheader"><big><b>AspectRepository.java</b></big> <small =
id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- AspectRepository.java	4 Jul 2003 10:53:57 -0000	1.1
+++ AspectRepository.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -16,6 +16,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.AspectFactory;
 import org.codehaus.nanning.AspectInstance;
 import org.codehaus.nanning.AspectException;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nanning.jel=
ly.AspectTagLibrary;
 import org.apache.commons.jelly.JellyContext;
 import org.apache.commons.jelly.XMLOutput;
</pre><pre class=3D"diff"><small id=3D"info">@@ -23,10 +24,10 @@
</small></pre><pre class=3D"diff" id=3D"context"> /**
  * TODO document AspectRepository
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: AspectRepositor=
y.java,v 1.<span id=3D"removedchars">1&nbsp;2003/07/04&nbsp;10:53:57</spa=
n> lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: AspectRepository.=
java,v 1.<span id=3D"addedchars">2&nbsp;2003/09/05&nbsp;07:56:42</span> l=
ecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  *=20
  * @deprecated please use the new {@link org.codehaus.nanning.config.Asp=
ectSystem} framework instead.
  */
</pre><pre class=3D"diff"><small id=3D"info">@@ -126,7 +127,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public Object newInstance(Class aspectInterface, Object[] targets) {
</pre><pre class=3D"diff" id=3D"removed">-        assert aspectInterface =
instanceof Class : "aspect-classes are identified by the interface-class =
of their first mixin";
</pre><pre class=3D"diff" id=3D"added">+        if (!(aspectInterface ins=
tanceof Class)) {
+            throw new AssertionException("aspect-classes are identified =
by the interface-class of their first mixin");
+        }
</pre><pre class=3D"diff" id=3D"context">         Object instance =3D get=
Class(aspectInterface).newInstance(targets);
         return instance;
     }
</pre></div>
<hr /><a name=3D"file9" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/definition/src/main/org/c=
odehaus/nanning/definition<br /></span>
<div class=3D"fileheader"><big><b>BasicInterceptor.java</b></big> <small =
id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- BasicInterceptor.java	4 Jul 2003 10:53:57 -0000	1.1
+++ BasicInterceptor.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -7,8 +7,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.definition;
=20
 import java.lang.reflect.Method;
</pre><pre class=3D"diff" id=3D"removed">-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
Matcher;
+import org.codehaus.nanning.util.RegexpPattern;
</pre><pre class=3D"diff" id=3D"context">=20
 import org.codehaus.nanning.attribute.Attributes;
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -16,10 +16,10 @@
</small></pre><pre class=3D"diff" id=3D"context">  * basic interceptor wi=
th methodNameFilter support.
  * TODO document BasicInterceptor
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: BasicIntercepto=
r.java,v 1.<span id=3D"removedchars">1&nbsp;2003/07/04&nbsp;10:53:57</spa=
n> lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: BasicInterceptor.=
java,v 1.<span id=3D"addedchars">2&nbsp;2003/09/05&nbsp;07:56:42</span> l=
ecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  *
  * @deprecated please use the new {@link org.codehaus.nanning.config.Asp=
ectSystem} framework instead.
  */
</pre><pre class=3D"diff"><small id=3D"info">@@ -45,7 +45,7 @@
</small></pre><pre class=3D"diff" id=3D"context">             try {
                 methodNameFilterPattern =3D Attributes.getAttribute(this=
.getClass(), METHOD_NAME_FILTER_ATTRIBUTE_NAME);
                 // qdox returns [.*] as [. ] so replace [. ] with [.*]; =
qdox should fix this or we have got to come up with a better work-around
</pre><pre class=3D"diff" id=3D"removed">-                methodNameFilte=
rPattern =3D Pattern.compile(". ").matcher(methodNameFilterPattern).repla=
ceAll(".*");
</pre><pre class=3D"diff" id=3D"added">+                methodNameFilterP=
attern =3D <span id=3D"addedchars">Regexp</span>Pattern.compile(". ").mat=
cher(methodNameFilterPattern).replaceAll(".*");
</pre><pre class=3D"diff" id=3D"context">=20
             } catch (Exception e) {
                 // bad stuff happend so let it intercept
</pre><pre class=3D"diff"><small id=3D"info">@@ -54,7 +54,7 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
         }
         if (methodNameFilterPattern !=3D null) {
</pre><pre class=3D"diff" id=3D"removed">-            Matcher m =3D Patte=
rn.compile(methodNameFilterPattern).matcher(method.getName());
</pre><pre class=3D"diff" id=3D"added">+            Matcher m =3D <span i=
d=3D"addedchars">Regexp</span>Pattern.compile(methodNameFilterPattern).ma=
tcher(method.getName());
</pre><pre class=3D"diff" id=3D"context">             return m.matches();
         }
         // no attribute specified return true.
</pre></div>
<hr /><a name=3D"file10" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/definition/src/main/org/c=
odehaus/nanning/definition<br /></span>
<div class=3D"fileheader"><big><b>ConfigureException.java</b></big> <smal=
l id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- ConfigureException.java	4 Jul 2003 10:53:57 -0000	1.1
+++ ConfigureException.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -6,17 +6,19 @@
</small></pre><pre class=3D"diff" id=3D"context">  */
 package org.codehaus.nanning.definition;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
WrappedException;
+
</pre><pre class=3D"diff" id=3D"context"> /**
  * TODO document ConfigureException
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: ConfigureExcept=
ion.java,v 1.<span id=3D"removedchars">1&nbsp;2003/07/04&nbsp;10:53:57</s=
pan> lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: ConfigureExceptio=
n.java,v 1.<span id=3D"addedchars">2&nbsp;2003/09/05&nbsp;07:56:42</span>=
 lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  *
  * @deprecated please use the new {@link org.codehaus.nanning.config.Asp=
ectSystem} framework instead.
  */
</pre><pre class=3D"diff" id=3D"removed">-public class ConfigureException=
 extends <span id=3D"removedchars">Runtime</span>Exception {
</pre><pre class=3D"diff" id=3D"added">+public class ConfigureException e=
xtends <span id=3D"addedchars">Wrapped</span>Exception {
</pre><pre class=3D"diff" id=3D"context">     public ConfigureException()=
 {
     }
=20
</pre></div>
<hr /><a name=3D"file11" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/locking<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.7 -&gt; 1.8</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.7 -r1.8
--- project.xml	24 Jul 2003 16:46:10 -0000	1.7
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.8
@@ -18,4 +18,12 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     &lt;/developers&gt;
=20
</pre><pre class=3D"diff" id=3D"added">+    &lt;dependencies&gt;
+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
+
+    &lt;/dependencies&gt;
+
</pre><pre class=3D"diff" id=3D"context"> &lt;/project&gt;
</pre></div>
<hr /><a name=3D"file12" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/locking/src/main/org/code=
haus/nanning/locking<br /></span>
<div class=3D"fileheader"><big><b>SimpleMixinAspect.java</b></big> <small=
 id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- SimpleMixinAspect.java	12 Jul 2003 16:48:16 -0000	1.2
+++ SimpleMixinAspect.java	5 Sep 2003 07:56:42 -0000	1.3
@@ -4,6 +4,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.AspectInstance;
 import org.codehaus.nanning.Mixin;
 import org.codehaus.nanning.AspectException;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 import java.util.Arrays;
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -29,9 +30,10 @@
</small></pre><pre class=3D"diff" id=3D"context">             targetClass=
 =3D targetClass.getSuperclass();
             interfaces =3D targetClass.getInterfaces();
         }
</pre><pre class=3D"diff" id=3D"removed">-        assert targetClass !=3D=
 SimpleMixinAspect.class &amp;&amp; interfaces.length =3D=3D 1 :
-                "your aspects class " + targetClass + " does not impleme=
nt exactly one interface  " + Arrays.asList(interfaces) +
-                " you have to specify the mixins interface manually usin=
g setInterfaceClass(Class)";
</pre><pre class=3D"diff" id=3D"added">+        if (targetClass =3D=3D Si=
mpleMixinAspect.class || interfaces.length !=3D 1) {
+            throw new AssertionException("your aspects class " + targetC=
lass + " does not implement exactly one interface  " + Arrays.asList(inte=
rfaces) +
+                                         " you have to specify the mixin=
s interface manually using setInterfaceClass(Class)");
+        }
</pre><pre class=3D"diff" id=3D"context">         Class interfaceClass =3D=
 interfaces[0];
         return interfaceClass;
     }
</pre></div>
<hr /><a name=3D"file13" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.6 -&gt; 1.7</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.6 -r1.7
--- project.xml	10 Aug 2003 16:18:17 -0000	1.6
+++ project.xml	5 Sep 2003 07:56:42 -0000	1.7
@@ -30,6 +30,10 @@
</small></pre><pre class=3D"diff" id=3D"context">             &lt;id&gt;p=
revayler&lt;/id&gt;
             &lt;version&gt;2.00.000-SNAPSHOT&lt;/version&gt;
         &lt;/dependency&gt;
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
</pre><pre class=3D"diff" id=3D"context">=20
     &lt;/dependencies&gt;
=20
</pre></div>
<hr /><a name=3D"file14" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>BasicIdentifyingSystem.java</b></big> <=
small id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- BasicIdentifyingSystem.java	10 Aug 2003 16:18:17 -0000	1.2
+++ BasicIdentifyingSystem.java	5 Sep 2003 07:56:42 -0000	1.3
@@ -6,6 +6,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> //import org.prevayler.=
util.clock.AbstractClockedSystem;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 public class BasicIdentifyingSystem implements IdentifyingSystem, Serial=
izable {
     private static final Log logger =3D LogFactory.getLog(BasicIdentifyi=
ngSystem.class);
</pre><pre class=3D"diff"><small id=3D"info">@@ -32,14 +33,18 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     public synchronized Object getObjectWithID(long oid) {
         Object object =3D idToObject.get(new Long(oid));
</pre><pre class=3D"diff" id=3D"removed">-        assert object !=3D null=
 : "could not find object with id " + oid;
-        assert hasObjectID(object) : "object is not registered " + objec=
t;
</pre><pre class=3D"diff" id=3D"added">+        if (object =3D=3D null) {
+            throw new AssertionException("could not find object with id =
" + oid);
+        }
</pre><pre class=3D"diff" id=3D"context">         return object;
     }
=20
     public synchronized long getObjectID(Object object) {
</pre><pre class=3D"diff" id=3D"removed">-        assert hasObjectID(obje=
ct) : "object " + object + " had no object id, use registerObjectID(Objec=
t)";
-        return ((Long) objectToId.get(object)).longValue();
</pre><pre class=3D"diff" id=3D"added">+        Long aLong =3D (Long) obj=
ectToId.get(object);
+        if (aLong =3D=3D null) {
+            throw new AssertionException("object " + object + " had no o=
bject id, use registerObjectID(Object)");
+        }
+        return aLong.longValue();
</pre><pre class=3D"diff" id=3D"context">     }
=20
     public synchronized boolean hasNoRegisteredObjects() {
</pre><pre class=3D"diff"><small id=3D"info">@@ -74,11 +79,17 @@
</small></pre><pre class=3D"diff" id=3D"context">             throw new I=
llegalStateException("You have to be inside a transaction to register obj=
ects");
         }
=20
</pre><pre class=3D"diff" id=3D"removed">-        assert object !=3D null=
 : "can't register null";
-        assert !hasObjectID(object) : "already has ID: " + object;
</pre><pre class=3D"diff" id=3D"added">+        if (object =3D=3D null) {
+            throw new AssertionException("can't register null");
+        }
+        if (hasObjectID(object)) {
+            throw new AssertionException("already has ID: " + object);
+        }
</pre><pre class=3D"diff" id=3D"context">=20
         Long id =3D getNextId();
</pre><pre class=3D"diff" id=3D"removed">-        assert !isIDRegistered(=
id.longValue());
</pre><pre class=3D"diff" id=3D"added">+        if (isIDRegistered(id.lon=
gValue())) {
+            throw new AssertionException();
+        }
</pre><pre class=3D"diff" id=3D"context">=20
         idToObject.put(id, object);
         objectToId.put(object, id);
</pre></div>
<hr /><a name=3D"file15" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>Call.java</b></big> <small id=3D"info">=
1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- Call.java	4 Jul 2003 10:53:58 -0000	1.1
+++ Call.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -36,7 +36,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         try {
             return interfaceClass.getMethod(methodName, parameterTypes);
         } catch (Exception e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new RuntimeEx=
ception("did not find method " + methodName + " returning null"<span id=3D=
"removedchars">,</span> e);
</pre><pre class=3D"diff" id=3D"added">+            throw new RuntimeExce=
ption("did not find method " + methodName + " returning null"<span id=3D"=
addedchars">&nbsp;+</span> e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre></div>
<hr /><a name=3D"file16" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>CurrentPrevayler.java</b></big> <small =
id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- CurrentPrevayler.java	10 Aug 2003 16:18:17 -0000	1.2
+++ CurrentPrevayler.java	5 Sep 2003 07:56:42 -0000	1.3
@@ -1,6 +1,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.prevayler;
=20
 import org.prevayler.Prevayler;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
WrappedException;
+import org.codehaus.nanning.AssertionException;
</pre><pre class=3D"diff" id=3D"context">=20
 import java.util.Stack;
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -22,7 +24,9 @@
</small></pre><pre class=3D"diff" id=3D"context">         } else {
             system =3D getPrevayler().prevalentSystem();
         }
</pre><pre class=3D"diff" id=3D"removed">-        assert system !=3D null=
 : "Prevayler not initialized for this thread, no current system";
</pre><pre class=3D"diff" id=3D"added">+        if (system =3D=3D null) {
+            throw new AssertionException("Prevayler not initialized for =
this thread, no current system");
+        }
</pre><pre class=3D"diff" id=3D"context">         return system;
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -36,7 +40,9 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     public static Prevayler getPrevayler() {
         Prevayler prevayler =3D (Prevayler) currentPrevayler.get();
</pre><pre class=3D"diff" id=3D"removed">-        assert prevayler !=3D n=
ull : "Prevayler not initialized for this thread, no current Prevayler";
</pre><pre class=3D"diff" id=3D"added">+        if (prevayler =3D=3D null=
) {
+            throw new AssertionException("Prevayler not initialized for =
this thread, no current Prevayler");
+        }
</pre><pre class=3D"diff" id=3D"context">         return prevayler;
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -57,7 +63,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public static void exitTransaction() {
</pre><pre class=3D"diff" id=3D"removed">-        assert isInTransaction(=
) : "not in transaction";
</pre><pre class=3D"diff" id=3D"added">+        if (!isInTransaction()) {
+            throw new AssertionException("not in transaction");
+        }
</pre><pre class=3D"diff" id=3D"context">         currentSystems().pop();
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -78,7 +86,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         } catch (Runtim=
eException e) {
             throw e;
         } catch (Exception e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new <span id=3D=
"removedchars">Runtime</span>Exception(e);
</pre><pre class=3D"diff" id=3D"added">+            throw new <span id=3D=
"addedchars">Wrapped</span>Exception(e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre></div>
<hr /><a name=3D"file17" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>IdentifyingMarshaller.java</b></big> <s=
mall id=3D"info">1.4 -&gt; 1.5</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.4 -r1.5
--- IdentifyingMarshaller.java	28 Aug 2003 12:07:01 -0000	1.4
+++ IdentifyingMarshaller.java	5 Sep 2003 07:56:42 -0000	1.5
@@ -3,6 +3,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.io.Serializ=
able;
=20
 import org.codehaus.nanning.Aspects;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 public class IdentifyingMarshaller implements Marshaller, Serializable {
     static final long serialVersionUID =3D 7285806267400465332L;
</pre><pre class=3D"diff"><small id=3D"info">@@ -12,7 +13,9 @@
</small></pre><pre class=3D"diff" id=3D"context">             return o;
=20
         } else if (PrevaylerUtils.isStatefulService(o.getClass())) {
</pre><pre class=3D"diff" id=3D"removed">-            assert o instanceof=
 Serializable : "Stateful services must be serializable";
</pre><pre class=3D"diff" id=3D"added">+            if (!(o instanceof Se=
rializable)) {
+                throw new AssertionException("Stateful services must be =
serializable");
+            }
</pre><pre class=3D"diff" id=3D"context">             return o;
=20
         } else if (PrevaylerUtils.isStatelessService(o.getClass())) {
</pre><pre class=3D"diff"><small id=3D"info">@@ -55,7 +58,6 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     private IdentifyingSystem getSystem() {
         Object system =3D CurrentPrevayler.getSystem();
</pre><pre class=3D"diff" id=3D"removed">-        assert system instanceo=
f IdentifyingSystem : "I need an identifying system to work";
</pre><pre class=3D"diff" id=3D"context">         return (IdentifyingSyst=
em) system;
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -66,7 +68,9 @@
</small></pre><pre class=3D"diff" id=3D"context">         }
         if (PrevaylerUtils.isEntity(objectClass)) {
             long oid =3D ((Long) identity.getIdentifier()).longValue();
</pre><pre class=3D"diff" id=3D"removed">-            assert getSystem().=
isIDRegistered(oid) : "object of type " + Aspects.getRealClass(objectClas=
s) + " had invalid object id " + oid;
</pre><pre class=3D"diff" id=3D"added">+            if (!getSystem().isID=
Registered(oid)) {
+                throw new AssertionException("object of type " + Aspects=
.getRealClass(objectClass) + " had invalid object id " + oid);
+            }
</pre><pre class=3D"diff" id=3D"context">             return getSystem().=
getObjectWithID(oid);
         }
         throw new IllegalArgumentException("Can't resolve objects of " +=
 objectClass);
</pre></div>
<hr /><a name=3D"file18" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>InvokeCommand.java</b></big> <small id=3D=
"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- InvokeCommand.java	10 Aug 2003 16:18:17 -0000	1.2
+++ InvokeCommand.java	5 Sep 2003 07:56:42 -0000	1.3
@@ -3,9 +3,11 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.apache.commo=
ns.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.codehaus.nanning.Invocation;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context"> import org.prevayler.Transactio=
nWithQuery;
=20
 import javax.security.auth.Subject;
</pre><pre class=3D"diff" id=3D"added">+
</pre><pre class=3D"diff" id=3D"context"> import java.lang.reflect.Invoca=
tionTargetException;
 import java.lang.reflect.Method;
 import java.util.Arrays;
</pre><pre class=3D"diff"><small id=3D"info">@@ -30,7 +32,9 @@
</small></pre><pre class=3D"diff" id=3D"context">         IdentifyingSyst=
em identifyingSystem =3D (IdentifyingSystem) system;
         if (!identifyingSystem.hasObjectID(identifyingSystem)) {
             identifyingSystem.registerObjectID(identifyingSystem);
</pre><pre class=3D"diff" id=3D"removed">-            assert identifyingS=
ystem.getObjectID(identifyingSystem) =3D=3D 0;
</pre><pre class=3D"diff" id=3D"added">+            if (identifyingSystem=
.getObjectID(identifyingSystem) !=3D 0) {
+                throw new AssertionException();
+            }
</pre><pre class=3D"diff" id=3D"context">         }
=20
         try {
</pre><pre class=3D"diff"><small id=3D"info">@@ -43,9 +47,10 @@
</small></pre><pre class=3D"diff" id=3D"context">             /** Unwrap =
the invocation target exceptions */
             if (e instanceof InvocationTargetException) {
                 InvocationTargetException invocationTargetException =3D =
(InvocationTargetException) e;
</pre><pre class=3D"diff" id=3D"removed">-                if (invocationT=
argetException.getCause() instanceof Exception) {
-                    e =3D (Exception) e.getCause();
-                }
</pre><pre class=3D"diff" id=3D"added"><a name=3D"task1" />+// <span clas=
s=3D"task">TODO</span>: fix this
+//                if (invocationTargetException.getCause() instanceof Ex=
ception) {
+//                    e =3D (Exception) e.getCause();
+//                }
</pre><pre class=3D"diff" id=3D"context">             }
             logger.error("Failed to execute command.", e);
=20
</pre></div>
<hr /><a name=3D"file19" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>InvokeTransaction.java</b></big> <small=
 id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- InvokeTransaction.java	18 Aug 2003 10:06:03 -0000	1.1
+++ InvokeTransaction.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -3,6 +3,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.apache.commo=
ns.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.codehaus.nanning.Invocation;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context"> import org.prevayler.Transactio=
nWithQuery;
=20
 import javax.security.auth.Subject;
</pre><pre class=3D"diff"><small id=3D"info">@@ -35,7 +36,7 @@
</small></pre><pre class=3D"diff" id=3D"context">             outputStrea=
m.flush();
             return bytes.toByteArray();
         } catch (IOException e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new RuntimeEx=
ception("Could not marshal call"<span id=3D"removedchars">,</span> e);
</pre><pre class=3D"diff" id=3D"added">+            throw new RuntimeExce=
ption("Could not marshal call"<span id=3D"addedchars">&nbsp;+</span> e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -45,9 +46,9 @@
</small></pre><pre class=3D"diff" id=3D"context">                     new=
 MarshallingInputStream(new ByteArrayInputStream(marshalledCall), new Ide=
ntifyingMarshaller());
             return (AuthenticatedCall) inputStream.readObject();
         } catch (IOException e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new RuntimeEx=
ception("Could not marshal call"<span id=3D"removedchars">,</span> e);
</pre><pre class=3D"diff" id=3D"added">+            throw new RuntimeExce=
ption("Could not marshal call"<span id=3D"addedchars">&nbsp;+</span> e);
</pre><pre class=3D"diff" id=3D"context">         } catch (ClassNotFoundE=
xception e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new RuntimeEx=
ception("Could not marshal call"<span id=3D"removedchars">,</span> e);
</pre><pre class=3D"diff" id=3D"added">+            throw new RuntimeExce=
ption("Could not marshal call"<span id=3D"addedchars">&nbsp;+</span> e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -76,7 +77,9 @@
</small></pre><pre class=3D"diff" id=3D"context">         IdentifyingSyst=
em identifyingSystem =3D (IdentifyingSystem) system;
         if (!identifyingSystem.hasObjectID(identifyingSystem)) {
             identifyingSystem.registerObjectID(identifyingSystem);
</pre><pre class=3D"diff" id=3D"removed">-            assert identifyingS=
ystem.getObjectID(identifyingSystem) =3D=3D 0;
</pre><pre class=3D"diff" id=3D"added">+            if (identifyingSystem=
.getObjectID(identifyingSystem) !=3D 0) {
+                throw new AssertionException();
+            }
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -84,8 +87,8 @@
</small></pre><pre class=3D"diff" id=3D"context">         /* Unwrap the I=
nvocationTargetException */
         if (e instanceof InvocationTargetException) {
             InvocationTargetException invocationTargetException =3D (Inv=
ocationTargetException) e;
</pre><pre class=3D"diff" id=3D"removed">-            if (invocationTarge=
tException.getCause() instanceof Exception) {
-                e =3D (Exception) e.getCause();
</pre><pre class=3D"diff" id=3D"added">+            if (invocationTargetE=
xception.getTargetException() instanceof Exception) {
+                e =3D (Exception) invocationTargetException.getTargetExc=
eption();
</pre><pre class=3D"diff" id=3D"context">             }
         }
         logger.error("Failed to execute command.", e);
</pre></div>
<hr /><a name=3D"file20" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>MarshallingCall.java</b></big> <small i=
d=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- MarshallingCall.java	10 Aug 2003 16:18:17 -0000	1.2
+++ MarshallingCall.java	5 Sep 2003 07:56:42 -0000	1.3
@@ -1,13 +1,11 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.prevayler;
=20
</pre><pre class=3D"diff" id=3D"removed">-import java.io.Serializable;
</pre><pre class=3D"diff" id=3D"context"> import java.security.Privileged=
ExceptionAction;
=20
 import javax.security.auth.Subject;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nanning.Inv=
ocation;
</pre><pre class=3D"diff" id=3D"removed">-import org.codehaus.nanning.pre=
vayler.AuthenticatedCall;
-import org.codehaus.nanning.prevayler.Marshaller;
</pre><pre class=3D"diff" id=3D"context">=20
 public class MarshallingCall extends AuthenticatedCall {
     static final long serialVersionUID =3D -8607314000649422353L;
</pre><pre class=3D"diff"><small id=3D"info">@@ -79,7 +77,10 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public Object getTarget() {
</pre><pre class=3D"diff" id=3D"removed">-        assert target !=3D null=
;
</pre><pre class=3D"diff" id=3D"added">+        if (target =3D=3D null) {
+            throw new AssertionException();
+        }
+
</pre><pre class=3D"diff" id=3D"context">         return unmarshal(target=
);
     }
=20
</pre></div>
<hr /><a name=3D"file21" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/main/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>SoftMap.java</b></big> <small id=3D"inf=
o">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- SoftMap.java	4 Jul 2003 10:53:58 -0000	1.1
+++ SoftMap.java	5 Sep 2003 07:56:42 -0000	1.2
@@ -7,6 +7,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.util.*;
=20
 import org.apache.commons.collections.ReferenceMap;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 public class SoftMap extends ReferenceMap implements Externalizable {
     static final long serialVersionUID =3D -7396446944555084132L;
</pre><pre class=3D"diff"><small id=3D"info">@@ -157,9 +158,13 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
         for (int i =3D 0; i &lt; num; i++) {
             Object key =3D in.readObject();
</pre><pre class=3D"diff" id=3D"removed">-            assert key !=3D nul=
l;
</pre><pre class=3D"diff" id=3D"added">+            if (key =3D=3D null) =
{
+                throw new AssertionException();
+            }
</pre><pre class=3D"diff" id=3D"context">             Object value =3D in=
.readObject();
</pre><pre class=3D"diff" id=3D"removed">-            assert value !=3D n=
ull;
</pre><pre class=3D"diff" id=3D"added">+            if (value =3D=3D null=
) {
+                throw new AssertionException();
+            }
</pre><pre class=3D"diff" id=3D"context">=20
             readBackValues.add(key);
             readBackValues.add(value);
</pre></div>
<hr /><a name=3D"file22" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/test/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>IdentifyingMarshallerTest.java</b></big=
> <small id=3D"info">1.3 -&gt; 1.4</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.3 -r1.4
--- IdentifyingMarshallerTest.java	28 Aug 2003 12:07:01 -0000	1.3
+++ IdentifyingMarshallerTest.java	5 Sep 2003 07:56:43 -0000	1.4
@@ -97,9 +97,6 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public void TODOtestUnmarshalMixedGraph() {
</pre><pre class=3D"diff" id=3D"removed">-        this.getClass().getClas=
sLoader().setDefaultAssertionStatus(true);
-        this.getClass().getClassLoader().setClassAssertionStatus(Identif=
yingMarshaller.class.getName(), true);
-
</pre><pre class=3D"diff" id=3D"context">         MyObject object1 =3D (M=
yObject) aspectSystem.newInstance(MyObject.class);
         MyObject object2 =3D (MyObject) aspectSystem.newInstance(MyObjec=
t.class);
         object1.setMyObject(object2);
</pre><pre class=3D"diff"><small id=3D"info">@@ -114,7 +111,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         try {
             marshaller.unmarshal(object1);
             fail("Should not be able to unmarshal a partially registered=
 graph");
</pre><pre class=3D"diff" id=3D"removed">-        } catch (<span id=3D"re=
movedchars">Assertion</span>Error shouldHappen) {
</pre><pre class=3D"diff" id=3D"added">+        } catch (Error shouldHapp=
en) {
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre></div>
<hr /><a name=3D"file23" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/prevayler/src/test/org/co=
dehaus/nanning/prevayler<br /></span>
<div class=3D"fileheader"><big><b>PrevaylerTest.java</b></big> <small id=3D=
"info">1.7 -&gt; 1.8</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.7 -r1.8
--- PrevaylerTest.java	18 Aug 2003 10:06:03 -0000	1.7
+++ PrevaylerTest.java	5 Sep 2003 07:56:43 -0000	1.8
@@ -1,7 +1,9 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.prevayler;
=20
</pre><pre class=3D"diff" id=3D"removed">-import org.apache.commons.colle=
ctions.CollectionUtils;
-import org.apache.commons.collections.Predicate;
</pre><pre class=3D"diff" id=3D"added">+import java.io.*;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
</pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nanning.Asp=
ectInstance;
 import org.codehaus.nanning.Aspects;
 import org.codehaus.nanning.Mixin;
</pre><pre class=3D"diff"><small id=3D"info">@@ -11,11 +13,6 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.config.FindTargetMixinAspect;
 import org.prevayler.PrevaylerFactory;
=20
</pre><pre class=3D"diff" id=3D"removed">-import java.io.*;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.IdentityHashMap;
-
</pre><pre class=3D"diff" id=3D"context"> public class PrevaylerTest exte=
nds AbstractAttributesTest {
=20
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -428,7 +425,7 @@
</small></pre><pre class=3D"diff" id=3D"context">     public void testSer=
ialization() throws IOException, ClassNotFoundException {
         MyObject myObject =3D (MyObject) aspectSystem.newInstance(MyObje=
ct.class);
         myObject.setValue("value");
</pre><pre class=3D"diff" id=3D"removed">-        IdentityHashMap identit=
yHashMap =3D new IdentityHashMap();
</pre><pre class=3D"diff" id=3D"added">+        HashMap identityHashMap =3D=
 new HashMap();
</pre><pre class=3D"diff" id=3D"context">         identityHashMap.put(myO=
bject, new Long(1));
=20
         ByteArrayOutputStream outputStream =3D new ByteArrayOutputStream=
();
</pre><pre class=3D"diff"><small id=3D"info">@@ -436,7 +433,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         objectOutputStr=
eam.writeObject(identityHashMap);
         objectOutputStream.close();
         ObjectInputStream objectInputStream =3D new ObjectInputStream(ne=
w ByteArrayInputStream(outputStream.toByteArray()));
</pre><pre class=3D"diff" id=3D"removed">-        identityHashMap =3D (<s=
pan id=3D"removedchars">Identity</span>HashMap) objectInputStream.readObj=
ect();
</pre><pre class=3D"diff" id=3D"added">+        identityHashMap =3D (Hash=
Map) objectInputStream.readObject();
</pre><pre class=3D"diff" id=3D"context">=20
         myObject =3D (MyObject) identityHashMap.keySet().iterator().next=
();
         assertEquals("value", myObject.getValue());
</pre><pre class=3D"diff"><small id=3D"info">@@ -467,7 +464,7 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     private void newPrevayler() throws IOException, ClassNotFoundExcepti=
on {
         currentPrevayler =3D new CountingPrevayler(
</pre><pre class=3D"diff" id=3D"removed">-                PrevaylerFactor=
y.createPrevayler(Aspects.getCurrentAspectFactory().newInstance(MySystem.=
class),
</pre><pre class=3D"diff" id=3D"added">+                PrevaylerFactory.=
createPrevayler(<span id=3D"addedchars">(Serializable)&nbsp;</span>Aspect=
s.getCurrentAspectFactory().newInstance(MySystem.class),
</pre><pre class=3D"diff" id=3D"context">                         prevayl=
erDir.getAbsolutePath()));
     }
=20
</pre></div>
<hr /><a name=3D"file24" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/profiler<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.7 -&gt; 1.8</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.7 -r1.8
--- project.xml	24 Jul 2003 16:46:11 -0000	1.7
+++ project.xml	5 Sep 2003 07:56:43 -0000	1.8
@@ -29,6 +29,10 @@
</small></pre><pre class=3D"diff" id=3D"context">     &lt;/developers&gt;
=20
     &lt;dependencies&gt;
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
</pre><pre class=3D"diff" id=3D"context">=20
     &lt;/dependencies&gt;
=20
</pre></div>
<hr /><a name=3D"file25" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/profiler/src/test/org/cod=
ehaus/nanning/profiler<br /></span>
<div class=3D"fileheader"><big><b>ProfilerTest.java</b></big> <small id=3D=
"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- ProfilerTest.java	12 Jul 2003 12:58:34 -0000	1.2
+++ ProfilerTest.java	5 Sep 2003 07:56:43 -0000	1.3
@@ -6,6 +6,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.profiler.ProfilerInterceptor;
 import org.codehaus.nanning.profiler.ProfilerLogger;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
OroUtils;
+
</pre><pre class=3D"diff" id=3D"context"> public class ProfilerTest exten=
ds AbstractAttributesTest {
     public void testProfiler() throws Exception {
         Thread thread =3D new Thread(new Runnable() {
</pre><pre class=3D"diff"><small id=3D"info">@@ -24,7 +26,7 @@
</small></pre><pre class=3D"diff" id=3D"context">         thread.join();
         String log =3D ProfilerLogger.getProfilerLogger().lastLog;
         assertNotNull(log);
</pre><pre class=3D"diff" id=3D"removed">-        assertTrue(<span id=3D"=
removedchars">log.matches(</span>"(.*)someMethod: (.*)ms"));
</pre><pre class=3D"diff" id=3D"added">+        assertTrue(<span id=3D"ad=
dedchars">OroUtils.match(log,&nbsp;</span>"(.*)someMethod: (.*)ms"));
</pre><pre class=3D"diff" id=3D"context">     }
=20
     public void testMinimumProfilingDuration() throws Exception {
</pre></div>
<hr /><a name=3D"file26" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote<br /></span>
<div class=3D"fileheader"><big><b>project.xml</b></big> <small id=3D"info=
">1.5 -&gt; 1.6</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.5 -r1.6
--- project.xml	10 Aug 2003 16:18:18 -0000	1.5
+++ project.xml	5 Sep 2003 07:56:43 -0000	1.6
@@ -42,6 +42,12 @@
</small></pre><pre class=3D"diff" id=3D"context">             &lt;version=
&gt;1.3.2&lt;/version&gt;
         &lt;/dependency&gt;
=20
</pre><pre class=3D"diff" id=3D"added">+        &lt;dependency&gt;
+            &lt;id&gt;oro&lt;/id&gt;
+            &lt;version&gt;2.0.7&lt;/version&gt;
+        &lt;/dependency&gt;
+       =20
+
</pre><pre class=3D"diff" id=3D"context">     &lt;/dependencies&gt;
=20
 &lt;/project&gt;
</pre></div>
<hr /><a name=3D"file27" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/main/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>ObjectTable.java</b></big> <small id=3D=
"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- ObjectTable.java	4 Jul 2003 10:53:58 -0000	1.1
+++ ObjectTable.java	5 Sep 2003 07:56:43 -0000	1.2
@@ -2,6 +2,7 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 import java.util.HashMap;
 import java.util.Iterator;
</pre><pre class=3D"diff"><small id=3D"info">@@ -29,7 +30,9 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     Object getFromID(Object id) {
         LocalReference o =3D (LocalReference) idToReference.get(id);
</pre><pre class=3D"diff" id=3D"removed">-        assert o !=3D null;
</pre><pre class=3D"diff" id=3D"added">+        if (o =3D=3D null) {
+            throw new AssertionException();
+        }
</pre><pre class=3D"diff" id=3D"context">         o.touch();
         cleanupStale();
         return o.getReferred();
</pre></div>
<hr /><a name=3D"file28" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/main/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>RMIException.java</b></big> <small id=3D=
"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- RMIException.java	4 Jul 2003 10:53:58 -0000	1.1
+++ RMIException.java	5 Sep 2003 07:56:43 -0000	1.2
@@ -1,6 +1,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.remote;
=20
</pre><pre class=3D"diff" id=3D"removed">-public class RMIException exten=
ds RuntimeException {
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
WrappedException;
+
+public class RMIException extends WrappedException {
</pre><pre class=3D"diff" id=3D"context">     public RMIException() {
     }
=20
</pre></div>
<hr /><a name=3D"file29" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/main/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>RemoteAspect.java</b></big> <small id=3D=
"info">1.3 -&gt; 1.4</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.3 -r1.4
--- RemoteAspect.java	18 Aug 2003 10:06:04 -0000	1.3
+++ RemoteAspect.java	5 Sep 2003 07:56:43 -0000	1.4
@@ -2,10 +2,7 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
 import java.io.IOException;
=20
</pre><pre class=3D"diff" id=3D"removed">-import org.codehaus.nanning.Asp=
ectInstance;
-import org.codehaus.nanning.Invocation;
-import org.codehaus.nanning.MethodInterceptor;
-import org.codehaus.nanning.Mixin;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.*;
</pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nanning.rem=
ote.CouldNotConnectException;
 import org.codehaus.nanning.remote.ExceptionThrown;
 import org.codehaus.nanning.prevayler.MarshallingInputStream;
</pre><pre class=3D"diff"><small id=3D"info">@@ -19,9 +16,10 @@
</small></pre><pre class=3D"diff" id=3D"context">     private Marshaller =
marshaller;
=20
     public Object invoke(Invocation invocation) throws Throwable {
</pre><pre class=3D"diff" id=3D"removed">-        assert invocation.getTa=
rget() instanceof RemoteIdentity :
-                "target is not remote-reference: " + invocation.getTarge=
t();
-       =20
</pre><pre class=3D"diff" id=3D"added">+        if (!(invocation.getTarge=
t() instanceof RemoteIdentity)) {
+            throw new AssertionException("target is not remote-reference=
: " + invocation.getTarget());
+        }
+
</pre><pre class=3D"diff" id=3D"context">         RemoteIdentity remoteId=
entity =3D (RemoteIdentity) invocation.getTarget();
=20
         ServerConnectionManager connectionManager =3D remoteIdentity.get=
ConnectionManager();
</pre></div>
<hr /><a name=3D"file30" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/main/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>RemoteCallServer.java</b></big> <small =
id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- RemoteCallServer.java	18 Aug 2003 10:06:04 -0000	1.2
+++ RemoteCallServer.java	5 Sep 2003 07:56:43 -0000	1.3
@@ -53,7 +53,6 @@
</small></pre><pre class=3D"diff" id=3D"context">                 output.=
writeObject(result);
             } catch (NotSerializableException e) {
                 String message =3D "Could not serialize object with clas=
s " + result.getClass();
</pre><pre class=3D"diff" id=3D"removed">-                assert false : =
message;
</pre><pre class=3D"diff" id=3D"context">                 logger.fatal(me=
ssage);
             }
             output.flush();
</pre></div>
<hr /><a name=3D"file31" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/main/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>RemoteMarshaller.java</b></big> <small =
id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- RemoteMarshaller.java	12 Jul 2003 16:48:16 -0000	1.2
+++ RemoteMarshaller.java	5 Sep 2003 07:56:43 -0000	1.3
@@ -6,6 +6,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.AspectInstance;
 import org.codehaus.nanning.Aspects;
 import org.codehaus.nanning.Mixin;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nanning.rem=
ote.ObjectTable;
 import org.codehaus.nanning.remote.RemoteAspect;
 import org.codehaus.nanning.remote.RemoteIdentity;
</pre><pre class=3D"diff"><small id=3D"info">@@ -92,9 +93,12 @@
</small></pre><pre class=3D"diff" id=3D"context">                        =
                   connectionManager);
             }
         } else {
</pre><pre class=3D"diff" id=3D"removed">-            assert Aspects.isAs=
pectObject(o) ? !isRemoteStub(o) : true
-                    : o + " was remote stub but did not have 'remote'-at=
tribute";
-            assert !(o instanceof RemoteIdentity);
</pre><pre class=3D"diff" id=3D"added">+            if (!(Aspects.isAspec=
tObject(o) ? !isRemoteStub(o) : true)) {
+                throw new AssertionException(o + " was remote stub but d=
id not have 'remote'-attribute");
+            }
+            if (o instanceof RemoteIdentity) {
+                throw new AssertionException();
+            }
</pre><pre class=3D"diff" id=3D"context">         }
=20
         return o;
</pre><pre class=3D"diff"><small id=3D"info">@@ -115,9 +119,13 @@
</small></pre><pre class=3D"diff" id=3D"context">     private static Obje=
ct getSingleMixinTarget(Object o) {
         Collection mixins =3D Aspects.getAspectInstance(o).getMixins();
         Iterator iterator =3D mixins.iterator();
</pre><pre class=3D"diff" id=3D"removed">-        assert iterator.hasNext=
() : o + " doesn't have any mixins";
</pre><pre class=3D"diff" id=3D"added">+        if (!iterator.hasNext()) =
{
+            throw new AssertionException(o + " doesn't have any mixins")=
;
+        }
</pre><pre class=3D"diff" id=3D"context">         Mixin mixinInstance =3D=
 (Mixin) iterator.next();
</pre><pre class=3D"diff" id=3D"removed">-        assert !iterator.hasNex=
t() : "don't support several mixins";
</pre><pre class=3D"diff" id=3D"added">+        if (iterator.hasNext()) {
+            throw new AssertionException("don't support several mixins")=
;
+        }
</pre><pre class=3D"diff" id=3D"context">=20
         Object target =3D mixinInstance.getTarget();
         return target;
</pre></div>
<hr /><a name=3D"file32" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/main/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>SocketRemoteCallServer.java</b></big> <=
small id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- SocketRemoteCallServer.java	4 Jul 2003 10:53:58 -0000	1.1
+++ SocketRemoteCallServer.java	5 Sep 2003 07:56:43 -0000	1.2
@@ -4,13 +4,14 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.net.InetAdd=
ress;
 import java.net.ServerSocket;
 import java.net.Socket;
</pre><pre class=3D"diff" id=3D"removed">-import java.net.SocketTimeoutEx=
ception;
</pre><pre class=3D"diff" id=3D"context"> import java.security.Privileged=
Action;
 import java.util.HashSet;
=20
 import javax.security.auth.Subject;
=20
 import org.codehaus.nanning.AspectFactory;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
+import org.codehaus.nanning.util.WrappedException;
</pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nanning.rem=
ote.RemoteCallServer;
 import org.codehaus.nanning.remote.SocketConnectionManager;
 import EDU.oswego.cs.dl.util.concurrent.PooledExecutor;
</pre><pre class=3D"diff"><small id=3D"info">@@ -32,10 +33,12 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     public void start() {
         try {
</pre><pre class=3D"diff" id=3D"removed">-            assert port !=3D 0 =
: "port not specified";
</pre><pre class=3D"diff" id=3D"added">+            if (port =3D=3D 0) {
+                throw new AssertionException("port not specified");
+            }
</pre><pre class=3D"diff" id=3D"context">             logger.info("starti=
ng RMI-server on port " + port);
             serverSocket =3D new ServerSocket(port);
</pre><pre class=3D"diff" id=3D"removed">-            connectionManager =3D=
 new SocketConnectionManager(InetAddress.getLocalHost().get<span id=3D"re=
movedchars">Canonical</span>HostName(), port);
</pre><pre class=3D"diff" id=3D"added">+            connectionManager =3D=
 new SocketConnectionManager(InetAddress.getLocalHost().getHostName(), po=
rt);
</pre><pre class=3D"diff" id=3D"context">             remoteCallServer =3D=
 new RemoteCallServer(connectionManager);
             serverSocket.setSoTimeout(SERVER_SOCKET_TIMEOUT);
             threadPool =3D new PooledExecutor(threadPoolSize);
</pre><pre class=3D"diff"><small id=3D"info">@@ -49,7 +52,6 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
                                 threadPool.execute(new SocketCallProcess=
or(socket));
=20
</pre><pre class=3D"diff" id=3D"removed">-                            } c=
atch (SocketTimeoutException ignore) {
</pre><pre class=3D"diff" id=3D"context">                             } c=
atch (InterruptedException ignore) {
                             } catch (IOException e) {
                                 logger.error("error accepting call", e);
</pre><pre class=3D"diff"><small id=3D"info">@@ -66,7 +68,7 @@
</small></pre><pre class=3D"diff" id=3D"context">             });
             serverThread.start();
         } catch (IOException e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new <span id=3D=
"removedchars">Runtime</span>Exception(e);
</pre><pre class=3D"diff" id=3D"added">+            throw new <span id=3D=
"addedchars">Wrapped</span>Exception(e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre></div>
<hr /><a name=3D"file33" /><div class=3D"file">
<span class=3D"pathname">nanning/src/frameworks/remote/src/test/org/codeh=
aus/nanning/remote<br /></span>
<div class=3D"fileheader"><big><b>RemoteCallServerTest.java</b></big> <sm=
all id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- RemoteCallServerTest.java	10 Aug 2003 16:18:18 -0000	1.2
+++ RemoteCallServerTest.java	5 Sep 2003 07:56:43 -0000	1.3
@@ -1 +1 @@
</small></pre><pre class=3D"diff" id=3D"removed">-package org.codehaus.na=
nning.remote;


import org.codehaus.nanning.Aspects;
import org.codehaus.nanning.attribute.AbstractAttributesTest;
import org.codehaus.nanning.config.AspectSystem;
import org.codehaus.nanning.config.FindTargetMixinAspect;
import org.codehaus.nanning.prevayler.CurrentPrevayler;
import org.codehaus.nanning.prevayler.PrevaylerAspect;
import org.prevayler.Prevayler;
import org.prevayler.PrevaylerFactory;

import javax.security.auth.Subject;
import java.io.File;
import java.io.IOException;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Collection;
import java.util.HashSet;


public class RemoteCallServerTest extends AbstractAttributesTest {
    private AspectSystem serverAspectSystem;
    private File prevaylerDir;
    private int port =3D 12346;
    private Prevayler prevayler;
    private SocketRemoteCallServer remoteCallServer;
    private RemoteMarshaller clientMarshaller;


    protected void setUp() throws Exception {
        super.setUp();
        prevaylerDir =3D File.createTempFile("test", "");
        prevaylerDir.delete();
        prevaylerDir.deleteOnExit();
        prevaylerDir.mkdirs();

        serverAspectSystem =3D new AspectSystem();
        serverAspectSystem.addAspect(new FindTargetMixinAspect());
        serverAspectSystem.addAspect(new PrevaylerAspect());

        clientMarshaller =3D RemoteMarshaller.createClientSideMarshaller(=
);

        // init server side

        Aspects.setContextAspectFactory(serverAspectSystem);
        prevayler =3D PrevaylerFactory.createPrevayler(serverAspectSystem=
.newInstance(MySystem.class),
                prevaylerDir.getAbsolutePath());

        remoteCallServer =3D new SocketRemoteCallServer();
        remoteCallServer.setPort(port);

        CurrentPrevayler.withPrevayler(prevayler, new Runnable() {
            public void run() {
                // start server, server-threads will inherit the prevayle=
r and the context-aspect-factory from this thread
                remoteCallServer.start();
                remoteCallServer.setAspectFactory(serverAspectSystem);
            }
        });
    }

    protected void tearDown() throws Exception {
        super.tearDown();
        remoteCallServer.stop();
    }

    public void testAuthenticatedCall() throws PrivilegedActionException =
{
        assertTrue("attributes were not compiled", RemoteMarshaller.isRem=
ote(MyStatelessService.class));

        // server side
        remoteCallServer.bind("MyStatelessService", serverAspectSystem.ne=
wInstance(MyStatelessService.class));

        // client side
        Subject.doAs(new Subject(false, new HashSet(), new HashSet(), new=
 HashSet()), new PrivilegedExceptionAction() {
            public Object run() throws Exception {
                Subject subject =3D Subject.getSubject(AccessController.g=
etContext());
                subject.getPrincipals().add(new MyPrincipal("expectedUser=
Name"));

                Naming naming =3D new Naming(clientMarshaller, new Socket=
ConnectionManager("localhost", port));
                MyStatelessService myService =3D (MyStatelessService) nam=
ing.lookup("MyStatelessService");

                myService.authenticatedCall("expectedUserName");

                return null;
            }
        });
    }


    public void testStatelessRemoteCall() throws IOException, ClassNotFou=
ndException {
        assertTrue("attributes were not compiled properly", RemoteMarshal=
ler.isRemote(MyStatelessService.class));
        assertTrue("attributes were not compiled properly", RemoteMarshal=
ler.isRemote(MyObject.class));

        // server side
        remoteCallServer.bind("MyStatelessService", serverAspectSystem.ne=
wInstance(MyStatelessService.class));

        // client side
        Naming naming =3D new Naming(clientMarshaller, new SocketConnecti=
onManager("localhost", port));
        MyStatelessService myService =3D (MyStatelessService) naming.look=
up("MyStatelessService");
        {
            myService.createObject("attributeValue");
        }

        {
            MyObject myObject =3D myService.getMyObject();
            String value =3D myObject.getValue();
            assertEquals("attributeValue", value);
        }

        {
            Collection col =3D myService.getAllObjects();
            assertEquals(1, col.size());
            MyObject[] myObjects =3D (MyObject[]) col.toArray(new MyObjec=
t[1]);
            MyObject myObject =3D myObjects[0];
            String value =3D myObject.getValue();
            assertEquals("attributeValue", value);
        }

        // server side
        CurrentPrevayler.withPrevayler(prevayler, new Runnable() {
            public void run() {
                MySystem system =3D (MySystem) CurrentPrevayler.getSystem=
();

                // server side
                assertNotNull("object not created on server side", system=
.getMyObject());
                assertEquals("attribute wrong value", "attributeValue", s=
ystem.getMyObject().getValue());
            }
        });
    }

    public void testStatefulRemoteCall() throws IOException, ClassNotFoun=
dException {
        // server side
        remoteCallServer.bind("MyStatefulService", serverAspectSystem.new=
Instance(MyStatefulService.class));

        // client side
        MyStatefulService statefulService =3D (MyStatefulService) new Nam=
ing(clientMarshaller, new SocketConnectionManager("localhost", port)).loo=
kup("MyStatefulService");
        assertNull(statefulService.value());
        statefulService.modify("value");
        assertEquals("value", statefulService.value());
    }
}
</pre><pre class=3D"diff"><small id=3D"info">\ No newline at end of file
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.remote;


import org.codehaus.nanning.Aspects;
import org.codehaus.nanning.attribute.AbstractAttributesTest;
import org.codehaus.nanning.config.AspectSystem;
import org.codehaus.nanning.config.FindTargetMixinAspect;
import org.codehaus.nanning.prevayler.CurrentPrevayler;
import org.codehaus.nanning.prevayler.PrevaylerAspect;
import org.prevayler.Prevayler;
import org.prevayler.PrevaylerFactory;

import javax.security.auth.Subject;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Collection;
import java.util.HashSet;


public class RemoteCallServerTest extends AbstractAttributesTest {
    private AspectSystem serverAspectSystem;
    private File prevaylerDir;
    private int port =3D 12346;
    private Prevayler prevayler;
    private SocketRemoteCallServer remoteCallServer;
    private RemoteMarshaller clientMarshaller;


    protected void setUp() throws Exception {
        super.setUp();
        prevaylerDir =3D File.createTempFile("test", "");
        prevaylerDir.delete();
        prevaylerDir.deleteOnExit();
        prevaylerDir.mkdirs();

        serverAspectSystem =3D new AspectSystem();
        serverAspectSystem.addAspect(new FindTargetMixinAspect());
        serverAspectSystem.addAspect(new PrevaylerAspect());

        clientMarshaller =3D RemoteMarshaller.createClientSideMarshaller(=
);

        // init server side

        Aspects.setContextAspectFactory(serverAspectSystem);
        prevayler =3D PrevaylerFactory.createPrevayler((Serializable) ser=
verAspectSystem.newInstance(MySystem.class),
                prevaylerDir.getAbsolutePath());

        remoteCallServer =3D new SocketRemoteCallServer();
        remoteCallServer.setPort(port);

        CurrentPrevayler.withPrevayler(prevayler, new Runnable() {
            public void run() {
                // start server, server-threads will inherit the prevayle=
r and the context-aspect-factory from this thread
                remoteCallServer.start();
                remoteCallServer.setAspectFactory(serverAspectSystem);
            }
        });
    }

    protected void tearDown() throws Exception {
        super.tearDown();
        remoteCallServer.stop();
    }

    public void testAuthenticatedCall() throws PrivilegedActionException =
{
        assertTrue("attributes were not compiled", RemoteMarshaller.isRem=
ote(MyStatelessService.class));

        // server side
        remoteCallServer.bind("MyStatelessService", serverAspectSystem.ne=
wInstance(MyStatelessService.class));

        // client side
        Subject.doAs(new Subject(false, new HashSet(), new HashSet(), new=
 HashSet()), new PrivilegedExceptionAction() {
            public Object run() throws Exception {
                Subject subject =3D Subject.getSubject(AccessController.g=
etContext());
                subject.getPrincipals().add(new MyPrincipal("expectedUser=
Name"));

                Naming naming =3D new Naming(clientMarshaller, new Socket=
ConnectionManager("localhost", port));
                MyStatelessService myService =3D (MyStatelessService) nam=
ing.lookup("MyStatelessService");

                myService.authenticatedCall("expectedUserName");

                return null;
            }
        });
    }


    public void testStatelessRemoteCall() throws IOException, ClassNotFou=
ndException {
        assertTrue("attributes were not compiled properly", RemoteMarshal=
ler.isRemote(MyStatelessService.class));
        assertTrue("attributes were not compiled properly", RemoteMarshal=
ler.isRemote(MyObject.class));

        // server side
        remoteCallServer.bind("MyStatelessService", serverAspectSystem.ne=
wInstance(MyStatelessService.class));

        // client side
        Naming naming =3D new Naming(clientMarshaller, new SocketConnecti=
onManager("localhost", port));
        MyStatelessService myService =3D (MyStatelessService) naming.look=
up("MyStatelessService");
        {
            myService.createObject("attributeValue");
        }

        {
            MyObject myObject =3D myService.getMyObject();
            String value =3D myObject.getValue();
            assertEquals("attributeValue", value);
        }

        {
            Collection col =3D myService.getAllObjects();
            assertEquals(1, col.size());
            MyObject[] myObjects =3D (MyObject[]) col.toArray(new MyObjec=
t[1]);
            MyObject myObject =3D myObjects[0];
            String value =3D myObject.getValue();
            assertEquals("attributeValue", value);
        }

        // server side
        CurrentPrevayler.withPrevayler(prevayler, new Runnable() {
            public void run() {
                MySystem system =3D (MySystem) CurrentPrevayler.getSystem=
();

                // server side
                assertNotNull("object not created on server side", system=
.getMyObject());
                assertEquals("attribute wrong value", "attributeValue", s=
ystem.getMyObject().getValue());
            }
        });
    }

    public void testStatefulRemoteCall() throws IOException, ClassNotFoun=
dException {
        // server side
        remoteCallServer.bind("MyStatefulService", serverAspectSystem.new=
Instance(MyStatefulService.class));

        // client side
        MyStatefulService statefulService =3D (MyStatefulService) new Nam=
ing(clientMarshaller, new SocketConnectionManager("localhost", port)).loo=
kup("MyStatefulService");
        assertNull(statefulService.value());
        statefulService.modify("value");
        assertEquals("value", statefulService.value());
    }
}
</pre><pre class=3D"diff"><small id=3D"info">\ No newline at end of file
</small></pre></div>
<hr /><a name=3D"file34" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/main/org/codehaus/nanni=
ng<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>AssertionException.java</b=
></big> <small id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N AssertionException.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ AssertionException.java	5 Sep 2003 07:56:43 -0000	1.1
@@ -0,0 +1,10 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing;
+
+public class AssertionException extends RuntimeException {
+    public AssertionException(String reason) {
+        super(reason);
+    }
+
+    public AssertionException() {  =20
+    }
+}
</pre></div>
<hr /><a name=3D"file35" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning<br /></spa=
n>
<div class=3D"fileheader"><big><b>AspectException.java</b></big> <small i=
d=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- AspectException.java	4 Jul 2003 10:53:59 -0000	1.1
+++ AspectException.java	5 Sep 2003 07:56:43 -0000	1.2
@@ -7,15 +7,17 @@
</small></pre><pre class=3D"diff" id=3D"context">  */
 package org.codehaus.nanning;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
WrappedException;
+
</pre><pre class=3D"diff" id=3D"context"> /**
  * Base class for exceptions related to aspects.
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: AspectException=
.java,v 1.<span id=3D"removedchars">1&nbsp;2003/07/04&nbsp;10:53:59</span=
> lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: AspectException.j=
ava,v 1.<span id=3D"addedchars">2&nbsp;2003/09/05&nbsp;07:56:43</span> le=
cando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  */
</pre><pre class=3D"diff" id=3D"removed">-public class AspectException ex=
tends <span id=3D"removedchars">Runtime</span>Exception {
</pre><pre class=3D"diff" id=3D"added">+public class AspectException exte=
nds <span id=3D"addedchars">Wrapped</span>Exception {
</pre><pre class=3D"diff" id=3D"context"> ///CLOVER:OFF
     public AspectException() {
     }
</pre></div>
<hr /><a name=3D"file36" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning<br /></spa=
n>
<div class=3D"fileheader"><big><b>AspectInstance.java</b></big> <small id=
=3D"info">1.3 -&gt; 1.4</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.3 -r1.4
--- AspectInstance.java	29 Aug 2003 15:20:31 -0000	1.3
+++ AspectInstance.java	5 Sep 2003 07:56:43 -0000	1.4
@@ -13,15 +13,9 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.lang.reflec=
t.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
</pre><pre class=3D"diff" id=3D"removed">-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
</pre><pre class=3D"diff" id=3D"added">+import java.util.*;
+
+import org.codehaus.nanning.util.LinkedHashSet;
</pre><pre class=3D"diff" id=3D"context">=20
 /**
  * The central concept of the Nanning Core, contains mixins.
</pre><pre class=3D"diff"><small id=3D"info">@@ -36,10 +30,10 @@
</small></pre><pre class=3D"diff" id=3D"context">  instance.addMixin(mixi=
n);
  &lt;/pre&gt;&lt;/code&gt;
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: AspectInstance.=
java,v 1.<span id=3D"removedchars">3&nbsp;2003/08/29&nbsp;15:20:31</span>=
 lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: AspectInstance.ja=
va,v 1.<span id=3D"addedchars">4&nbsp;2003/09/05&nbsp;07:56:43</span> lec=
ando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">3</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">4</span> $
</pre><pre class=3D"diff" id=3D"context">  */
 public final class AspectInstance implements InvocationHandler, Serializ=
able {
     static final long serialVersionUID =3D 5462785783512485056L;
</pre><pre class=3D"diff"><small id=3D"info">@@ -122,7 +116,9 @@
</small></pre><pre class=3D"diff" id=3D"context">      */
     public Mixin getMixinForInterface(Class interfaceClass) {
         Mixin mixinInstance =3D (Mixin) mixins.get(interfaceClass);
</pre><pre class=3D"diff" id=3D"removed">-        assert mixinInstance !=3D=
 null : "there is no mixin for interface " + interfaceClass + " mixins we=
re " + mixins;
</pre><pre class=3D"diff" id=3D"added">+        if (mixinInstance =3D=3D =
null) {
+            throw new AssertionException("there is no mixin for interfac=
e " + interfaceClass + " mixins were " + mixins);
+        }
</pre><pre class=3D"diff" id=3D"context">         return mixinInstance;
     }
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -146,7 +142,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     private void readOb=
ject(ObjectInputStream objectInputStream) throws IOException, ClassNotFou=
ndException {
         objectInputStream.defaultReadObject();
         AspectFactory currentAspectFactory =3D Aspects.getCurrentAspectF=
actory();
</pre><pre class=3D"diff" id=3D"removed">-        assert currentAspectFac=
tory !=3D null : "context AspectFactory not specified, it is not possible=
 to deserialize " + this;
</pre><pre class=3D"diff" id=3D"added">+        if (currentAspectFactory =
=3D=3D null) {
+            throw new AssertionException("context AspectFactory not spec=
ified, it is not possible to deserialize " + this);
+        }
</pre><pre class=3D"diff" id=3D"context">         aspectFactory =3D curre=
ntAspectFactory;
         aspectFactory.reinitialize(this);
     }
</pre><pre class=3D"diff"><small id=3D"info">@@ -160,7 +158,9 @@
</small></pre><pre class=3D"diff" id=3D"context">      * @param mixin
      */
     public void addMixin(Mixin mixin) {
</pre><pre class=3D"diff" id=3D"removed">-        assert proxy =3D=3D nul=
l : "Can't add mixins when proxy has been created.";
</pre><pre class=3D"diff" id=3D"added">+        if (proxy !=3D null) {
+            throw new AssertionException("Can't add mixins when proxy ha=
s been created.");
+        }
</pre><pre class=3D"diff" id=3D"context">         Class interfaceClass =3D=
 mixin.getInterfaceClass();
         bindMixinToInterface(interfaceClass, mixin);
         mixinsList.add(mixin);
</pre></div>
<hr /><a name=3D"file37" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning<br /></spa=
n>
<div class=3D"fileheader"><big><b>Mixin.java</b></big> <small id=3D"info"=
>1.3 -&gt; 1.4</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.3 -r1.4
--- Mixin.java	1 Sep 2003 11:57:04 -0000	1.3
+++ Mixin.java	5 Sep 2003 07:56:43 -0000	1.4
@@ -34,10 +34,10 @@
</small></pre><pre class=3D"diff" id=3D"context"> }
 &lt;/code&gt;&lt;/pre&gt;
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: Mixin.java,v 1.=
<span id=3D"removedchars">3&nbsp;2003/09/01&nbsp;11:57:04</span> lecando =
Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: Mixin.java,v 1.<s=
pan id=3D"addedchars">4&nbsp;2003/09/05&nbsp;07:56:43</span> lecando Exp =
$ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">3</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">4</span> $
</pre><pre class=3D"diff" id=3D"context">  */
 public class Mixin implements Serializable {
     static final long serialVersionUID =3D 7386027290257587762L;
</pre><pre class=3D"diff"><small id=3D"info">@@ -60,7 +60,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public void setTarget(Object target) {
</pre><pre class=3D"diff" id=3D"removed">-        assert !(target instanc=
eof Mixin);
</pre><pre class=3D"diff" id=3D"added">+        if (target instanceof Mix=
in) {
+            throw new AssertionException();
+        }
</pre><pre class=3D"diff" id=3D"context">         this.target =3D target;
     }
=20
</pre></div>
<hr /><a name=3D"file38" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>AttributeException.java</b></big> <smal=
l id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- AttributeException.java	4 Jul 2003 10:53:59 -0000	1.1
+++ AttributeException.java	5 Sep 2003 07:56:44 -0000	1.2
@@ -1,6 +1,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.attribute;
=20
</pre><pre class=3D"diff" id=3D"removed">-public class AttributeException=
 extends RuntimeException {
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
WrappedException;
+
+public class AttributeException extends WrappedException {
</pre><pre class=3D"diff" id=3D"context">     public AttributeException(S=
tring message) {
         super(message);
     }
</pre></div>
<hr /><a name=3D"file39" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>AttributesBuilder.java</b></big> <small=
 id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- AttributesBuilder.java	4 Jul 2003 10:53:59 -0000	1.1
+++ AttributesBuilder.java	5 Sep 2003 07:56:44 -0000	1.2
@@ -10,6 +10,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import com.thoughtworks=
.qdox.parser.structs.ClassDef;
 import com.thoughtworks.qdox.parser.structs.FieldDef;
 import com.thoughtworks.qdox.parser.structs.MethodDef;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 /**
  * QDox Builder implementation for creating Properties containing attrib=
utes.
</pre><pre class=3D"diff"><small id=3D"info">@@ -21,7 +22,7 @@
</small></pre><pre class=3D"diff" id=3D"context">  * to parse another fil=
e, the reset() method must be called.&lt;/p&gt;
  *
  * @author &lt;a href=3D"[email protected]"&gt;Joe Walnes&lt;/a&gt;
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  */
 public class AttributesBuilder implements Builder {
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -126,7 +127,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public List getClassPropertiesHelpers() {
</pre><pre class=3D"diff" id=3D"removed">-        assert classPropertiesH=
elperStack.isEmpty();
</pre><pre class=3D"diff" id=3D"added">+        if (!classPropertiesHelpe=
rStack.isEmpty()) {
+            throw new AssertionException();
+        }
</pre><pre class=3D"diff" id=3D"context">         return classPropertiesH=
elpers;
     }
 }
</pre></div>
<hr /><a name=3D"file40" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>ClassAttributes.java</b></big> <small i=
d=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- ClassAttributes.java	4 Jul 2003 10:53:59 -0000	1.1
+++ ClassAttributes.java	5 Sep 2003 07:56:44 -0000	1.2
@@ -5,6 +5,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.util.HashMa=
p;
 import java.util.Map;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
+
</pre><pre class=3D"diff" id=3D"context"> public class ClassAttributes {
=20
     private Class attributeClass;
</pre><pre class=3D"diff"><small id=3D"info">@@ -45,7 +47,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     private Map getMap(Map map, Object key) {
</pre><pre class=3D"diff" id=3D"removed">-        assert map !=3D null : =
"properties not loaded";
</pre><pre class=3D"diff" id=3D"added">+        if (map =3D=3D null) {
+            throw new AssertionException("properties not loaded");
+        }
</pre><pre class=3D"diff" id=3D"context">         Map result =3D (Map) ma=
p.get(key);
         if (result =3D=3D null) {
             result =3D new HashMap();
</pre></div>
<hr /><a name=3D"file41" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>ClassPropertiesHelper.java</b></big> <s=
mall id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- ClassPropertiesHelper.java	13 Aug 2003 09:15:12 -0000	1.2
+++ ClassPropertiesHelper.java	5 Sep 2003 07:56:44 -0000	1.3
@@ -6,10 +6,10 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.io.OutputSt=
ream;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
</pre><pre class=3D"diff" id=3D"removed">-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
</pre><pre class=3D"diff" id=3D"added">+import java.util.*;
+
+import org.codehaus.nanning.util.OroUtils;
+import org.codehaus.nanning.AssertionException;
</pre><pre class=3D"diff" id=3D"context">=20
 public class ClassPropertiesHelper {
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -56,7 +56,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     void loadAttributes(Properties properties) {
</pre><pre class=3D"diff" id=3D"removed">-        assert targetClassAttri=
butes !=3D null;
</pre><pre class=3D"diff" id=3D"added">+        if (targetClassAttributes=
 =3D=3D null) {
+            throw new AssertionException();
+        }
</pre><pre class=3D"diff" id=3D"context">=20
         this.properties =3D properties;
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -65,7 +67,7 @@
</small></pre><pre class=3D"diff" id=3D"context">             String prop=
ertyName =3D (String) entry.getKey();
             String attributeValue =3D (String) entry.getValue();
=20
</pre><pre class=3D"diff" id=3D"removed">-            String[] parts =3D =
propertyName.split("\\.");
</pre><pre class=3D"diff" id=3D"added">+            String[] parts =3D Or=
oUtils.split(propertyName, "\\.");
</pre><pre class=3D"diff" id=3D"context">             if (CLASS_PREFIX.eq=
uals(parts[0])) {
                 String attributeName =3D joinTail(parts, 1);
                 loadClassAttribute(attributeName, attributeValue);
</pre><pre class=3D"diff"><small id=3D"info">@@ -83,9 +85,11 @@
</small></pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre><pre class=3D"diff" id=3D"added">+
</pre><pre class=3D"diff" id=3D"context">     void loadMethodAttribute(St=
ring methodSignature, String attributeName, String attributeValue) {
</pre><pre class=3D"diff" id=3D"removed">-        assert methodSignature.=
indexOf('(') !=3D -1 &amp;&amp; methodSignature.indexOf(')') !=3D -1:
-                "method signature of wrong format: " + methodSignature;
</pre><pre class=3D"diff" id=3D"added">+        if (methodSignature.index=
Of('(') =3D=3D -1 || methodSignature.indexOf(')') =3D=3D -1) {
+            throw new AssertionException("method signature of wrong form=
at: " + methodSignature);
+        }
</pre><pre class=3D"diff" id=3D"context">         if (targetClassAttribut=
es !=3D null) {
             Method method =3D findMethod(methodSignature);
             if (method =3D=3D null) {
</pre></div>
<hr /><a name=3D"file42" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>PropertyFileAttributeLoader.java</b></b=
ig> <small id=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- PropertyFileAttributeLoader.java	4 Jul 2003 10:53:59 -0000	1.1
+++ PropertyFileAttributeLoader.java	5 Sep 2003 07:56:44 -0000	1.2
@@ -5,6 +5,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.net.Malform=
edURLException;
 import java.util.Properties;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
WrappedException;
+
</pre><pre class=3D"diff" id=3D"context"> public class PropertyFileAttrib=
uteLoader implements AttributesLoader {
     public static final String ATTRIBUTE_FILE_SUFFIX =3D ".attributes";
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -42,7 +44,7 @@
</small></pre><pre class=3D"diff" id=3D"context">                 try {
                     inputStream.close();
                 } catch (IOException e) {
</pre><pre class=3D"diff" id=3D"removed">-                    throw new <=
span id=3D"removedchars">Runtime</span>Exception(e);
</pre><pre class=3D"diff" id=3D"added">+                    throw new <sp=
an id=3D"addedchars">Wrapped</span>Exception(e);
</pre><pre class=3D"diff" id=3D"context">                 }
             }
         }
</pre></div>
<hr /><a name=3D"file43" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/config<br =
/></span>
<div class=3D"fileheader"><big><b>FindTargetMixinAspect.java</b></big> <s=
mall id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- FindTargetMixinAspect.java	12 Jul 2003 16:48:16 -0000	1.2
+++ FindTargetMixinAspect.java	5 Sep 2003 07:56:44 -0000	1.3
@@ -3,6 +3,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.AspectException;
 import org.codehaus.nanning.AspectInstance;
 import org.codehaus.nanning.Mixin;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 public class FindTargetMixinAspect implements Aspect {
     private static final String DEFAULT_IMPLEMENTATION_SUFFIX =3D "Impl"=
;
</pre><pre class=3D"diff"><small id=3D"info">@@ -46,7 +47,9 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     private Class findImpl(Class interfaceClass) {
         Class impl =3D findImpl(interfaceClass, implementationSuffix);
</pre><pre class=3D"diff" id=3D"removed">-        assert impl !=3D null :=
 "could not find target for " + interfaceClass;
</pre><pre class=3D"diff" id=3D"added">+        if (impl =3D=3D null) {
+            throw new AssertionException("could not find target for " + =
interfaceClass);
+        }
</pre><pre class=3D"diff" id=3D"context">         return impl;
     }
    =20
</pre></div>
<hr /><a name=3D"file44" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/config<br =
/></span>
<div class=3D"fileheader"><big><b>InterceptorAspect.java</b></big> <small=
 id=3D"info">1.4 -&gt; 1.5</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.4 -r1.5
--- InterceptorAspect.java	10 Aug 2003 16:18:18 -0000	1.4
+++ InterceptorAspect.java	5 Sep 2003 07:56:44 -0000	1.5
@@ -3,6 +3,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.AspectException;
 import org.codehaus.nanning.AspectInstance;
 import org.codehaus.nanning.MethodInterceptor;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
</pre><pre class=3D"diff" id=3D"context">=20
 public class InterceptorAspect implements Aspect {
     public static final int SINGLETON =3D 0;
</pre><pre class=3D"diff"><small id=3D"info">@@ -24,8 +25,9 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
     public InterceptorAspect(Pointcut pointcut, Class interceptorClass, =
int stateManagement) {
         this.stateManagement =3D stateManagement;
</pre><pre class=3D"diff" id=3D"removed">-        assert stateManagement =
=3D=3D SINGLETON || stateManagement =3D=3D PER_METHOD || stateManagement =
=3D=3D PER_INSTANCE
-                : "SINGLETON, PER_METHOD and PER_INSTANCE is supported o=
nly, not " + stateManagement;
</pre><pre class=3D"diff" id=3D"added">+        if (stateManagement !=3D =
SINGLETON &amp;&amp; stateManagement !=3D PER_METHOD &amp;&amp; stateMana=
gement !=3D PER_INSTANCE) {
+            throw new AssertionException("SINGLETON, PER_METHOD and PER_=
INSTANCE is supported only, not " + stateManagement);
+        }
</pre><pre class=3D"diff" id=3D"context">=20
         if (stateManagement =3D=3D SINGLETON) {
             singletonInterceptor =3D createInterceptor();
</pre></div>
<hr /><a name=3D"file45" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/config<br =
/></span>
<div class=3D"fileheader"><big><b>P.java</b></big> <small id=3D"info">1.3=
 -&gt; 1.4</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.3 -r1.4
--- P.java	24 Jul 2003 16:46:11 -0000	1.3
+++ P.java	5 Sep 2003 07:56:44 -0000	1.4
@@ -7,7 +7,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import org.codehaus.nan=
ning.attribute.Attributes;
=20
 import java.lang.reflect.Method;
</pre><pre class=3D"diff" id=3D"removed">-import java.util.regex.Pattern;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
RegexpPattern;
</pre><pre class=3D"diff" id=3D"context"> import java.util.Iterator;
=20
 public class P {
</pre><pre class=3D"diff"><small id=3D"info">@@ -148,10 +148,10 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     private static class MethodName extends Pointcut {
</pre><pre class=3D"diff" id=3D"removed">-        private final Pattern p=
attern;
</pre><pre class=3D"diff" id=3D"added">+        private final <span id=3D=
"addedchars">Regexp</span>Pattern pattern;
</pre><pre class=3D"diff" id=3D"context">=20
         public MethodName(String pattern) {
</pre><pre class=3D"diff" id=3D"removed">-            this.pattern =3D Pa=
ttern.compile(pattern);
</pre><pre class=3D"diff" id=3D"added">+            this.pattern =3D <spa=
n id=3D"addedchars">Regexp</span>Pattern.compile(pattern);
</pre><pre class=3D"diff" id=3D"context">         }
=20
         public boolean adviseMethod(AspectInstance instance, Mixin mixin=
, Method method) {
</pre></div>
<hr /><a name=3D"file46" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/config<br =
/></span>
<div class=3D"fileheader"><big><b>Pointcut.java</b></big> <small id=3D"in=
fo">1.3 -&gt; 1.4</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.3 -r1.4
--- Pointcut.java	12 Jul 2003 16:48:16 -0000	1.3
+++ Pointcut.java	5 Sep 2003 07:56:44 -0000	1.4
@@ -4,10 +4,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.util.Iterat=
or;
 import java.util.List;
=20
</pre><pre class=3D"diff" id=3D"removed">-import org.codehaus.nanning.Asp=
ectException;
-import org.codehaus.nanning.AspectInstance;
-import org.codehaus.nanning.MethodInterceptor;
-import org.codehaus.nanning.Mixin;
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.*;
</pre><pre class=3D"diff" id=3D"context">=20
 public abstract class Pointcut {
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -46,7 +43,7 @@
</small></pre><pre class=3D"diff" id=3D"context">                        =
     throw new AspectException(e);
                         }
                     } else {
</pre><pre class=3D"diff" id=3D"removed">-                        assert =
false : "interceptor or class needs to be specified";
</pre><pre class=3D"diff" id=3D"added">+                        throw new=
 AssertionException("interceptor or class needs to be specified");
</pre><pre class=3D"diff" id=3D"context">                     }
                 }
             }
</pre></div>
<hr /><a name=3D"file47" /><div class=3D"file">
<span class=3D"pathname">nanning/src/main/org/codehaus/nanning/samples<br=
 /></span>
<div class=3D"fileheader"><big><b>StopWatch.java</b></big> <small id=3D"i=
nfo">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- StopWatch.java	4 Jul 2003 10:53:59 -0000	1.1
+++ StopWatch.java	5 Sep 2003 07:56:44 -0000	1.2
@@ -1,5 +1,7 @@
</small></pre><pre class=3D"diff" id=3D"context"> package org.codehaus.na=
nning.samples;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.Asser=
tionException;
+
</pre><pre class=3D"diff" id=3D"context"> public class StopWatch {
     ///CLOVER:OFF
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -41,23 +43,29 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public double getTimeSpent(int numberOfIterations) {
</pre><pre class=3D"diff" id=3D"removed">-        assert stopped : "you n=
eed to invoke stop() first";
</pre><pre class=3D"diff" id=3D"added">+        assertStopped();
</pre><pre class=3D"diff" id=3D"context">         return getTimeSpent() /=
 (double) numberOfIterations;
     }
=20
     public double getMemoryUsed(int numberOfIterations) {
</pre><pre class=3D"diff" id=3D"removed">-        assert stopped : "you n=
eed to invoke stop() first";
</pre><pre class=3D"diff" id=3D"added">+        assertStopped();
</pre><pre class=3D"diff" id=3D"context">         return getMemoryUsed() =
/ (double) numberOfIterations;
     }
=20
     public String getTimeSpentSeconds() {
</pre><pre class=3D"diff" id=3D"removed">-        assert stopped : "you n=
eed to invoke stop() first";
</pre><pre class=3D"diff" id=3D"added">+        assertStopped();
</pre><pre class=3D"diff" id=3D"context">         return getTimeSpent() /=
 MILLIS_PER_SECOND + "s";
     }
=20
     public String getMemoryUsedKs() {
</pre><pre class=3D"diff" id=3D"removed">-        assert stopped : "you n=
eed to invoke stop() first";
</pre><pre class=3D"diff" id=3D"added">+        assertStopped();
</pre><pre class=3D"diff" id=3D"context">         return getMemoryUsed() =
/ BYTES_PER_K + "k";
</pre><pre class=3D"diff" id=3D"added">+    }
+
+    private void assertStopped() {
+        if (!stopped) {
+            throw new AssertionException("you need to invoke stop() firs=
t");
+        }
</pre><pre class=3D"diff" id=3D"context">     }
     ///CLOVER:ON
 }
</pre></div>
<hr /><a name=3D"file48" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/main/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>LinkedHashSet.java</b></bi=
g> <small id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N LinkedHashSet.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LinkedHashSet.java	5 Sep 2003 07:56:44 -0000	1.1
@@ -0,0 +1,81 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import java.util.*;
+
+public class LinkedHashSet implements Set {
+    private final List list;
+    private final HashSet set;
+
+    public LinkedHashSet(int initialCapacity) {
+        list =3D new ArrayList(initialCapacity);
+        set =3D new HashSet(initialCapacity);
+    }
+
+    public LinkedHashSet() {
+        this(1);
+    }
+
+    public int size() {
+        return list.size();
+    }
+
+    public boolean isEmpty() {
+        return list.isEmpty();
+    }
+
+    public boolean contains(Object o) {
+        return set.contains(o);
+    }
+
+    public Iterator iterator() {
+        return list.iterator();
+    }
+
+    public Object[] toArray() {
+        return list.toArray();
+    }
+
+    public Object[] toArray(Object a[]) {
+        return list.toArray(a);
+    }
+
+    public boolean add(Object o) {
+        if (set.add(o)) {
+            return list.add(o);
+        }
+        return false;
+    }
+
+    public boolean remove(Object o) {
+        if (set.remove(o)) {
+            return list.remove(o);
+        }
+        return false;
+    }
+
+    public boolean containsAll(Collection c) {
+        return list.containsAll(c);
+    }
+
+    public boolean addAll(Collection c) {
+        Set newElements =3D new HashSet(c);
+        newElements.removeAll(set);
+        if (set.addAll(c)) {
+            return list.addAll(newElements);
+        }
+        return false;
+    }
+
+    public boolean retainAll(Collection c) {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean removeAll(Collection c) {
+        throw new UnsupportedOperationException();
+    }
+
+    public void clear() {
+        set.clear();
+        list.clear();
+    }
+}
</pre></div>
<hr /><a name=3D"file49" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/main/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>Matcher.java</b></big> <sm=
all id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N Matcher.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Matcher.java	5 Sep 2003 07:56:44 -0000	1.1
@@ -0,0 +1,27 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import org.apache.oro.text.regex.*;
+
+public class Matcher {
+    private String text;
+    private Pattern pattern;
+    private Perl5Matcher perl5Matcher;
+
+    public Matcher(String text, Pattern pattern) {
+        this.text =3D text;
+        this.pattern =3D pattern;
+        perl5Matcher =3D new Perl5Matcher();
+    }
+
+    public String replaceAll(String s) {
+        return Util.substitute(perl5Matcher, pattern, new StringSubstitu=
tion(s), text, Util.SUBSTITUTE_ALL);
+    }
+
+    public boolean matches() {
+        return perl5Matcher.matches(text, pattern);
+    }
+
+    public String group(int i) {
+        return perl5Matcher.getMatch().group(i);
+    }
+}
</pre></div>
<hr /><a name=3D"file50" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/main/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>OroUtils.java</b></big> <s=
mall id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N OroUtils.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ OroUtils.java	5 Sep 2003 07:56:44 -0000	1.1
@@ -0,0 +1,18 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import java.util.Collection;
+import java.util.ArrayList;
+
+import org.apache.oro.text.perl.Perl5Util;
+
+public class OroUtils {
+    public static String[] split(String s, String pattern) {
+        Collection results =3D new ArrayList();
+        new Perl5Util().split(results, "/" + pattern + "/", s);
+        return (String[]) results.toArray(new String[0]);
+    }
+
+    public static boolean match(String s, String pattern) {
+        return new Perl5Util().match("/" + pattern + "/", s);
+    }
+}
</pre></div>
<hr /><a name=3D"file51" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/main/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>RegexpPattern.java</b></bi=
g> <small id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N RegexpPattern.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RegexpPattern.java	5 Sep 2003 07:56:44 -0000	1.1
@@ -0,0 +1,30 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import org.apache.oro.text.regex.MalformedPatternException;
+import org.apache.oro.text.regex.Pattern;
+import org.apache.oro.text.regex.Perl5Compiler;
+
+
+public class RegexpPattern {
+    private Pattern pattern;
+
+    public static RegexpPattern compile(String pattern) {
+        try {
+            return new RegexpPattern(new Perl5Compiler().compile(pattern=
));
+        } catch (MalformedPatternException e) {
+            throw new WrappedException(e);
+        }
+    }
+
+    public RegexpPattern(Pattern pattern) {
+        this.pattern =3D pattern;
+    }
+
+    public Matcher matcher(String text) {
+        return new Matcher(text, pattern);
+    }
+
+    public static boolean matches(String s, String s1) {
+        return RegexpPattern.compile(s).matcher(s1).matches();
+    }
+}
</pre></div>
<hr /><a name=3D"file52" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/main/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>WrappedException.java</b><=
/big> <small id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N WrappedException.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ WrappedException.java	5 Sep 2003 07:56:44 -0000	1.1
@@ -0,0 +1,51 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * This is needed since the RuntimeException in 1.3 cant have a cause ex=
ception
+ */
+public class WrappedException extends RuntimeException {
+    private Throwable cause;
+
+    public WrappedException() {
+    }
+
+    public WrappedException(String s) {
+        super(s);
+    }
+
+    public WrappedException(String message, Throwable cause) {
+        super(message);
+        this.cause =3D cause;
+    }
+
+    public WrappedException(Throwable cause) {
+        this(null, cause);
+    }
+
+    public void printStackTrace() {
+        super.printStackTrace();
+        if (cause !=3D null) {
+            System.err.println("Caused by:");
+            cause.printStackTrace();
+        }
+    }
+
+    public void printStackTrace(PrintStream s) {
+        super.printStackTrace(s);
+        if (cause !=3D null) {
+            s.println("Caused by:");
+            cause.printStackTrace(s);
+        }
+    }
+
+    public void printStackTrace(PrintWriter s) {
+        super.printStackTrace(s);
+        if (cause !=3D null) {
+            s.println("Caused by:");
+            cause.printStackTrace(s);
+        }
+    }
+}
</pre></div>
<hr /><a name=3D"file53" /><div class=3D"file">
<span class=3D"pathname">nanning/src/test/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>AttributesTest.java</b></big> <small id=
=3D"info">1.1 -&gt; 1.2</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.1 -r1.2
--- AttributesTest.java	4 Jul 2003 10:54:00 -0000	1.1
+++ AttributesTest.java	5 Sep 2003 07:56:45 -0000	1.2
@@ -13,10 +13,10 @@
</small></pre><pre class=3D"diff" id=3D"context"> /**
  * TODO document AttributesTest
  *
</pre><pre class=3D"diff" id=3D"removed">- * &lt;!-- $Id: AttributesTest.=
java,v 1.<span id=3D"removedchars">1&nbsp;2003/07/04&nbsp;10:54:00</span>=
 lecando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"added">+ * &lt;!-- $Id: AttributesTest.ja=
va,v 1.<span id=3D"addedchars">2&nbsp;2003/09/05&nbsp;07:56:45</span> lec=
ando Exp $ --&gt;
</pre><pre class=3D"diff" id=3D"context">  *
  * @author $Author: lecando $
</pre><pre class=3D"diff" id=3D"removed">- * @version $Revision: 1.<span =
id=3D"removedchars">1</span> $
</pre><pre class=3D"diff" id=3D"added">+ * @version $Revision: 1.<span id=
=3D"addedchars">2</span> $
</pre><pre class=3D"diff" id=3D"context">  */
 public class AttributesTest extends AbstractAttributesTest {
     public static final String CLASS_ATTRIBUTE =3D "class.attribute";
</pre><pre class=3D"diff"><small id=3D"info">@@ -48,7 +48,7 @@
</small></pre><pre class=3D"diff" id=3D"context">=20
             innerField =3D AttributesTestClass.InnerClass.class.getDecla=
redField("innerField");
         } catch (Exception e) {
</pre><pre class=3D"diff" id=3D"removed">-            throw new Error("Co=
uld not reflect AttributesTestClass"<span id=3D"removedchars">,</span> e)=
;
</pre><pre class=3D"diff" id=3D"added">+            throw new Error("Coul=
d not reflect AttributesTestClass"<span id=3D"addedchars">&nbsp;+</span> =
e);
</pre><pre class=3D"diff" id=3D"context">         }
     }
=20
</pre></div>
<hr /><a name=3D"file54" /><div class=3D"file">
<span class=3D"pathname">nanning/src/test/org/codehaus/nanning/attribute<=
br /></span>
<div class=3D"fileheader"><big><b>ClassPropertiesHelperTest.java</b></big=
> <small id=3D"info">1.2 -&gt; 1.3</small></div>
<pre class=3D"diff"><small id=3D"info">diff -u -r1.2 -r1.3
--- ClassPropertiesHelperTest.java	13 Aug 2003 09:15:24 -0000	1.2
+++ ClassPropertiesHelperTest.java	5 Sep 2003 07:56:45 -0000	1.3
@@ -5,6 +5,8 @@
</small></pre><pre class=3D"diff" id=3D"context"> import java.lang.reflec=
t.Proxy;
 import java.io.File;
=20
</pre><pre class=3D"diff" id=3D"added">+import org.codehaus.nanning.util.=
OroUtils;
+
</pre><pre class=3D"diff" id=3D"context"> public class ClassPropertiesHel=
perTest extends TestCase {
     private ClassPropertiesHelper classPropertiesHelper;
=20
</pre><pre class=3D"diff"><small id=3D"info">@@ -61,9 +63,9 @@
</small></pre><pre class=3D"diff" id=3D"context">     }
=20
     public void testJoinTail() {
</pre><pre class=3D"diff" id=3D"removed">-        String[] parts =3D "fie=
ld.field.field.attribute".split("\\.");
</pre><pre class=3D"diff" id=3D"added">+        String[] parts =3D OroUti=
ls.split("field.field.field.attribute", "\\.");
</pre><pre class=3D"diff" id=3D"context">         assertEquals("field.att=
ribute", ClassPropertiesHelper.joinTail(parts, 2));
</pre><pre class=3D"diff" id=3D"removed">-        parts =3D "field.field.=
attribute".split("\\.");
</pre><pre class=3D"diff" id=3D"added">+        parts =3D OroUtils.split(=
"field.field.attribute", "\\.");
</pre><pre class=3D"diff" id=3D"context">         assertEquals("attribute=
", ClassPropertiesHelper.joinTail(parts, 2));
     }
=20
</pre></div>
<hr /><a name=3D"file55" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/test/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>LinkedHashSetTest.java</b>=
</big> <small id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N LinkedHashSetTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ LinkedHashSetTest.java	5 Sep 2003 07:56:45 -0000	1.1
@@ -0,0 +1,48 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import java.util.*;
+
+import junit.framework.TestCase;
+
+public class LinkedHashSetTest extends TestCase {
+    private LinkedHashSet linkedHashSet;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        linkedHashSet =3D new LinkedHashSet();
+    }
+
+    public void testDefaultInitialization() throws Exception {
+        assertTrue(linkedHashSet.isEmpty());
+        assertTrue(linkedHashSet.size() =3D=3D 0);
+        assertFalse(linkedHashSet.iterator().hasNext());
+    }
+
+    public void testMultipleAdd() throws Exception {
+        assertTrue(linkedHashSet.isEmpty());
+        linkedHashSet.add("a");
+        assertEquals(1, linkedHashSet.size());
+        linkedHashSet.add("a");
+        assertEquals(1, linkedHashSet.size());
+    }
+
+    public void testIterationOrder() throws Exception {
+        linkedHashSet.add("1");
+        linkedHashSet.add("2");
+        linkedHashSet.add("3");
+        Iterator iterator =3D linkedHashSet.iterator();
+        assertEquals("1", iterator.next());
+        assertEquals("2", iterator.next());
+        assertEquals("3", iterator.next());
+
+        linkedHashSet.clear();
+
+        linkedHashSet.add("3");
+        linkedHashSet.add("2");
+        linkedHashSet.add("1");
+        iterator =3D linkedHashSet.iterator();
+        assertEquals("3", iterator.next());
+        assertEquals("2", iterator.next());
+        assertEquals("1", iterator.next());
+    }
+}
</pre></div>
<hr /><a name=3D"file56" /><div class=3D"file">
<span class=3D"pathname" id=3D"added">nanning/src/test/org/codehaus/nanni=
ng/util<br /></span>
<div class=3D"fileheader" id=3D"added"><big><b>RegexpPatternTest.java</b>=
</big> <small id=3D"info">added at 1.1</small></div>
<pre class=3D"diff"><small id=3D"info">diff -N RegexpPatternTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RegexpPatternTest.java	5 Sep 2003 07:56:45 -0000	1.1
@@ -0,0 +1,32 @@
</small></pre><pre class=3D"diff" id=3D"added">+package org.codehaus.nann=
ing.util;
+
+import junit.framework.TestCase;
+
+import org.codehaus.nanning.util.RegexpPattern;
+import org.codehaus.nanning.util.Matcher;
+
+public class RegexpPatternTest extends TestCase {
+
+    public void testSimplePatterns() throws Exception {
+        RegexpPattern regexpPattern =3D RegexpPattern.compile("(.*a)(.*)=
");
+        assertFalse(regexpPattern.matcher("ertry").matches());
+        Matcher matcher =3D regexpPattern.matcher("erary");
+        assertTrue(matcher.matches());
+        assertEquals("era", matcher.group(1));
+        assertEquals("ry", matcher.group(2));
+    }
+
+    public void testComplexPatterns() throws Exception {
+        RegexpPattern regexpPattern =3D RegexpPattern.compile("uid=3D(.*=
?)(,.*)");
+        Matcher matcher =3D regexpPattern.matcher("uid=3Djimmy,ou=3DTesT=
-uid,dc=3Dlecando,dc=3Dcom");
+        assertTrue(matcher.matches());
+        assertEquals("jimmy", matcher.group(1));
+        assertEquals(",ou=3DTesT-uid,dc=3Dlecando,dc=3Dcom", matcher.gro=
up(2));
+    }
+
+    public void testSplit() throws Exception {
+        String[] strings =3D OroUtils.split("hej.hopp", "\\.");
+        assertEquals("hej", strings[0]);
+        assertEquals("hopp", strings[1]);
+    }
+}
</pre></div>
</body></html>