Re: IPv6 Guide - C/Java samples not comparable

2013-06-14 Thread Alan Bateman

On 13/06/2013 22:03, Bernd Eckenfels wrote:


Speaking of this guide, there are two problems with this as well:

First of all the Title is Java 5, but it is published in JDK 7 
Documentation set as well. For the Java 8 I would recommend to 
overhaul at least the title.


When touching that document anyway, there is one thing I find very 
disturbing, the comparision between a Java Program and a 
"corresponding" C-Program is not fair, as the new/old version of the 
C-Program both loop over all possible addresses and the Java program 
does not. So in fact the Java program does not work very well in 
Dual-Stack environements whereas the C-program follow best practice.
This guide isn't maintained in OpenJDK but I will submit a bug for the 
Oracle docs team, I agree it need to be refreshed as it doesn't look 
like it has been updated much sine IPv6 support was added (in JDK 1.4).



:

In the guide the is some mentioning of a V6ONLY option. Is there a 
plan to offer it, or should maybe the guide be reworked a bit?

There isn't support for IPV6_V6ONLY, it rarely comes up to be honest.

-Alan.


How to get Secure & non-HttpOnly cookies from CookieHandler

2013-06-14 Thread Vasiliy Baranov

Greetings,

Suppose I need to call java.net.CookieHandler.get(URI uri, 
Map> requestHeaders) and need to filter out 
'HttpOnly' cookies from the result. My understanding is in that case I 
should call CookieHandler.get with a URI starting with "javascript://" 
or any other non-HTTP scheme.


Now what if I need to exclude 'HttpOnly' cookies but include 'Secure' 
non-'HttpOnly' cookies? Which scheme should I use in the URI in that 
case? "javascripts"?


This question is somewhat related to 
http://bugs.sun.com/view_bug.do?bug_id=7077220 , 
http://bugs.sun.com/view_bug.do?bug_id=7038890 , and 
http://bugs.sun.com/view_bug.do?bug_id=7048628 .


Thank you,
-- Vasiliy


hg: jdk8/tl/jdk: 8015978: Incorrect transformation of XPath expression "string(-0)"

2013-06-14 Thread sean . coffey
Changeset: 45a3584bfacf
Author:coffeys
Date:  2013-06-14 15:14 +0400
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/45a3584bfacf

8015978: Incorrect transformation of XPath expression "string(-0)"
Reviewed-by: darcy, joehw
Contributed-by: aleksej.efi...@oracle.com

+ test/javax/xml/jaxp/XPath/8015978/XPathNegativeZero.java
+ test/javax/xml/jaxp/XPath/8015978/dummy.xml
+ test/javax/xml/jaxp/XPath/8015978/negativezero.xsl



hg: jdk8/tl/jaxp: 8015978: Incorrect transformation of XPath expression "string(-0)"

2013-06-14 Thread sean . coffey
Changeset: 659828443145
Author:coffeys
Date:  2013-06-14 15:14 +0400
URL:   http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/659828443145

8015978: Incorrect transformation of XPath expression "string(-0)"
Reviewed-by: darcy, joehw
Contributed-by: aleksej.efi...@oracle.com

! src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java



hg: jdk8/tl/jdk: 8014307: Memory leak ... security/jgss/wrapper/GSSLibStub.c

2013-06-14 Thread sean . mullan
Changeset: f695f447f6b7
Author:jzavgren
Date:  2013-06-14 09:13 -0400
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f695f447f6b7

8014307: Memory leak ... security/jgss/wrapper/GSSLibStub.c
Summary: I modified the native procedure: 
Java_sun_security_jgss_wrapper_GSSLibStub_initContext() so that allocated 
memory is freed when errors occur.
Reviewed-by: chegar, valeriep

! src/share/native/sun/security/jgss/wrapper/GSSLibStub.c



hg: jdk8/tl/langtools: 8016569: javac, add new flag for polymorphic method signatures

2013-06-14 Thread vicente . romero
Changeset: 6b48ebae2569
Author:vromero
Date:  2013-06-14 16:25 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/langtools/rev/6b48ebae2569

8016569: javac, add new flag for polymorphic method signatures
Reviewed-by: jjg
Contributed-by: maurizio.cimadam...@oracle.com

