hg: jdk7/tl/langtools: 3 new changesets

2009-01-29 Thread maurizio . cimadamore
Changeset: 1aa81917016a
Author:mcimadamore
Date:  2009-01-29 12:17 +
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/1aa81917016a

6315770: javac inference allows creation of strange types: Integer & Runnable
Summary: Javac does not apply glb correctly as per JLS3 15.12.2.8
Reviewed-by: jjg

! src/share/classes/com/sun/tools/javac/code/Types.java
! src/share/classes/com/sun/tools/javac/comp/Infer.java
+ test/tools/javac/generics/inference/6315770/T6315770.java
+ test/tools/javac/generics/inference/6315770/T6315770.out

Changeset: 4542977c959e
Author:mcimadamore
Date:  2009-01-29 12:18 +
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/4542977c959e

6557182: Unchecked warning *and* inconvertible types
Summary: Redundant warnings are generated when casting from intersection types
Reviewed-by: jjg

! src/share/classes/com/sun/tools/javac/code/Types.java
+ test/tools/javac/cast/6557182/T6557182.java
+ test/tools/javac/cast/6557182/T6557182.out

Changeset: 79f2f2c7d846
Author:mcimadamore
Date:  2009-01-29 12:19 +
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/79f2f2c7d846

6729401: Compiler error when using F-bounded generics with free type variables
Summary: Javac applies wrong substitution to recursive type-variable bounds
Reviewed-by: jjg

! src/share/classes/com/sun/tools/javac/code/Types.java
+ test/tools/javac/generics/6729401/T6729401.java



[Fwd: [PATCH]: Portability fixes]

2009-01-29 Thread Alan Bateman
Christos mailed core-libs-dev yesterday with a few portability 
issues.Anyone have cycles to look at the Inet4AddressImpl.c changes? 
I've created 6799040 to track it. Martin has already pushed a changeset 
to jdk7/tl/jdk for the UNIXProcess_md.c issue.
--- Begin Message ---
Hello,

Here are some simple changes for your consideration:

1. passing possibly negative values to isdigit is undefined behavior:
   http://www.opengroup.org/onlinepubs/009695399/functions/isdigit.html
2. passing possibly negative values to isspace is undefined behavior:
   http://www.opengroup.org/onlinepubs/009695399/functions/isspace.html
3. last is possibly uninitialized.
4. recvfrom argument should be socklen_t not int:
   http://www.opengroup.org/onlinepubs/007908775/xns/recvfrom.html

Thanks,

christos

diff -r fc30e7f4b9b3 src/solaris/native/java/lang/UNIXProcess_md.c
--- a/src/solaris/native/java/lang/UNIXProcess_md.c Fri Jan 16 11:24:18 
2009 -0500
+++ b/src/solaris/native/java/lang/UNIXProcess_md.c Mon Jan 22 16:25:36 
2009 -0500
@@ -377,7 +377,7 @@
  */
 while ((dirp = readdir(dp)) != NULL) {
 int fd;
-if (isdigit(dirp->d_name[0]) &&
+if (isdigit((unsigned char)dirp->d_name[0]) &&
 (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2)
 close(fd);
 }
diff -r fc30e7f4b9b3 src/solaris/native/java/net/Inet4AddressImpl.c
--- a/src/solaris/native/java/net/Inet4AddressImpl.cFri Jan 16 11:24:18 
2009 -0500
+++ b/src/solaris/native/java/net/Inet4AddressImpl.cMon Jan 22 16:25:36 
2009 -0500
@@ -155,7 +155,7 @@
  * Workaround for Solaris bug 4160367 - if a hostname contains a
  * white space then 0.0.0.0 is returned
  */
-if (isspace(hostname[0])) {
+if (isspace((unsigned char)hostname[0])) {
JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
(char *)hostname);
JNU_ReleaseStringPlatformChars(env, host, hostname);
@@ -172,7 +172,7 @@
return NULL;
 } else {
int i = 0;
-   struct addrinfo *itr, *last, *iterator = res;
+   struct addrinfo *itr, *last = NULL, *iterator = res;
while (iterator != NULL) {
int skip = 0;
itr = resNew;
@@ -603,7 +603,8 @@
 ping4(JNIEnv *env, jint fd, struct sockaddr_in* him, jint timeout,
   struct sockaddr_in* netif, jint ttl) {
 jint size;
-jint n, len, hlen1, icmplen;
+jint n, hlen1, icmplen;
+socklen_t len;
 char sendbuf[1500];
 char recvbuf[1500];
 struct icmp *icmp;

--- End Message ---


hg: jdk7/tl/jdk: 6239194: Object.hashCode() should reference System.identityHashCode()

2009-01-29 Thread joe . darcy
Changeset: 7241bd422542
Author:darcy
Date:  2009-01-29 09:04 -0800
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/7241bd422542

6239194: Object.hashCode() should reference System.identityHashCode()
Reviewed-by: emcmanus

! src/share/classes/java/lang/Object.java



hg: jdk7/tl/jdk: 6327048: Enum javadoc could link to JLS; ...

2009-01-29 Thread joe . darcy
Changeset: ff9ad99b63cc
Author:darcy
Date:  2009-01-29 13:04 -0800
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/ff9ad99b63cc

6327048: Enum javadoc could link to JLS
6653154: Exception message for bad Enum.valueOf has spurious "class"
Reviewed-by: emcmanus

! src/share/classes/java/lang/Enum.java
! src/share/classes/java/lang/annotation/Annotation.java
+ test/java/lang/Enum/ValueOf.java