<html><head></head><body>Thanks for committing, looks fine with me as well.<br><br><div class="acompli_signature">Gruss<br>Bernd<br></div><br><br><br><br>
<div class="gmail_quote">On Wed, Dec 7, 2016 at 5:25 PM +0100, "Sean Mullan" <span dir="ltr"><<a href="mailto:sean.mullan@oracle.com" target="_blank">sean.mullan@oracle.com</a>></span> wrote:<br>
<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="3D"ltr"">
<pre>Looks good. Minor comment - update the copyright to include 2016 as the 
last year it was updated, ex:

  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights 
reserved.

Send me the updated diffs and I will push it for you.

--Sean

On 12/7/16 9:14 AM, Adam Petcher wrote:
>
> Minor improvement/optimization to ISO10126Padding. Simplifies the code a
> bit and requests one fewer random byte. No regression test is provided
> because this is a code cleanup, and the functionality is covered by
> existing tests.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8158517
>
> Diff:
>
> diff --git
> a/src/java.base/share/classes/com/sun/crypto/provider/ISO10126Padding.java
> b/src/java.base/share/classes/com/sun/crypto/provider/ISO10126Padding.java
> ---
> a/src/java.base/share/classes/com/sun/crypto/provider/ISO10126Padding.java
> +++
> b/src/java.base/share/classes/com/sun/crypto/provider/ISO10126Padding.java
> @@ -68,10 +68,10 @@
>          }
>
>          byte paddingOctet = (byte) (len & 0xff);
> -        byte[] padding = new byte[len];
> +        byte[] padding = new byte[len - 1];
>          SunJCE.getRandom().nextBytes(padding);
> -        padding[len-1] = paddingOctet;
> -        System.arraycopy(padding, 0, in, off, len);
> +        System.arraycopy(padding, 0, in, off, len - 1);
> +        in[off + len - 1] = paddingOctet;
>          return;
>      }
>
> @@ -101,7 +101,7 @@
>              return -1;
>          }
>
> -        int start = off + len - ((int)lastByte & 0x0ff);
> +        int start = off + len - padValue;
>          if (start < off) {
>              return -1;
>          }
</pre>
</div>

</blockquote>
</div>
</body></html>