! src/share/classes/com/sun/tools/javac/code/Flags.java
! src/share/classes/com/sun/tools/javac/code/Symbol.java
! src/share/classes/com/sun/tools/javac/code/Types.java
! src/share/classes/com/sun/tools/javac/comp/Attr.java
! src/share/classes/com/sun/tools/javac/comp/Check.java
! src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
! src/share/classes/com/sun/tools/javac/comp/Resolve.java
! src/share/classes/com/sun/tools/javac/jvm/ClassReader.java



Re: How to get Secure & non-HttpOnly cookies from CookieHandler

2013-06-14 Thread Chris Hegarty

Hi Vasiliy,

On 14/06/2013 09:48, Vasiliy Baranov wrote:

Greetings,

Suppose I need to call java.net.CookieHandler.get(URI uri,
Map> requestHeaders) and need to filter out
'HttpOnly' cookies from the result. My understanding is in that case I
should call CookieHandler.get with a URI starting with "javascript://"
or any other non-HTTP scheme.


Yes, that will certainly work, but I admit it is a little odd.


Now what if I need to exclude 'HttpOnly' cookies but include 'Secure'
non-'HttpOnly' cookies? Which scheme should I use in the URI in that
case? "javascripts"?


'javascripts' will not work. Currently only 'https' is supported for 
'Secure' cookie.


-Chris.


This question is somewhat related to
http://bugs.sun.com/view_bug.do?bug_id=7077220 ,
http://bugs.sun.com/view_bug.do?bug_id=7038890 , and
http://bugs.sun.com/view_bug.do?bug_id=7048628 .

Thank you,
-- Vasiliy


Re: How to get Secure & non-HttpOnly cookies from CookieHandler

2013-06-14 Thread Vasiliy Baranov

On 14.06.2013 19:32, Chris Hegarty wrote:

Hi Vasiliy,

On 14/06/2013 09:48, Vasiliy Baranov wrote:

Greetings,

Suppose I need to call java.net.CookieHandler.get(URI uri,
Map> requestHeaders) and need to filter out
'HttpOnly' cookies from the result. My understanding is in that case I
should call CookieHandler.get with a URI starting with "javascript://"
or any other non-HTTP scheme.


Yes, that will certainly work, but I admit it is a little odd.


Now what if I need to exclude 'HttpOnly' cookies but include 'Secure'
non-'HttpOnly' cookies? Which scheme should I use in the URI in that
case? "javascripts"?


'javascripts' will not work. Currently only 'https' is supported for
'Secure' cookie.


Hi Chris,

Thank you for clarifying these.

By will not work you mean it will not work with stock CookieHandler 
implementations such as java.net.CookieManager and plugin cookie handlers?


At this point I am mostly interested in knowing how your team thinks it 
should work in the ideal world, that is, from the specification point of 
view.


The use case I have is JavaFX WebView's implementation for the 
'document.cookie' object which needs to return secure cookies if the web 
page has been obtained via a secure channel but filter out secure 
cookies otherwise (obviously, HttpOnly cookies must be filtered out in 
either case).


FWIW, WebView has its own CookieHandler implementation that gets 
installed automatically as the default CookieHandler if there is no 
default CookieHandler installed yet. In the current WebView 
implementation, "javascript" is the only scheme that allows filtering 
out HttpOnly cookies as you are describing above, so it cannot 
differentiate between secure and non-secure channels and hence has to 
exclude secure cookies for safety. That causes problems such as the one 
reported recently: https://javafx-jira.kenai.com/browse/RT-31072 . That 
recent issue looks rather critical so I am about to change the WebView 
implementation to differentiate between secure and non-secure channels 
using the value of "javascripts" to denote a secure analog of 
"javascript". I don't think I have an option to not make that change, 
and now I am sort of wondering whether it is going to cause a total 
disaster with the plugin cookie handlers.


Thank you,
-- Vasiliy


This question is somewhat related to
http://bugs.sun.com/view_bug.do?bug_id=7077220 ,
http://bugs.sun.com/view_bug.do?bug_id=7038890 , and
http://bugs.sun.com/view_bug.do?bug_id=7048628 .

Thank you,
-- Vasiliy




hg: jdk8/tl/langtools: 8008023: Get rid of utf8 chars in two tests

2013-06-14 Thread vicente . romero
Changeset: 1936a884b290
Author:vromero
Date:  2013-06-14 18:01 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/langtools/rev/1936a884b290

8008023: Get rid of utf8 chars in two tests
Reviewed-by: jjg

! test/tools/javac/api/6437999/Utf8.java
! test/tools/javac/api/T6306137.java