diff options
author | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2006-02-19 20:12:04 +0000 |
---|---|---|
committer | Audrius Meskauskas <audriusa@Bioinformatics.org> | 2006-02-19 20:12:04 +0000 |
commit | 89ff83e114c3744b1a3e99667988b3afc464b6ec (patch) | |
tree | 3a895613d1564ad52eb6040e390a4a0db169c34a /tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java | |
parent | 55ab949bb7d6c7bf62e64d7ad7dcb7d805882d74 (diff) | |
download | classpath-89ff83e114c3744b1a3e99667988b3afc464b6ec.tar.gz |
2006-02-19 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java (compile):
Call convertStubName. (convertStubName): New method.
* gnu/classpath/tools/rmi/RMIC.java (main): Stub name fix.
* gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java (convertStubName): New method.
(getMethodHashCode): Use existing gnu.java.rmi.server.RMIHashes.getMethodHash.
* gnu/classpath/tools/rmi/rmic/templates/Stub_12.jav: Stub name fix.
Diffstat (limited to 'tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java')
-rw-r--r-- | tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java b/tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java index 209d1cca4..9b7f9358b 100644 --- a/tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java +++ b/tools/gnu/classpath/tools/rmi/rmic/RmiMethodGenerator.java @@ -39,6 +39,7 @@ package gnu.classpath.tools.rmi.rmic; import gnu.classpath.tools.AbstractMethodGenerator; +import gnu.java.rmi.server.RMIHashes; import java.lang.reflect.Method; import java.util.Properties; @@ -284,19 +285,15 @@ public class RmiMethodGenerator */ public String getMethodHashCode() { - // Using the reliable chechsum method as this is a code generator, as - // the code will be generated once, but is likely to be used much more - // frequently. - Adler32 adler = new Adler32(); - - adler.update(method.getDeclaringClass().getName().getBytes()); - adler.update(method.getName().getBytes()); - - Class[] args = method.getParameterTypes(); - for (int i = 0; i < args.length; i++) - { - adler.update(args[i].getName().getBytes()); - } - return adler.getValue() + "L"; + return RMIHashes.getMethodHash(method)+"L"; } + + /** + * Additional processing of the stub name (nothing to do for JRMP stubs). + */ + public String convertStubName(String name) + { + return name; + } + } |