JavaMemoryModel: Why not delegate, instead of see it as special case?

From: Doron Rajwan (
Date: Fri Oct 03 2003 - 15:36:27 EDT

I do not understand why, out, and err won't be replaced with
What I mean is:
1. Define a class that extends PrintStream and delegate to another
2. System.out will be final instance of this class, w/o any magic
3. When someone wants to change the output, they can use a method to
change the delegation. This method can be public method, and the
Security check will be inside it.
4. The native magic can be removed.
I cannot see how this change will break anything, except, maybe, when
someone sync(System.out) in order to print few lines together. Maybe
this can be solved too, using some tricks.
My question is: have you considered other options, except declaring
these 3 variables as special case?




Doron Rajwan,, <>

13 Odem street, Rishon Le-Zion, Israel

Home: 03-9512348 [+972-(3)-9512348]

Cell: 064-887732 [+972-(64)-887732]


JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:51 EDT