[CVS spice] fix for bug SPICE-47: Handling of subcontexts broken
tanderson-yCVjj/[email protected] 24 Jun 2005 15:04:44 -0000
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
<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:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>spice/components/jndikit/src/java/org/codehaus/spice/jndikit</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">AbstractLocalContext.java</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr class="alt"><td><tt><a href="#file2">RemoteContext.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td><tt>rmi/server/<a href="#file3">RMINamingProviderImpl.java</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td></td><td align="right" id="added">+12</td><td align="right" id="removed">-5</td><td></td></tr>
</table>
<small id="info">3 modified files</small><br />
<pre class="comment">
fix for bug SPICE-47: Handling of subcontexts broken
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">spice/components/jndikit/src/java/org/codehaus/spice/jndikit<br /></span>
<div class="fileheader"><big><b>AbstractLocalContext.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- AbstractLocalContext.java 27 Nov 2003 00:50:47 -0000 1.1
+++ AbstractLocalContext.java 24 Jun 2005 15:04:43 -0000 1.2
@@ -27,7 +27,7 @@
</small></pre><pre class="diff" id="context"> * on the same machine.
*
* @author Peter Donald
</pre><pre class="diff" id="removed">- * @version $Revision: 1.<span id="removedchars">1</span> $
</pre><pre class="diff" id="added">+ * @version $Revision: 1.<span id="addedchars">2</span> $
</pre><pre class="diff" id="context"> */
public abstract class AbstractLocalContext
extends AbstractContext
</pre><pre class="diff"><small id="info">@@ -311,6 +311,8 @@
</small></pre><pre class="diff" id="context"> {
throw new NamingException( "Could not resolve reference" );
}
</pre><pre class="diff" id="added">+ } else if (obj instanceof AbstractLocalContext) {
+ return ((AbstractLocalContext) obj).cloneContext();
</pre><pre class="diff" id="context"> }
return obj;
</pre><pre class="diff"><small id="info">@@ -318,6 +320,7 @@
</small></pre><pre class="diff" id="context"> else
{
final Context context = lookupSubContext( getPathName( name ) );
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> return context.lookup( getLeafName( name ) );
}
}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">spice/components/jndikit/src/java/org/codehaus/spice/jndikit<br /></span>
<div class="fileheader"><big><b>RemoteContext.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- RemoteContext.java 27 Nov 2003 00:50:47 -0000 1.1
+++ RemoteContext.java 24 Jun 2005 15:04:43 -0000 1.2
@@ -29,7 +29,7 @@
</small></pre><pre class="diff" id="context"> * Context that hooks up to a remote source.
*
* @author Peter Donald
</pre><pre class="diff" id="removed">- * @version $Revision: 1.<span id="removedchars">1</span> $
</pre><pre class="diff" id="added">+ * @version $Revision: 1.<span id="addedchars">2</span> $
</pre><pre class="diff" id="context"> */
public class RemoteContext
extends AbstractContext
</pre><pre class="diff"><small id="info">@@ -220,6 +220,8 @@
</small></pre><pre class="diff" id="context"> if( object instanceof Context )
{
fillInContext( (Context)object );
</pre><pre class="diff" id="added">+ } else if (object instanceof MarshalledObject) {
+ result[i].setObject(( (MarshalledObject)object ).get());
</pre><pre class="diff" id="context"> }
}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">spice/components/jndikit/src/java/org/codehaus/spice/jndikit/rmi/server<br /></span>
<div class="fileheader"><big><b>RMINamingProviderImpl.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- RMINamingProviderImpl.java 27 Nov 2003 00:50:47 -0000 1.1
+++ RMINamingProviderImpl.java 24 Jun 2005 15:04:43 -0000 1.2
@@ -24,7 +24,7 @@
</small></pre><pre class="diff" id="context"> * The RMI implementation of provider.
*
* @author Peter Donald
</pre><pre class="diff" id="removed">- * @version $Revision: 1.<span id="removedchars">1</span> $
</pre><pre class="diff" id="added">+ * @version $Revision: 1.<span id="addedchars">2</span> $
</pre><pre class="diff" id="context"> */
public class RMINamingProviderImpl
implements Serializable, RMINamingProvider
</pre><pre class="diff"><small id="info">@@ -135,7 +135,9 @@
</small></pre><pre class="diff" id="context"> {
//must be a context
className = RemoteContext.class.getName();
</pre><pre class="diff" id="removed">- object = new RemoteContext( null, name );
</pre><pre class="diff" id="added">+ final Name bindingName = getNameParser().parse(binding.getName());
+ final Name baseName = m_root.composeName(bindingName, name);
+ object = new RemoteContext( null, baseName);
</pre><pre class="diff" id="context"> }
else
{
</pre><pre class="diff"><small id="info">@@ -163,7 +165,7 @@
</small></pre><pre class="diff" id="context"> else if( object instanceof Context )
{
//must be a context
</pre><pre class="diff" id="removed">- object = new RemoteContext( null, name.getPrefix( name.size() - 1 ) );
</pre><pre class="diff" id="added">+ object = new RemoteContext( null, name);
</pre><pre class="diff" id="context"> }
return object;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.8</small></center>
</body></html>