Re: Review/comment needed for the new public java.util.Base64 class
On 11/10/2012 04:15, Xueming Shen wrote: There is no plan yet. The sun.misc.BASE64En/Decoder should already trigger a compiler warning for it's a sun private API. @Deprecated annotation might be a good fit. -Sherman Yes, I think we should deprecate them. The other thing suggested in the JEP is that we would also look usages in the JDK, also other implementations (as there are many) to see if they can be retired. This can of course be done later. It also an opportunity for contributions, say for example someone might like to look at java.util.prefs to retire the implementation there. Another one that might be able to retire is the implementation in the com.sun.net.httpserver.BasicAuthenticator class and there are others. -Alan
Re: Review/comment needed for the new public java.util.Base64 class
The class level javadoc is quite short. It also has hyperlinks in the first sentence, which means that they are visible in package level javadoc. Consider having no hyperlinks in the first sentence, and expanding a little on what base 64 is. There are lots of other public base 64 implementations to test/check against. http://commons.apache.org/net/api-3.1/org/apache/commons/net/util/Base64.html http://www.cs.berkeley.edu/~jonah/bc/org/bouncycastle/util/encoders/Base64.html http://migbase64.sourceforge.net/ (claims to be fast) The arrays are defined inconsistently within the code (3 styles). private Encoder(byte[] base64, byte[] newline, int linemax) byte [] getBytes(ByteBuffer bb) private static final byte toBase64[] = I'd strongly encourage one style be used, and that it is the first of the three above. Stephen On 10 October 2012 18:54, Xueming Shen xueming.s...@oracle.com wrote: A standard/public API for Base64 encoding and decoding has been long overdue. JDK8 has a JEP [1] for this particular request. Here is the draft proposal to add a public Base64 utility class for JDK8. http://cr.openjdk.java.net/~sherman/4235519/webrev This class basically provides 4 variants of Base64 encoding scheme, (1) the default RFC 4648, which uses standard mapping, no line breaks, (2) the URL-safe RFE 4648, no line breaks, use - and _ to replace + and / for the mapping (3) the default MIME style, as in RFC 2045 (and its earlier versions), which uses standard base64 mapping, a 76 characters per line limit and uses crlf pair \r\n for line break. (4) an extend-able MIME base64, with the char-per-line and the line separator(s) specified by developer. The encoder/decoder now provides encoding and decoding for byte[], String, ByteBuffer and a pair of EncoderInputStream and DecoderOutputStrream, which we believe/hope should satisfy most of the common use cases. Additional method(s) can be added if strongly desired. We tried couple slightly different styles of design for such this simple utility class [2]. We kinda concluded that the version proposed probably provides the best balance among readability, usability and extensibility. Please help review and comment on the API and implementation. Thanks! -Sherman [1] http://openjdk.java.net/jeps/135 [2] http://cr.openjdk.java.net/~sherman/base64/
Re: Review Request: 7186817 - Remove Windows 95/98/ME Support
On 10/10/2012 21:18, Dan Xu wrote: Thanks for your good comments. I have changed access modifiers for methods in WinNTFileSystem.java. And the new webrev can be viewed at http://cr.openjdk.java.net/~dxu/7186817/webrev.01/ I did not change the hashCode implementation in this version. It will need further complete tests and another round of code review. But it is a good point to improve our code performance. Please log another bug to address this issue. Thanks! -Dan Thanks Dan, it looks good to me. I'll push this shortly for you. -Alan.
Re: Review Request: 7186817 - Remove Windows 95/98/ME Support
On 11/10/2012 11:42, Alan Bateman wrote: On 10/10/2012 21:18, Dan Xu wrote: Thanks for your good comments. I have changed access modifiers for methods in WinNTFileSystem.java. And the new webrev can be viewed at http://cr.openjdk.java.net/~dxu/7186817/webrev.01/ I did not change the hashCode implementation in this version. It will need further complete tests and another round of code review. But it is a good point to improve our code performance. Please log another bug to address this issue. Thanks! -Dan Thanks Dan, it looks good to me. I'll push this shortly for you. Dan - I've pushed this for you but without the change to the following file: make/tools/sharing/classlist.windows The reason is that file is auto-generated and has a hash at the end so it's not meant to be manually edited. The class list is used by -Xshare:dump to generate the shared archive for class data sharing and is tolerant of missing classes. I think the class lists are a bit of date anyway and are overdue a refresh. -Alan
8000362: (pack200) Deprecate Packer/Unpacker addPropertyChangeLister and removePropertyChangeListener methods
This is a follow-on from yesterday's mail on deprecating the LogManager's add/removePropertyChangeListener methods. The other 4 problematic methods identified in JEP 162 [1] are the same name methods on Pack200.Packer and Pack200.Unpacker. The webrev to deprecate these methods is here: http://cr.openjdk.java.net/~alanb/8000362/webrev/ As with the LogManager methods, Mandy Chung searched 2 projects. In this case we didn't find any usages of these methods and this gives us confidence that these methods are rarely used. We don't propose to provide a replacement for these methods but instead just include wording to suggest that applications poll the value of the progress property if they really need to provide some progress indication. Kumar is the pack200 guru here and I know he's busy/away at the moment so I plan to hold onto this patch until I at least hear from him. -Alan. [1] http://openjdk.java.net/jeps/162
Re: Reviewer needed: 6282196 There should be Math.mod(number, modulo) methods
The floorDiv/floorMod functions do not throw exceptions for out of range values to be consistent with the builtin language math operations. The |toIntExact |method is used by developers because it does the range check and throws an exception. It is cleaner not to mix the semantics of the two operations. Roger On 10/10/2012 10:30 AM, Stephen Colebourne wrote: On 10 October 2012 15:22, Roger Riggsroger.ri...@oracle.com wrote: A reviewer is needed for: 6282196 There should be Math.mod(number, modulo) methods The webrev is: http://cr.openjdk.java.net/~rriggs/6282196.4/ Just to note that floorMod(long, int) is not present. This is often useful as the mod side generally fits in 32 bits, which means the result can fit in 32 bits. This often saves the need to call toIntExact() on the result. Stephen -- Thanks, Roger Oracle Java Platform Group Green Oracle http://www.oracle.com/commitment Oracle is committed to developing practices and products that help protect the environment
Re: 8000362: (pack200) Deprecate Packer/Unpacker addPropertyChangeLister and removePropertyChangeListener methods
The changes look ok to me. -Chris. On 11/10/12 14:40, Alan Bateman wrote: This is a follow-on from yesterday's mail on deprecating the LogManager's add/removePropertyChangeListener methods. The other 4 problematic methods identified in JEP 162 [1] are the same name methods on Pack200.Packer and Pack200.Unpacker. The webrev to deprecate these methods is here: http://cr.openjdk.java.net/~alanb/8000362/webrev/ As with the LogManager methods, Mandy Chung searched 2 projects. In this case we didn't find any usages of these methods and this gives us confidence that these methods are rarely used. We don't propose to provide a replacement for these methods but instead just include wording to suggest that applications poll the value of the progress property if they really need to provide some progress indication. Kumar is the pack200 guru here and I know he's busy/away at the moment so I plan to hold onto this patch until I at least hear from him. -Alan. [1] http://openjdk.java.net/jeps/162
Re: 8000362: (pack200) Deprecate Packer/Unpacker addPropertyChangeLister and removePropertyChangeListener methods
looks fine alan On Oct 11, 2012, at 9:40 AM, Alan Bateman wrote: This is a follow-on from yesterday's mail on deprecating the LogManager's add/removePropertyChangeListener methods. The other 4 problematic methods identified in JEP 162 [1] are the same name methods on Pack200.Packer and Pack200.Unpacker. The webrev to deprecate these methods is here: http://cr.openjdk.java.net/~alanb/8000362/webrev/ As with the LogManager methods, Mandy Chung searched 2 projects. In this case we didn't find any usages of these methods and this gives us confidence that these methods are rarely used. We don't propose to provide a replacement for these methods but instead just include wording to suggest that applications poll the value of the progress property if they really need to provide some progress indication. Kumar is the pack200 guru here and I know he's busy/away at the moment so I plan to hold onto this patch until I at least hear from him. -Alan. [1] http://openjdk.java.net/jeps/162 Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 lance.ander...@oracle.com
Re: Review/comment needed for the new public java.util.Base64 class
On 10/11/2012 02:43 AM, Stephen Colebourne wrote: The class level javadoc is quite short. It also has hyperlinks in the first sentence, which means that they are visible in package level javadoc. Consider having no hyperlinks in the first sentence, and expanding a little on what base 64 is. Sure, will come up something longer. There are lots of other public base 64 implementations to test/check against. http://commons.apache.org/net/api-3.1/org/apache/commons/net/util/Base64.html http://www.cs.berkeley.edu/~jonah/bc/org/bouncycastle/util/encoders/Base64.html http://migbase64.sourceforge.net/ (claims to be fast) I did compare the result against the apache version, the difference appears to be the apache (1)append line feeds at the end of the encoded bytes (2)skip the padding '=' characters for URL-safe style. Will try other implementations. The arrays are defined inconsistently within the code (3 styles). private Encoder(byte[] base64, byte[] newline, int linemax) byte [] getBytes(ByteBuffer bb) private static final byte toBase64[] = I'd strongly encourage one style be used, and that it is the first of the three above. Good catch, the later two are not intentional, the leftover of old code. webrev has been updated according. Thanks! -Sherman Stephen On 10 October 2012 18:54, Xueming Shenxueming.s...@oracle.com wrote: A standard/public API for Base64 encoding and decoding has been long overdue. JDK8 has a JEP [1] for this particular request. Here is the draft proposal to add a public Base64 utility class for JDK8. http://cr.openjdk.java.net/~sherman/4235519/webrev This class basically provides 4 variants of Base64 encoding scheme, (1) the default RFC 4648, which uses standard mapping, no line breaks, (2) the URL-safe RFE 4648, no line breaks, use - and _ to replace + and / for the mapping (3) the default MIME style, as in RFC 2045 (and its earlier versions), which uses standard base64 mapping, a 76 characters per line limit and uses crlf pair \r\n for line break. (4) an extend-able MIME base64, with the char-per-line and the line separator(s) specified by developer. The encoder/decoder now provides encoding and decoding for byte[], String, ByteBuffer and a pair of EncoderInputStream and DecoderOutputStrream, which we believe/hope should satisfy most of the common use cases. Additional method(s) can be added if strongly desired. We tried couple slightly different styles of design for such this simple utility class [2]. We kinda concluded that the version proposed probably provides the best balance among readability, usability and extensibility. Please help review and comment on the API and implementation. Thanks! -Sherman [1] http://openjdk.java.net/jeps/135 [2] http://cr.openjdk.java.net/~sherman/base64/
Reviewer needed for 8000763: use XXX.valueOf methods instead of constructors
Hi, Need a review for changing to use the XXX.valueOf methods from constructors. Thank you Best Lance new-host-2:rowset lanceandersen$ hg status -m M src/share/classes/com/sun/rowset/CachedRowSetImpl.java M src/share/classes/com/sun/rowset/FilteredRowSetImpl.java M src/share/classes/javax/sql/rowset/BaseRowSet.java M src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java new-host-2:rowset lanceandersen$ hg diff diff -r c2be39b27e1c src/share/classes/com/sun/rowset/CachedRowSetImpl.java --- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.javaThu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.javaThu Oct 11 12:43:57 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1747,7 +1747,7 @@ // convert to a Double and compare to zero try { Double d = new Double(value.toString()); -if (d.compareTo(new Double((double)0)) == 0) { +if (d.compareTo(Double.valueOf(0)) == 0) { return false; } else { return true; @@ -4432,7 +4432,7 @@ // make sure the cursor is on a valid row checkCursor(); -Object obj = convertNumeric(new Float(x), +Object obj = convertNumeric(Float.valueOf(x), java.sql.Types.REAL, RowSetMD.getColumnType(columnIndex)); @@ -4467,7 +4467,7 @@ checkIndex(columnIndex); // make sure the cursor is on a valid row checkCursor(); -Object obj = convertNumeric(new Double(x), +Object obj = convertNumeric(Double.valueOf(x), java.sql.Types.DOUBLE, RowSetMD.getColumnType(columnIndex)); diff -r c2be39b27e1c src/share/classes/com/sun/rowset/FilteredRowSetImpl.java --- a/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Oct 11 12:43:57 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -839,7 +839,7 @@ if(onInsertRow) { if(p != null) { -bool = p.evaluate(new Float(x) , columnIndex); +bool = p.evaluate(Float.valueOf(x) , columnIndex); if(!bool) { throw new SQLException(resBundle.handleGetObject(filteredrowsetimpl.notallowed).toString()); @@ -906,7 +906,7 @@ if(onInsertRow) { if(p != null) { -bool = p.evaluate(new Double(x) , columnIndex); +bool = p.evaluate(Double.valueOf(x) , columnIndex); if(!bool) { throw new SQLException(resBundle.handleGetObject(filteredrowsetimpl.notallowed).toString()); diff -r c2be39b27e1c src/share/classes/javax/sql/rowset/BaseRowSet.java --- a/src/share/classes/javax/sql/rowset/BaseRowSet.javaThu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/javax/sql/rowset/BaseRowSet.javaThu Oct 11 12:43:57 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1850,7 +1850,7 @@ if(params == null){ throw new SQLException(Set initParams() before setFloat); } -params.put(Integer.valueOf(parameterIndex - 1), new Float(x)); +params.put(Integer.valueOf(parameterIndex - 1), Float.valueOf(x)); } /** @@ -1882,7 +1882,7 @@ if(params == null){ throw new SQLException(Set initParams() before setDouble); } -params.put(Integer.valueOf(parameterIndex - 1), new Double(x)); +params.put(Integer.valueOf(parameterIndex - 1), Double.valueOf(x)); } /** diff -r c2be39b27e1c src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java --- a/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Thu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Thu Oct 11 12:43:57 2012 -0400 @@ -215,7 +215,7 @@ */ @SuppressWarnings(unchecked) public void writeFloat(float x) throws SQLException { -attribs.add(new Float(x)); +attribs.add(Float.valueOf(x)); } /** @@ -230,7 +230,7 @@ */ @SuppressWarnings(unchecked)
Re: Reviewer needed for 8000763: use XXX.valueOf methods instead of constructors
On 10/11/2012 06:45 PM, Lance Andersen - Oracle wrote: Hi, Need a review for changing to use the XXX.valueOf methods from constructors. Thank you Best Lance Hi Lance, in CachedRowSetImpl, the code is equivalent to return Double.compare(Double.parseDouble(value.toString()), 0) != 0; which avoid to create the Double objects. the rest looks good. cheers, RĂ©mi new-host-2:rowset lanceandersen$ hg status -m M src/share/classes/com/sun/rowset/CachedRowSetImpl.java M src/share/classes/com/sun/rowset/FilteredRowSetImpl.java M src/share/classes/javax/sql/rowset/BaseRowSet.java M src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java new-host-2:rowset lanceandersen$ hg diff diff -r c2be39b27e1c src/share/classes/com/sun/rowset/CachedRowSetImpl.java --- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.javaThu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.javaThu Oct 11 12:43:57 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1747,7 +1747,7 @@ // convert to a Double and compare to zero try { Double d = new Double(value.toString()); -if (d.compareTo(new Double((double)0)) == 0) { +if (d.compareTo(Double.valueOf(0)) == 0) { return false; } else { return true; @@ -4432,7 +4432,7 @@ // make sure the cursor is on a valid row checkCursor(); -Object obj = convertNumeric(new Float(x), +Object obj = convertNumeric(Float.valueOf(x), java.sql.Types.REAL, RowSetMD.getColumnType(columnIndex)); @@ -4467,7 +4467,7 @@ checkIndex(columnIndex); // make sure the cursor is on a valid row checkCursor(); -Object obj = convertNumeric(new Double(x), +Object obj = convertNumeric(Double.valueOf(x), java.sql.Types.DOUBLE, RowSetMD.getColumnType(columnIndex)); diff -r c2be39b27e1c src/share/classes/com/sun/rowset/FilteredRowSetImpl.java --- a/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Oct 11 12:43:57 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -839,7 +839,7 @@ if(onInsertRow) { if(p != null) { -bool = p.evaluate(new Float(x) , columnIndex); +bool = p.evaluate(Float.valueOf(x) , columnIndex); if(!bool) { throw new SQLException(resBundle.handleGetObject(filteredrowsetimpl.notallowed).toString()); @@ -906,7 +906,7 @@ if(onInsertRow) { if(p != null) { -bool = p.evaluate(new Double(x) , columnIndex); +bool = p.evaluate(Double.valueOf(x) , columnIndex); if(!bool) { throw new SQLException(resBundle.handleGetObject(filteredrowsetimpl.notallowed).toString()); diff -r c2be39b27e1c src/share/classes/javax/sql/rowset/BaseRowSet.java --- a/src/share/classes/javax/sql/rowset/BaseRowSet.javaThu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/javax/sql/rowset/BaseRowSet.javaThu Oct 11 12:43:57 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1850,7 +1850,7 @@ if(params == null){ throw new SQLException(Set initParams() before setFloat); } -params.put(Integer.valueOf(parameterIndex - 1), new Float(x)); +params.put(Integer.valueOf(parameterIndex - 1), Float.valueOf(x)); } /** @@ -1882,7 +1882,7 @@ if(params == null){ throw new SQLException(Set initParams() before setDouble); } -params.put(Integer.valueOf(parameterIndex - 1), new Double(x)); +params.put(Integer.valueOf(parameterIndex - 1), Double.valueOf(x)); } /** diff -r c2be39b27e1c src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java --- a/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Thu Oct 11 11:47:05 2012 +0100 +++
Resend: Reviewer needed for 8000763: use XXX.valueOf methods instead of constructors
Hi, Revised CachedRowSetImpl as I noticed Findbugs missed a scenario where you should use the XXX.valueOf methods from constructors. Thank you Best Lance new-host-2:rowset lanceandersen$ hg status -m M src/share/classes/com/sun/rowset/CachedRowSetImpl.java M src/share/classes/com/sun/rowset/FilteredRowSetImpl.java M src/share/classes/javax/sql/rowset/BaseRowSet.java M src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java new-host-2:rowset lanceandersen$ hg diff diff -r c2be39b27e1c src/share/classes/com/sun/rowset/CachedRowSetImpl.java --- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.javaThu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.javaThu Oct 11 13:17:26 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1746,8 +1746,8 @@ // convert to a Double and compare to zero try { -Double d = new Double(value.toString()); -if (d.compareTo(new Double((double)0)) == 0) { +Double d = Double.valueOf(value.toString()); +if (d.compareTo(Double.valueOf(0)) == 0) { return false; } else { return true; @@ -4432,7 +4432,7 @@ // make sure the cursor is on a valid row checkCursor(); -Object obj = convertNumeric(new Float(x), +Object obj = convertNumeric(Float.valueOf(x), java.sql.Types.REAL, RowSetMD.getColumnType(columnIndex)); @@ -4467,7 +4467,7 @@ checkIndex(columnIndex); // make sure the cursor is on a valid row checkCursor(); -Object obj = convertNumeric(new Double(x), +Object obj = convertNumeric(Double.valueOf(x), java.sql.Types.DOUBLE, RowSetMD.getColumnType(columnIndex)); diff -r c2be39b27e1c src/share/classes/com/sun/rowset/FilteredRowSetImpl.java --- a/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Oct 11 13:17:26 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -839,7 +839,7 @@ if(onInsertRow) { if(p != null) { -bool = p.evaluate(new Float(x) , columnIndex); +bool = p.evaluate(Float.valueOf(x) , columnIndex); if(!bool) { throw new SQLException(resBundle.handleGetObject(filteredrowsetimpl.notallowed).toString()); @@ -906,7 +906,7 @@ if(onInsertRow) { if(p != null) { -bool = p.evaluate(new Double(x) , columnIndex); +bool = p.evaluate(Double.valueOf(x) , columnIndex); if(!bool) { throw new SQLException(resBundle.handleGetObject(filteredrowsetimpl.notallowed).toString()); diff -r c2be39b27e1c src/share/classes/javax/sql/rowset/BaseRowSet.java --- a/src/share/classes/javax/sql/rowset/BaseRowSet.javaThu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/javax/sql/rowset/BaseRowSet.javaThu Oct 11 13:17:26 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1850,7 +1850,7 @@ if(params == null){ throw new SQLException(Set initParams() before setFloat); } -params.put(Integer.valueOf(parameterIndex - 1), new Float(x)); +params.put(Integer.valueOf(parameterIndex - 1), Float.valueOf(x)); } /** @@ -1882,7 +1882,7 @@ if(params == null){ throw new SQLException(Set initParams() before setDouble); } -params.put(Integer.valueOf(parameterIndex - 1), new Double(x)); +params.put(Integer.valueOf(parameterIndex - 1), Double.valueOf(x)); } /** diff -r c2be39b27e1c src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java --- a/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Thu Oct 11 11:47:05 2012 +0100 +++ b/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Thu Oct 11 13:17:26 2012 -0400 @@ -215,7 +215,7 @@ */ @SuppressWarnings(unchecked) public void writeFloat(float x) throws SQLException { -attribs.add(new Float(x)); +
Code Review Request: 7198073: (prefs) user prefs not saved [macosx]
Hi, This is a regression introduced by the fix for 7160252[1] that I pushed a few weeks ago. We should really be using the class member field isUser, rather than the argument passed in the constructor as a parameter for cfFileForNode(). Due to this wrong parameter being passed, user preferences were never getting stored into permanent storage. Webrev: http://cr.openjdk.java.net/~khazra/7198073/webrev.00/ Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7198073 Thanks, Kurchi [1] http://cr.openjdk.java.net/~khazra/7160252/webrev.02/
Re: Reviewer needed: 6282196 There should be Math.mod(number, modulo) methods
Hi Roger, The changes look fine. However, I suggest adding an explanatory note along the lines of Normal integer division operates under the round to zero rounding mode (truncation). This operation instead acts under the round to negative infinity (floor) rounding mode. The floor rounding mode gives different results than truncation when the exact result is negative. Thanks, -Joe On 10/10/2012 7:22 AM, Roger Riggs wrote: A reviewer is needed for: 6282196 There should be Math.mod(number, modulo) methods The webrev is: http://cr.openjdk.java.net/~rriggs/6282196.4/ Thanks, Roger