RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-10 Thread Nathan Beyer

 -Original Message-
 From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
 Nathan Beyer wrote:
  I think I have this issue fixed. I modified the 'build-java.xml' script
 to
  use 'bootclasspath' instead of 'classpath' in the 'javac' task [1].
 
 
 Why?  What changed in the Sun compiler that warrants this?
 
 Can we just switch to the eclipse compiler?

We could switch and personally I'd prefer to. We'd just need to get the ECJ
JAR on Ant's classpath, which we can do by having people copy the JAR to
their Ant lib folder or try to do it dynamically with the build scripts.

-Nathan

 
 geir
 
 
  Please test it out and let me know if this works. It works for me on
 WinXP
  and Sun JDK 5.0_8 and resolves the issue mentioned below.
 
  [1]
 
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mak
 e/
  build-java.xml?r1=440948r2=441358diff_format=h
 
  -Original Message-
  From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 06, 2006 10:07 PM
  To: harmony-dev@incubator.apache.org
  Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
  builds
 
 
 
  Nathan Beyer wrote:
  -Original Message-
  From: Richard Liang [mailto:[EMAIL PROTECTED]
 
   Sun compiler (5.0_8) also has some unexpected behavior. See[1]
 
  [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
  dev/200608.mbox/[EMAIL PROTECTED]
 
  I've found that a second or third ant build takes care of it.
  LOL
 
  That's not a solution.
 
What I've
  noticed though is that the failures are all linking to elements from
  classes
  in luni-kernel. I'm looking at it, but I think there are some issues
  with
  what's put on the bootclasspath. I've already found one discrepancy
  between
  some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses
 a
  vararg and our stub didn't have this.
  Cool.
 
  -Nathan
 
 
  There are a number of places that use ReferenceQueues and Reference,
  but
  can't be generified because of a bug in the Sun compilers prior to
  5.0_8. At
  the end of this email is an example of code that causes a compiler
  error
  in
  previous releases. This issue does not affect the Eclipse compiler.
  I've
  run
  a full rebuild as of revision 440796 and everything compiles fine
 with
  both
  the Eclipse compiler and Sun 5.0_8 compiler.
 
 
 
  -Nathan
 
 
 
 
 
  private static final ReferenceQueueObject cacheQueue = new
  ReferenceQueueObject();
 
 
 
  private static final class CacheEntry extends
  WeakReferenceObject
  {
  String key;
 
 
 
  CacheEntry(Object jar, String key, ReferenceQueueObject
  queue)
  {
  super(jar, queue);
 
  this.key = key;
 
  }
 
  }
 
 
 
  // ... code using the queue
 
 
 
  CacheEntry entry;
 
  // This cast fails on Sun 5.0_7 and prior compilers
 
  while ((entry = (CacheEntry)cacheQueue.poll()) != null)
 {
 
  jarCache.remove(entry.key);
 
  }
 
 
 
  // . more code
 
 
 
 
 
 
 
  --
  Richard Liang
  China Software Development Lab, IBM
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-09 Thread Nathan Beyer


 -Original Message-
 From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
 
 Nathan Beyer wrote:
  I think I have this issue fixed. I modified the 'build-java.xml' script
 to
  use 'bootclasspath' instead of 'classpath' in the 'javac' task [1].
 
 Wait - doesn't this mean we're building against the RI rather than
 ourselves?
 

I may not have the best understanding of this, but if we use the RI JDK's
javac, doesn't it always put the JDK's libraries on the bootclasspath?

 
 
  Please test it out and let me know if this works. It works for me on
 WinXP
  and Sun JDK 5.0_8 and resolves the issue mentioned below.
 
  [1]
 
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mak
 e/
  build-java.xml?r1=440948r2=441358diff_format=h
 
  -Original Message-
  From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 06, 2006 10:07 PM
  To: harmony-dev@incubator.apache.org
  Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
  builds
 
 
 
  Nathan Beyer wrote:
  -Original Message-
  From: Richard Liang [mailto:[EMAIL PROTECTED]
 
   Sun compiler (5.0_8) also has some unexpected behavior. See[1]
 
  [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
  dev/200608.mbox/[EMAIL PROTECTED]
 
  I've found that a second or third ant build takes care of it.
  LOL
 
  That's not a solution.
 
What I've
  noticed though is that the failures are all linking to elements from
  classes
  in luni-kernel. I'm looking at it, but I think there are some issues
  with
  what's put on the bootclasspath. I've already found one discrepancy
  between
  some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses
 a
  vararg and our stub didn't have this.
  Cool.
 
  -Nathan
 
 
  There are a number of places that use ReferenceQueues and Reference,
  but
  can't be generified because of a bug in the Sun compilers prior to
  5.0_8. At
  the end of this email is an example of code that causes a compiler
  error
  in
  previous releases. This issue does not affect the Eclipse compiler.
  I've
  run
  a full rebuild as of revision 440796 and everything compiles fine
 with
  both
  the Eclipse compiler and Sun 5.0_8 compiler.
 
 
 
  -Nathan
 
 
 
 
 
  private static final ReferenceQueueObject cacheQueue = new
  ReferenceQueueObject();
 
 
 
  private static final class CacheEntry extends
  WeakReferenceObject
  {
  String key;
 
 
 
  CacheEntry(Object jar, String key, ReferenceQueueObject
  queue)
  {
  super(jar, queue);
 
  this.key = key;
 
  }
 
  }
 
 
 
  // ... code using the queue
 
 
 
  CacheEntry entry;
 
  // This cast fails on Sun 5.0_7 and prior compilers
 
  while ((entry = (CacheEntry)cacheQueue.poll()) != null)
 {
 
  jarCache.remove(entry.key);
 
  }
 
 
 
  // . more code
 
 
 
 
 
 
 
  --
  Richard Liang
  China Software Development Lab, IBM
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-09 Thread Geir Magnusson Jr.



Nathan Beyer wrote:



-Original Message-
From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]

Nathan Beyer wrote:

I think I have this issue fixed. I modified the 'build-java.xml' script

to

use 'bootclasspath' instead of 'classpath' in the 'javac' task [1].

Wait - doesn't this mean we're building against the RI rather than
ourselves?



I may not have the best understanding of this, but if we use the RI JDK's
javac, doesn't it always put the JDK's libraries on the bootclasspath?


Yes, you're right.  We don't yet have enough code to run Sun's java 
compiler using harmony, IIRC.





Please test it out and let me know if this works. It works for me on

WinXP

and Sun JDK 5.0_8 and resolves the issue mentioned below.

[1]


http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mak
e/

build-java.xml?r1=440948r2=441358diff_format=h


-Original Message-
From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 06, 2006 10:07 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
builds



Nathan Beyer wrote:

-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]

 Sun compiler (5.0_8) also has some unexpected behavior. See[1]

[1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
dev/200608.mbox/[EMAIL PROTECTED]


I've found that a second or third ant build takes care of it.

LOL

That's not a solution.

  What I've

noticed though is that the failures are all linking to elements from

classes

in luni-kernel. I'm looking at it, but I think there are some issues

with

what's put on the bootclasspath. I've already found one discrepancy

between

some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses

a

vararg and our stub didn't have this.

Cool.


-Nathan



There are a number of places that use ReferenceQueues and Reference,

but

can't be generified because of a bug in the Sun compilers prior to

5.0_8. At

the end of this email is an example of code that causes a compiler

error

in

previous releases. This issue does not affect the Eclipse compiler.

I've

run

a full rebuild as of revision 440796 and everything compiles fine

with

both

the Eclipse compiler and Sun 5.0_8 compiler.



-Nathan





private static final ReferenceQueueObject cacheQueue = new
ReferenceQueueObject();



private static final class CacheEntry extends

WeakReferenceObject

{

String key;



CacheEntry(Object jar, String key, ReferenceQueueObject

queue)

{

super(jar, queue);

this.key = key;

}

}



// ... code using the queue



CacheEntry entry;

// This cast fails on Sun 5.0_7 and prior compilers

while ((entry = (CacheEntry)cacheQueue.poll()) != null)

{

jarCache.remove(entry.key);

}



// . more code








--
Richard Liang
China Software Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev-

[EMAIL PROTECTED]

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Oliver Deakin



Nathan Beyer wrote:
  

-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]

 Sun compiler (5.0_8) also has some unexpected behavior. See[1]

[1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
dev/200608.mbox/[EMAIL PROTECTED]




I've found that a second or third ant build takes care of it. What I've
noticed though is that the failures are all linking to elements from classes
in luni-kernel. I'm looking at it, but I think there are some issues with
what's put on the bootclasspath. I've already found one discrepancy between
some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses a
vararg and our stub didn't have this.
  


I spotted this as well, was preparing a patch for it - unless you want 
to just go ahead and

fix it?

Regards,
Oliver


-Nathan


  

There are a number of places that use ReferenceQueues and Reference, but
can't be generified because of a bug in the Sun compilers prior to
  

5.0_8. At


the end of this email is an example of code that causes a compiler error
  

in


previous releases. This issue does not affect the Eclipse compiler. I've
  

run


a full rebuild as of revision 440796 and everything compiles fine with
  

both


the Eclipse compiler and Sun 5.0_8 compiler.



-Nathan





private static final ReferenceQueueObject cacheQueue = new
ReferenceQueueObject();



private static final class CacheEntry extends WeakReferenceObject
  

{


String key;



CacheEntry(Object jar, String key, ReferenceQueueObject queue)
  

{


super(jar, queue);

this.key = key;

}

}



// ... code using the queue



CacheEntry entry;

// This cast fails on Sun 5.0_7 and prior compilers

while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

jarCache.remove(entry.key);

}



// . more code







  

--
Richard Liang
China Software Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Alexey Varlamov

2006/9/7, Oliver Deakin [EMAIL PROTECTED]:



Nathan Beyer wrote:

 -Original Message-
 From: Richard Liang [mailto:[EMAIL PROTECTED]

  Sun compiler (5.0_8) also has some unexpected behavior. See[1]

 [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
 dev/200608.mbox/[EMAIL PROTECTED]



 I've found that a second or third ant build takes care of it. What I've
 noticed though is that the failures are all linking to elements from classes
 in luni-kernel. I'm looking at it, but I think there are some issues with
 what's put on the bootclasspath. I've already found one discrepancy between
 some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses a
 vararg and our stub didn't have this.


I spotted this as well, was preparing a patch for it - unless you want
to just go ahead and
fix it?


Could you please restore j.l.Thread.setInterruptAction()  co, as well?

--
Alexey



Regards,
Oliver

 -Nathan



 There are a number of places that use ReferenceQueues and Reference, but
 can't be generified because of a bug in the Sun compilers prior to

 5.0_8. At

 the end of this email is an example of code that causes a compiler error

 in

 previous releases. This issue does not affect the Eclipse compiler. I've

 run

 a full rebuild as of revision 440796 and everything compiles fine with

 both

 the Eclipse compiler and Sun 5.0_8 compiler.



 -Nathan





 private static final ReferenceQueueObject cacheQueue = new
 ReferenceQueueObject();



 private static final class CacheEntry extends WeakReferenceObject

 {

 String key;



 CacheEntry(Object jar, String key, ReferenceQueueObject queue)

 {

 super(jar, queue);

 this.key = key;

 }

 }



 // ... code using the queue



 CacheEntry entry;

 // This cast fails on Sun 5.0_7 and prior compilers

 while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

 jarCache.remove(entry.key);

 }



 // . more code








 --
 Richard Liang
 China Software Development Lab, IBM

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Oliver Deakin

Alexey Varlamov wrote:

2006/9/7, Oliver Deakin [EMAIL PROTECTED]:



Nathan Beyer wrote:

 -Original Message-
 From: Richard Liang [mailto:[EMAIL PROTECTED]

  Sun compiler (5.0_8) also has some unexpected behavior. See[1]

 [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
 dev/200608.mbox/[EMAIL PROTECTED]



 I've found that a second or third ant build takes care of it. 
What I've
 noticed though is that the failures are all linking to elements 
from classes
 in luni-kernel. I'm looking at it, but I think there are some 
issues with
 what's put on the bootclasspath. I've already found one discrepancy 
between
 some of our 'luni-kernel' stubs and the spec. The Method.invoke() 
uses a

 vararg and our stub didn't have this.


I spotted this as well, was preparing a patch for it - unless you want
to just go ahead and
fix it?


Could you please restore j.l.Thread.setInterruptAction()  co, as well?


Isn't setInterruptAction() a private method? Why do we need this in the 
luni-kernel

stubs?

As far as I can see, that is the only method that has been removed 
recently from the
Thread class stub - were there any others that I have missed that are 
required?


Regards,
Oliver



--
Alexey



Regards,
Oliver

 -Nathan



 There are a number of places that use ReferenceQueues and 
Reference, but

 can't be generified because of a bug in the Sun compilers prior to

 5.0_8. At

 the end of this email is an example of code that causes a 
compiler error


 in

 previous releases. This issue does not affect the Eclipse 
compiler. I've


 run

 a full rebuild as of revision 440796 and everything compiles fine 
with


 both

 the Eclipse compiler and Sun 5.0_8 compiler.



 -Nathan





 private static final ReferenceQueueObject cacheQueue = new
 ReferenceQueueObject();



 private static final class CacheEntry extends 
WeakReferenceObject


 {

 String key;



 CacheEntry(Object jar, String key, ReferenceQueueObject 
queue)


 {

 super(jar, queue);

 this.key = key;

 }

 }



 // ... code using the queue



 CacheEntry entry;

 // This cast fails on Sun 5.0_7 and prior compilers

 while ((entry = (CacheEntry)cacheQueue.poll()) != 
null) {


 jarCache.remove(entry.key);

 }



 // . more code








 --
 Richard Liang
 China Software Development Lab, IBM

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
[EMAIL PROTECTED]




 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Alexey Varlamov

2006/9/7, Oliver Deakin [EMAIL PROTECTED]:

Alexey Varlamov wrote:
 2006/9/7, Oliver Deakin [EMAIL PROTECTED]:


 Nathan Beyer wrote:
 
  -Original Message-
  From: Richard Liang [mailto:[EMAIL PROTECTED]
 
   Sun compiler (5.0_8) also has some unexpected behavior. See[1]
 
  [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
  dev/200608.mbox/[EMAIL PROTECTED]
 
 
 
  I've found that a second or third ant build takes care of it.
 What I've
  noticed though is that the failures are all linking to elements
 from classes
  in luni-kernel. I'm looking at it, but I think there are some
 issues with
  what's put on the bootclasspath. I've already found one discrepancy
 between
  some of our 'luni-kernel' stubs and the spec. The Method.invoke()
 uses a
  vararg and our stub didn't have this.
 

 I spotted this as well, was preparing a patch for it - unless you want
 to just go ahead and
 fix it?

 Could you please restore j.l.Thread.setInterruptAction()  co, as well?

Isn't setInterruptAction() a private method? Why do we need this in the
luni-kernel
stubs?


As long as luni-kernel stubs actually document VMI, we should keep all
related methods there (until someone can suggest better place, which I
doubt - you know, the code is best doc itslef and any separate docs
become outdated sooner or later). Real-life example: I noted
NoSuchMethodException in DRLVM trace logs, and was quite puzzled what
it is about - so had to browse dev-list history...



As far as I can see, that is the only method that has been removed
recently from the
Thread class stub - were there any others that I have missed that are
required?

Simply reapply luni-kernel part of HARMONY-635. Thank you!

--
Regards,
Alexey

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Geir Magnusson Jr.



Alexey Varlamov wrote:

2006/9/7, Oliver Deakin [EMAIL PROTECTED]:

Alexey Varlamov wrote:
 2006/9/7, Oliver Deakin [EMAIL PROTECTED]:


 Nathan Beyer wrote:
 
  -Original Message-
  From: Richard Liang [mailto:[EMAIL PROTECTED]
 
   Sun compiler (5.0_8) also has some unexpected behavior. See[1]
 
  [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
  dev/200608.mbox/[EMAIL PROTECTED]
 
 
 
  I've found that a second or third ant build takes care of it.
 What I've
  noticed though is that the failures are all linking to elements
 from classes
  in luni-kernel. I'm looking at it, but I think there are some
 issues with
  what's put on the bootclasspath. I've already found one discrepancy
 between
  some of our 'luni-kernel' stubs and the spec. The Method.invoke()
 uses a
  vararg and our stub didn't have this.
 

 I spotted this as well, was preparing a patch for it - unless you want
 to just go ahead and
 fix it?

 Could you please restore j.l.Thread.setInterruptAction()  co, as well?

Isn't setInterruptAction() a private method? Why do we need this in the
luni-kernel
stubs?


As long as luni-kernel stubs actually document VMI, we should keep all
related methods there (until someone can suggest better place, which I
doubt - you know, the code is best doc itslef and any separate docs
become outdated sooner or later). Real-life example: I noted
NoSuchMethodException in DRLVM trace logs, and was quite puzzled what
it is about - so had to browse dev-list history...


When I first saw this suggestion, I too thought that it shouldn't go in 
Thread.


But where is it used or documented as part of VMI?  I couldn't find it...

geir





As far as I can see, that is the only method that has been removed
recently from the
Thread class stub - were there any others that I have missed that are
required?

Simply reapply luni-kernel part of HARMONY-635. Thank you!

--
Regards,
Alexey

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Alexey Varlamov

2006/9/7, Geir Magnusson Jr. [EMAIL PROTECTED]:



Alexey Varlamov wrote:
 2006/9/7, Oliver Deakin [EMAIL PROTECTED]:
 Alexey Varlamov wrote:
  2006/9/7, Oliver Deakin [EMAIL PROTECTED]:
 
 
  Nathan Beyer wrote:
  
   -Original Message-
   From: Richard Liang [mailto:[EMAIL PROTECTED]
  
Sun compiler (5.0_8) also has some unexpected behavior. See[1]
  
   [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
   dev/200608.mbox/[EMAIL PROTECTED]
  
  
  
   I've found that a second or third ant build takes care of it.
  What I've
   noticed though is that the failures are all linking to elements
  from classes
   in luni-kernel. I'm looking at it, but I think there are some
  issues with
   what's put on the bootclasspath. I've already found one discrepancy
  between
   some of our 'luni-kernel' stubs and the spec. The Method.invoke()
  uses a
   vararg and our stub didn't have this.
  
 
  I spotted this as well, was preparing a patch for it - unless you want
  to just go ahead and
  fix it?
 
  Could you please restore j.l.Thread.setInterruptAction()  co, as well?

 Isn't setInterruptAction() a private method? Why do we need this in the
 luni-kernel
 stubs?

 As long as luni-kernel stubs actually document VMI, we should keep all
 related methods there (until someone can suggest better place, which I
 doubt - you know, the code is best doc itslef and any separate docs
 become outdated sooner or later). Real-life example: I noted
 NoSuchMethodException in DRLVM trace logs, and was quite puzzled what
 it is about - so had to browse dev-list history...

When I first saw this suggestion, I too thought that it shouldn't go in
Thread.

Yep, I let the original discussion slip and still not comfortable
about current state. I especially dislike using brute force as
reflection to overcome design flaws...
I will try to look into this closer, when time permits.


But where is it used or documented as part of VMI?  I couldn't find it...

Used in java.nio.channels.spi.AbstractInterruptibleChannel, the only
documentation was in javadocs to j.l.Thread.setInterruptAction().



geir



 As far as I can see, that is the only method that has been removed
 recently from the
 Thread class stub - were there any others that I have missed that are
 required?
 Simply reapply luni-kernel part of HARMONY-635. Thank you!

 --
 Regards,
 Alexey

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Geir Magnusson Jr.



Alexey Varlamov wrote:

2006/9/7, Geir Magnusson Jr. [EMAIL PROTECTED]:



Alexey Varlamov wrote:

 As long as luni-kernel stubs actually document VMI, we should keep all
 related methods there (until someone can suggest better place, which I
 doubt - you know, the code is best doc itslef and any separate docs
 become outdated sooner or later). Real-life example: I noted
 NoSuchMethodException in DRLVM trace logs, and was quite puzzled what
 it is about - so had to browse dev-list history...

When I first saw this suggestion, I too thought that it shouldn't go in
Thread.

Yep, I let the original discussion slip and still not comfortable
about current state. I especially dislike using brute force as
reflection to overcome design flaws...
I will try to look into this closer, when time permits.



Ah - I wasn't arguing for or against the technical solution, but just 
wondering about how to document.





But where is it used or documented as part of VMI?  I couldn't find it...

Used in java.nio.channels.spi.AbstractInterruptibleChannel, the only
documentation was in javadocs to j.l.Thread.setInterruptAction().


Got it - I understand now.

I agree that we should put something in our Thread stub with good 
javadoc pointing back at j.n.c.spi.AIC...


geir





geir



 As far as I can see, that is the only method that has been removed
 recently from the
 Thread class stub - were there any others that I have missed that are
 required?
 Simply reapply luni-kernel part of HARMONY-635. Thank you!

 --
 Regards,
 Alexey

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Nathan Beyer
Not that I agree or disagree about the Thread method, but perhaps we should
start a new thread for that.

-Nathan

 -Original Message-
 From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 07, 2006 11:31 AM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
 builds
 
 
 
 Alexey Varlamov wrote:
  2006/9/7, Geir Magnusson Jr. [EMAIL PROTECTED]:
 
 
  Alexey Varlamov wrote:
  
   As long as luni-kernel stubs actually document VMI, we should keep
 all
   related methods there (until someone can suggest better place, which
 I
   doubt - you know, the code is best doc itslef and any separate docs
   become outdated sooner or later). Real-life example: I noted
   NoSuchMethodException in DRLVM trace logs, and was quite puzzled what
   it is about - so had to browse dev-list history...
 
  When I first saw this suggestion, I too thought that it shouldn't go in
  Thread.
  Yep, I let the original discussion slip and still not comfortable
  about current state. I especially dislike using brute force as
  reflection to overcome design flaws...
  I will try to look into this closer, when time permits.
 
 
 Ah - I wasn't arguing for or against the technical solution, but just
 wondering about how to document.
 
 
  But where is it used or documented as part of VMI?  I couldn't find
 it...
  Used in java.nio.channels.spi.AbstractInterruptibleChannel, the only
  documentation was in javadocs to j.l.Thread.setInterruptAction().
 
 Got it - I understand now.
 
 I agree that we should put something in our Thread stub with good
 javadoc pointing back at j.n.c.spi.AIC...
 
 geir
 
 
 
  geir
 
  
  
   As far as I can see, that is the only method that has been removed
   recently from the
   Thread class stub - were there any others that I have missed that
 are
   required?
   Simply reapply luni-kernel part of HARMONY-635. Thank you!
  
   --
   Regards,
   Alexey
  
   -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Nathan Beyer
I think I have this issue fixed. I modified the 'build-java.xml' script to
use 'bootclasspath' instead of 'classpath' in the 'javac' task [1].

Please test it out and let me know if this works. It works for me on WinXP
and Sun JDK 5.0_8 and resolves the issue mentioned below.

[1]
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/
build-java.xml?r1=440948r2=441358diff_format=h

 -Original Message-
 From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 06, 2006 10:07 PM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
 builds
 
 
 
 Nathan Beyer wrote:
 
  -Original Message-
  From: Richard Liang [mailto:[EMAIL PROTECTED]
 
   Sun compiler (5.0_8) also has some unexpected behavior. See[1]
 
  [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
  dev/200608.mbox/[EMAIL PROTECTED]
 
 
  I've found that a second or third ant build takes care of it.
 
 LOL
 
 That's not a solution.
 
   What I've
  noticed though is that the failures are all linking to elements from
 classes
  in luni-kernel. I'm looking at it, but I think there are some issues
 with
  what's put on the bootclasspath. I've already found one discrepancy
 between
  some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses a
  vararg and our stub didn't have this.
 
 Cool.
 
 
  -Nathan
 
 
 
  There are a number of places that use ReferenceQueues and Reference,
 but
  can't be generified because of a bug in the Sun compilers prior to
  5.0_8. At
  the end of this email is an example of code that causes a compiler
 error
  in
  previous releases. This issue does not affect the Eclipse compiler.
 I've
  run
  a full rebuild as of revision 440796 and everything compiles fine with
  both
  the Eclipse compiler and Sun 5.0_8 compiler.
 
 
 
  -Nathan
 
 
 
 
 
  private static final ReferenceQueueObject cacheQueue = new
  ReferenceQueueObject();
 
 
 
  private static final class CacheEntry extends
 WeakReferenceObject
  {
  String key;
 
 
 
  CacheEntry(Object jar, String key, ReferenceQueueObject
 queue)
  {
  super(jar, queue);
 
  this.key = key;
 
  }
 
  }
 
 
 
  // ... code using the queue
 
 
 
  CacheEntry entry;
 
  // This cast fails on Sun 5.0_7 and prior compilers
 
  while ((entry = (CacheEntry)cacheQueue.poll()) != null) {
 
  jarCache.remove(entry.key);
 
  }
 
 
 
  // . more code
 
 
 
 
 
 
 
 
  --
  Richard Liang
  China Software Development Lab, IBM
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Nathan Beyer
I guess I have to take this one back. It seemingly killed the automated
linux build. I reverted the change, so hopefully that will fix the build.

Anyone with a Linux box willing to test out this change? Like I mentioned,
it works perfectly fine on WinXP.

Note: This would all go away if we used the Eclipse compiler - there's no
default bootclasspath to get in the way.

-Nathan

 -Original Message-
 From: Nathan Beyer [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 07, 2006 10:12 PM
 To: harmony-dev@incubator.apache.org
 Subject: RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
 builds
 
 I think I have this issue fixed. I modified the 'build-java.xml' script to
 use 'bootclasspath' instead of 'classpath' in the 'javac' task [1].
 
 Please test it out and let me know if this works. It works for me on WinXP
 and Sun JDK 5.0_8 and resolves the issue mentioned below.
 
 [1]
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/mak
 e/
 build-java.xml?r1=440948r2=441358diff_format=h
 
  -Original Message-
  From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 06, 2006 10:07 PM
  To: harmony-dev@incubator.apache.org
  Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
  builds
 
 
 
  Nathan Beyer wrote:
  
   -Original Message-
   From: Richard Liang [mailto:[EMAIL PROTECTED]
  
Sun compiler (5.0_8) also has some unexpected behavior. See[1]
  
   [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
   dev/200608.mbox/[EMAIL PROTECTED]
  
  
   I've found that a second or third ant build takes care of it.
 
  LOL
 
  That's not a solution.
 
What I've
   noticed though is that the failures are all linking to elements from
  classes
   in luni-kernel. I'm looking at it, but I think there are some issues
  with
   what's put on the bootclasspath. I've already found one discrepancy
  between
   some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses
 a
   vararg and our stub didn't have this.
 
  Cool.
 
  
   -Nathan
  
  
  
   There are a number of places that use ReferenceQueues and Reference,
  but
   can't be generified because of a bug in the Sun compilers prior to
   5.0_8. At
   the end of this email is an example of code that causes a compiler
  error
   in
   previous releases. This issue does not affect the Eclipse compiler.
  I've
   run
   a full rebuild as of revision 440796 and everything compiles fine
 with
   both
   the Eclipse compiler and Sun 5.0_8 compiler.
  
  
  
   -Nathan
  
  
  
  
  
   private static final ReferenceQueueObject cacheQueue = new
   ReferenceQueueObject();
  
  
  
   private static final class CacheEntry extends
  WeakReferenceObject
   {
   String key;
  
  
  
   CacheEntry(Object jar, String key, ReferenceQueueObject
  queue)
   {
   super(jar, queue);
  
   this.key = key;
  
   }
  
   }
  
  
  
   // ... code using the queue
  
  
  
   CacheEntry entry;
  
   // This cast fails on Sun 5.0_7 and prior compilers
  
   while ((entry = (CacheEntry)cacheQueue.poll()) != null)
 {
  
   jarCache.remove(entry.key);
  
   }
  
  
  
   // . more code
  
  
  
  
  
  
  
  
   --
   Richard Liang
   China Software Development Lab, IBM
  
   -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
 [EMAIL PROTECTED]
  
  
   -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-07 Thread Geir Magnusson Jr.



Nathan Beyer wrote:

I think I have this issue fixed. I modified the 'build-java.xml' script to
use 'bootclasspath' instead of 'classpath' in the 'javac' task [1].



Why?  What changed in the Sun compiler that warrants this?

Can we just switch to the eclipse compiler?

geir



Please test it out and let me know if this works. It works for me on WinXP
and Sun JDK 5.0_8 and resolves the issue mentioned below.

[1]
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/
build-java.xml?r1=440948r2=441358diff_format=h


-Original Message-
From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 06, 2006 10:07 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated
builds



Nathan Beyer wrote:

-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]

 Sun compiler (5.0_8) also has some unexpected behavior. See[1]

[1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
dev/200608.mbox/[EMAIL PROTECTED]


I've found that a second or third ant build takes care of it.

LOL

That's not a solution.

  What I've

noticed though is that the failures are all linking to elements from

classes

in luni-kernel. I'm looking at it, but I think there are some issues

with

what's put on the bootclasspath. I've already found one discrepancy

between

some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses a
vararg and our stub didn't have this.

Cool.


-Nathan



There are a number of places that use ReferenceQueues and Reference,

but

can't be generified because of a bug in the Sun compilers prior to

5.0_8. At

the end of this email is an example of code that causes a compiler

error

in

previous releases. This issue does not affect the Eclipse compiler.

I've

run

a full rebuild as of revision 440796 and everything compiles fine with

both

the Eclipse compiler and Sun 5.0_8 compiler.



-Nathan





private static final ReferenceQueueObject cacheQueue = new
ReferenceQueueObject();



private static final class CacheEntry extends

WeakReferenceObject

{

String key;



CacheEntry(Object jar, String key, ReferenceQueueObject

queue)

{

super(jar, queue);

this.key = key;

}

}



// ... code using the queue



CacheEntry entry;

// This cast fails on Sun 5.0_7 and prior compilers

while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

jarCache.remove(entry.key);

}



// . more code








--
Richard Liang
China Software Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-06 Thread Nathan Beyer
Would there be any objections to asking the automated builds (that send
messages to the commit list) to use either the latest Sun compiler (5.0_8)
or the Eclipse compiler?

 

There are a number of places that use ReferenceQueues and Reference, but
can't be generified because of a bug in the Sun compilers prior to 5.0_8. At
the end of this email is an example of code that causes a compiler error in
previous releases. This issue does not affect the Eclipse compiler. I've run
a full rebuild as of revision 440796 and everything compiles fine with both
the Eclipse compiler and Sun 5.0_8 compiler.

 

-Nathan

 

 

private static final ReferenceQueueObject cacheQueue = new
ReferenceQueueObject();

 

private static final class CacheEntry extends WeakReferenceObject {

String key;

 

CacheEntry(Object jar, String key, ReferenceQueueObject queue) {

super(jar, queue);

this.key = key;

}

}

 

// ... code using the queue

 

CacheEntry entry;

// This cast fails on Sun 5.0_7 and prior compilers

while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

jarCache.remove(entry.key);

}

 

// . more code

 

 



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-06 Thread Richard Liang

On 9/7/06, Nathan Beyer [EMAIL PROTECTED] wrote:

Would there be any objections to asking the automated builds (that send
messages to the commit list) to use either the latest Sun compiler (5.0_8)
or the Eclipse compiler?



Sun compiler (5.0_8) also has some unexpected behavior. See[1]

[1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200608.mbox/[EMAIL
 PROTECTED]

Best regards,
Richard




There are a number of places that use ReferenceQueues and Reference, but
can't be generified because of a bug in the Sun compilers prior to 5.0_8. At
the end of this email is an example of code that causes a compiler error in
previous releases. This issue does not affect the Eclipse compiler. I've run
a full rebuild as of revision 440796 and everything compiles fine with both
the Eclipse compiler and Sun 5.0_8 compiler.



-Nathan





private static final ReferenceQueueObject cacheQueue = new
ReferenceQueueObject();



private static final class CacheEntry extends WeakReferenceObject {

String key;



CacheEntry(Object jar, String key, ReferenceQueueObject queue) {

super(jar, queue);

this.key = key;

}

}



// ... code using the queue



CacheEntry entry;

// This cast fails on Sun 5.0_7 and prior compilers

while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

jarCache.remove(entry.key);

}



// . more code










--
Richard Liang
China Software Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-06 Thread Nathan Beyer


 -Original Message-
 From: Richard Liang [mailto:[EMAIL PROTECTED]
 
  Sun compiler (5.0_8) also has some unexpected behavior. See[1]
 
 [1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
 dev/200608.mbox/[EMAIL PROTECTED]
 

I've found that a second or third ant build takes care of it. What I've
noticed though is that the failures are all linking to elements from classes
in luni-kernel. I'm looking at it, but I think there are some issues with
what's put on the bootclasspath. I've already found one discrepancy between
some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses a
vararg and our stub didn't have this.

-Nathan


 
 
 
  There are a number of places that use ReferenceQueues and Reference, but
  can't be generified because of a bug in the Sun compilers prior to
 5.0_8. At
  the end of this email is an example of code that causes a compiler error
 in
  previous releases. This issue does not affect the Eclipse compiler. I've
 run
  a full rebuild as of revision 440796 and everything compiles fine with
 both
  the Eclipse compiler and Sun 5.0_8 compiler.
 
 
 
  -Nathan
 
 
 
 
 
  private static final ReferenceQueueObject cacheQueue = new
  ReferenceQueueObject();
 
 
 
  private static final class CacheEntry extends WeakReferenceObject
 {
 
  String key;
 
 
 
  CacheEntry(Object jar, String key, ReferenceQueueObject queue)
 {
 
  super(jar, queue);
 
  this.key = key;
 
  }
 
  }
 
 
 
  // ... code using the queue
 
 
 
  CacheEntry entry;
 
  // This cast fails on Sun 5.0_7 and prior compilers
 
  while ((entry = (CacheEntry)cacheQueue.poll()) != null) {
 
  jarCache.remove(entry.key);
 
  }
 
 
 
  // . more code
 
 
 
 
 
 
 
 
 
 --
 Richard Liang
 China Software Development Lab, IBM
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build] Use Sun 5.0_8 or Eclipse Compiler for automated builds

2006-09-06 Thread Geir Magnusson Jr.



Nathan Beyer wrote:



-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]

 Sun compiler (5.0_8) also has some unexpected behavior. See[1]

[1]http://mail-archives.apache.org/mod_mbox/incubator-harmony-
dev/200608.mbox/[EMAIL PROTECTED]



I've found that a second or third ant build takes care of it. 


LOL

That's not a solution.

 What I've

noticed though is that the failures are all linking to elements from classes
in luni-kernel. I'm looking at it, but I think there are some issues with
what's put on the bootclasspath. I've already found one discrepancy between
some of our 'luni-kernel' stubs and the spec. The Method.invoke() uses a
vararg and our stub didn't have this.


Cool.



-Nathan




There are a number of places that use ReferenceQueues and Reference, but
can't be generified because of a bug in the Sun compilers prior to

5.0_8. At

the end of this email is an example of code that causes a compiler error

in

previous releases. This issue does not affect the Eclipse compiler. I've

run

a full rebuild as of revision 440796 and everything compiles fine with

both

the Eclipse compiler and Sun 5.0_8 compiler.



-Nathan





private static final ReferenceQueueObject cacheQueue = new
ReferenceQueueObject();



private static final class CacheEntry extends WeakReferenceObject

{

String key;



CacheEntry(Object jar, String key, ReferenceQueueObject queue)

{

super(jar, queue);

this.key = key;

}

}



// ... code using the queue



CacheEntry entry;

// This cast fails on Sun 5.0_7 and prior compilers

while ((entry = (CacheEntry)cacheQueue.poll()) != null) {

jarCache.remove(entry.key);

}



// . more code









--
Richard Liang
China Software Development Lab, IBM

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]