diff --git a/collects/profj/compile.ss b/collects/profj/compile.ss index 9c10e4db30..82d651f38c 100644 --- a/collects/profj/compile.ss +++ b/collects/profj/compile.ss @@ -314,15 +314,18 @@ ;Extracts the version from a .zo file. Will probably blow up on anything else. ;get-version port -> string (define (get-version port) - (let get-to-count ((n 0)) - (unless (= n 2) - (read-bytes 1 port) - (get-to-count (add1 n)))) - (let ((count (bytes-ref (read-bytes 1 port) 0))) - (list->string (let loop ((c count)) - (if (= c 0) - null - (cons (read-char port) - (loop (sub1 c)))))))) + (if (eof-object? (peek-char port)) + "" + (begin + (let get-to-count ((n 0)) + (unless (= n 2) + (read-bytes 1 port) + (get-to-count (add1 n)))) + (let ((count (bytes-ref (read-bytes 1 port) 0))) + (list->string (let loop ((c count)) + (if (= c 0) + null + (cons (read-char port) + (loop (sub1 c)))))))))) ) diff --git a/collects/profj/libs/java/io/Serializable.jinfo b/collects/profj/libs/java/io/Serializable.jinfo index 297de97a2e..644391fcf7 100644 --- a/collects/profj/libs/java/io/Serializable.jinfo +++ b/collects/profj/libs/java/io/Serializable.jinfo @@ -7,4 +7,4 @@ () () () - "version4") + "version4" "ignore") diff --git a/collects/profj/libs/java/lang/Comparable.jinfo b/collects/profj/libs/java/lang/Comparable.jinfo index 4825db6e06..d6155df731 100644 --- a/collects/profj/libs/java/lang/Comparable.jinfo +++ b/collects/profj/libs/java/lang/Comparable.jinfo @@ -7,4 +7,4 @@ () () () - "version4") + "version4" "ignore") diff --git a/collects/profj/libs/java/lang/Object.jinfo b/collects/profj/libs/java/lang/Object.jinfo index 94db6f99f7..2c682730b2 100644 --- a/collects/profj/libs/java/lang/Object.jinfo +++ b/collects/profj/libs/java/lang/Object.jinfo @@ -17,5 +17,5 @@ () (("Object" "java" "lang")) () - "version4") + "version4" "ignore") diff --git a/collects/profj/libs/java/lang/String.jinfo b/collects/profj/libs/java/lang/String.jinfo index f4f6ea597c..9391b84429 100644 --- a/collects/profj/libs/java/lang/String.jinfo +++ b/collects/profj/libs/java/lang/String.jinfo @@ -85,4 +85,4 @@ () (("Object" "java" "lang")) (("Serializable" "java" "io") ("Comparable" "java" "lang") ("CharSequence" "java" "lang")) - "version4") + "version4" "ignore") diff --git a/collects/profj/libs/java/lang/Throwable.jinfo b/collects/profj/libs/java/lang/Throwable.jinfo index 51c5e7f966..cfb0e79595 100644 --- a/collects/profj/libs/java/lang/Throwable.jinfo +++ b/collects/profj/libs/java/lang/Throwable.jinfo @@ -35,4 +35,4 @@ () (("Object" "java" "lang")) (("Serializable" "java" "io")) - "version4") + "version4" "ignore") diff --git a/collects/profj/types.ss b/collects/profj/types.ss index 491a235c2d..e855a7e90b 100644 --- a/collects/profj/types.ss +++ b/collects/profj/types.ss @@ -722,7 +722,7 @@ (define type-version "version4") - (define type-length 10) + (define type-length 11) ;; read-record: path -> (U class-record #f) (define (read-record filename) @@ -730,6 +730,8 @@ (lambda (input) (and (= (length input) type-length) (equal? type-version (list-ref input 9)) + (or (equal? (version) (list-ref input 10)) + (equal? "ignore" (list-ref input 10))) (make-class-record (list-ref input 1) (list-ref input 2) (symbol=? 'class (car input)) @@ -798,7 +800,8 @@ (map inner->list (class-record-inners r)) (class-record-parents r) (class-record-ifaces r) - type-version))) + type-version + (version)))) (field->list (lambda (f) (list