提交 9fc47e68 编写于 作者: X xuelei

7127524: P11TlsPrfGenerator has anonymous inner class with serialVersionUID

Reviewed-by: vinnie
上级 3563fdc3
/* /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -96,10 +96,15 @@ final class P11TlsPrfGenerator extends KeyGeneratorSpi { ...@@ -96,10 +96,15 @@ final class P11TlsPrfGenerator extends KeyGeneratorSpi {
} }
} }
// SecretKeySpec does not allow zero length keys, so we define our own class. // SecretKeySpec does not allow zero length keys, so we define our
// own class.
//
// As an anonymous class cannot make any guarantees about serialization
// compatibility, it is nonsensical for an anonymous class to define a
// serialVersionUID. Suppress warnings relative to missing serialVersionUID
// field in the anonymous subclass of serializable SecretKey.
@SuppressWarnings("serial")
private static final SecretKey NULL_KEY = new SecretKey() { private static final SecretKey NULL_KEY = new SecretKey() {
private static final long serialVersionUID = -8090049519656411362L;
public byte[] getEncoded() { public byte[] getEncoded() {
return new byte[0]; return new byte[0];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册