summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/CORBA/Version.java
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 23:20:01 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 23:20:01 +0000
commit3b3101d8b5ae4f08a16c0b7111da6cad41bbd282 (patch)
treea5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/gnu/CORBA/Version.java
parent7e55c49d7d91ef9f09e93c1100119b1ab3652446 (diff)
downloadppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.tar.gz
ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.zip
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/CORBA/Version.java')
-rw-r--r--libjava/classpath/gnu/CORBA/Version.java26
1 files changed, 21 insertions, 5 deletions
diff --git a/libjava/classpath/gnu/CORBA/Version.java b/libjava/classpath/gnu/CORBA/Version.java
index 84f40bf4f39..efc27c22081 100644
--- a/libjava/classpath/gnu/CORBA/Version.java
+++ b/libjava/classpath/gnu/CORBA/Version.java
@@ -70,8 +70,8 @@ public class Version
/**
* Create the version with the given version numbers.
*
- * @param major major number (0..255)
- * @param minor minor number (0..255)
+ * @param _major major number (0..255)
+ * @param _minor minor number (0..255)
*/
public Version(int _major, int _minor)
{
@@ -99,6 +99,15 @@ public class Version
Version that = (Version) other;
return same(that);
}
+
+ /**
+ * Get the hashcode, higher 8 bits being the major version and lower 8 bits
+ * the minor version.
+ */
+ public int hashCode()
+ {
+ return major << 8 | minor;
+ }
/**
* Read from the input stream, major number first.
@@ -114,7 +123,10 @@ public class Version
}
catch (IOException ex)
{
- throw new MARSHAL("IOException while reading message header");
+ MARSHAL m = new MARSHAL("IOException while reading message header");
+ m.initCause(ex);
+ m.minor = Minor.Header;
+ throw m;
}
}
@@ -166,7 +178,7 @@ public class Version
* Returs true if the given version is lower or equal to the
* version, specified by the provided minor and major version
* number. This means, the version, specified by these two numbers,
- * should be supported by teh current version.
+ * should be supported by the current version.
*
* @param a_major a major version number.
* @param a_minor a minor version number.
@@ -200,7 +212,11 @@ public class Version
}
catch (IOException ex)
{
- throw new MARSHAL("IOException while writing message header");
+ MARSHAL m = new MARSHAL("IOException while writing message header");
+ m.minor = Minor.Header;
+ m.initCause(ex);
+ throw m;
}
}
+
}
OpenPOWER on IntegriCloud