Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Standard Library Versions

18 views
Skip to first unread message

Ondřej Lhoták

unread,
Jan 17, 2014, 2:07:05 PM1/17/14
to
On Wed, Jan 08, 2014 at 04:10:39PM +0000, Jeremy Roman wrote:
> We were told that all versions of the standard library are
> identical, and in particular A3 explicitly specifies "Version 3.0 of
> the standard library is identical to version 2.0."
>
> However, these are not currently the same. Is this intentional, or
> an oversight?

This is an oversight. Thank you for pointing it out.

I have just corrected it by making 2.0 identical to 3.0. Normally,
I would not change 2.0, but would instead make a new version 2.1 in
order to make corrections such as this. In this case, I have not
made a new version because we are at the very beginning of the term.
For future corrections as the term progresses, I will always make
a new version instead of changing the existing version.

> jbroman@ubuntu1204-004:/u/cs444/pub/stdlib$ git diff 2.0 3.0
> diff --git a/3.0/java/lang/Boolean.java b/3.0/java/lang/Boolean.java
> new file mode 100644
> index 0000000..cdeb75e
> --- /dev/null
> +++ b/3.0/java/lang/Boolean.java
> @@ -0,0 +1,13 @@
> +package java.lang;
> +public final class Boolean {
> + public boolean value;
> + public Boolean(boolean i) {
> + value = i;
> + }
> + public Boolean() {
> + }
> + public String toString() {
> + return String.valueOf(value);
> + }
> + public static byte MAX_VALUE = (byte)127;
> +}
> diff --git a/2.0/java/lang/Byte.java b/3.0/java/lang/Byte.java
> index eed8019..ea6388f 100644
> --- a/2.0/java/lang/Byte.java
> +++ b/3.0/java/lang/Byte.java
> @@ -6,5 +6,8 @@ public final class Byte {
> }
> public Byte() {
> }
> + public String toString() {
> + return String.valueOf(value);
> + }
> public static byte MAX_VALUE = (byte)127;
> }
> diff --git a/2.0/java/lang/Character.java b/3.0/java/lang/Character.java
> index 831dbd1..726c2ec 100644
> --- a/2.0/java/lang/Character.java
> +++ b/3.0/java/lang/Character.java
> @@ -6,4 +6,7 @@ public final class Character {
> }
> public Character() {
> }
> + public String toString() {
> + return String.valueOf(value);
> + }
> }
> diff --git a/2.0/java/lang/Short.java b/3.0/java/lang/Short.java
> index 7e0081d..61a97a2 100644
> --- a/2.0/java/lang/Short.java
> +++ b/3.0/java/lang/Short.java
> @@ -9,4 +9,7 @@ public final class Short extends Number {
> }
> public Short() {
> }
> + public String toString() {
> + return String.valueOf(value);
> + }
> }
>

0 new messages