Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AWTEvent class



Mathew, Ashok wrote:
| Doesn't the java source code supposed to be same for all jdk1.4.2 ?

"Supposed to be"? Probably. "Actually"? Probably not. Sun's code inevitably
makes assumptions about the underlying platform. If Sun's assumptions are a
bad-enough mismatch to the platform's needs, then something has to give.
Private variables--especially, private *undocumented* variables (such as
bdata)--are likely things to give.


| Moreoever since AWTEvent is serializable shouldn't this usecase(AWTEvent
| RMI'ed accross) work ?

Why? "Serializable" doesn't mean "can be deserialized under any conceivable
conditions". It means "the class implements a specific serialization
mechanism". Classes are free to impose conditions on the process. The Swing
classes explicitly declare that the serialized data is suitable only for
"short term storage or RMI". AWTEvent apparently has the restriction that
the serialized form is suitable only for use on the original platform. (An
AWTEvent probably *can* be transmitted by RMI, as long as the receiver is
running OS X.)


| If 'bdata' is private & platform specific, then shouldn't it have been
| "transient".

Possibly. Possibly not. Without knowing what the field contains, it's
impossible to say. The answer might even be different from one platform to
the next.


| I was just curious if anyone in the list knew why the AWTEvent.java is
| different in the same versions of the JDK.

I imagine the answer is twofold: (1) because it has to be different (for
reasons only Sun and Apple know), and (2) because no one ever thought that
someone would try to send something as platform-dependent as AWTEvents from
a system running on one platform to another running on a different platform
using a different event-dispatch mechanism.

Glen Fisher

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: AWTEvent class (From: "Mathew, Ashok" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.