Re: RFR: 8265372: Simplify PKCS9Attribute [v8]

2024-02-09 Thread Weijun Wang
On Wed, 31 Jan 2024 20:47:20 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `P

Re: RFR: 8265372: Simplify PKCS9Attribute [v8]

2024-01-31 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute [v7]

2024-01-31 Thread Weijun Wang
On Wed, 31 Jan 2024 18:18:30 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `P

Re: RFR: 8265372: Simplify PKCS9Attribute [v7]

2024-01-31 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute [v6]

2024-01-31 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute [v5]

2024-01-24 Thread Weijun Wang
On Fri, 12 Jan 2024 00:17:32 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `P

Re: RFR: 8265372: Simplify PKCS9Attribute [v5]

2024-01-11 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute [v4]

2024-01-11 Thread Ben Perez
On Thu, 11 Jan 2024 23:42:31 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `P

Re: RFR: 8265372: Simplify PKCS9Attribute [v4]

2024-01-11 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute [v3]

2024-01-11 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-11 Thread Ben Perez
On Wed, 10 Jan 2024 02:53:15 GMT, Valerie Peng wrote: >> src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java line 321: >> >>> 319: >>> 320: this.oid = oid; >>> 321: info = oidMap.get(oid); >> >> What if `info` is `null` (there is no entry for the specified OID)? T

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-11 Thread Ben Perez
On Tue, 2 Jan 2024 21:54:19 GMT, Weijun Wang wrote: >> Do you think we can remove `PKCS9Attributes.getAttributes()` entirely or >> should we just modify it to not use `PKCS9_OIDS` anymore? > > I think we can remove both. There is no need to keep a useless method as long > as it's not an exporte

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-09 Thread Valerie Peng
On Wed, 3 Jan 2024 20:39:57 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `PK

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-09 Thread Valerie Peng
On Thu, 4 Jan 2024 21:04:12 GMT, Sean Mullan wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor fixes to make the code more readable, inlined init(), removed >> PKCS9Attributes.getAttributes() > > src/java.base/sh

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-09 Thread Valerie Peng
On Wed, 3 Jan 2024 20:39:57 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `PK

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-09 Thread Valerie Peng
On Wed, 3 Jan 2024 20:39:57 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `PK

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-09 Thread Valerie Peng
On Thu, 21 Dec 2023 16:46:54 GMT, Weijun Wang wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor fixes to make the code more readable, inlined init(), removed >> PKCS9Attributes.getAttributes() > > src/java.base/s

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-09 Thread Valerie Peng
On Thu, 4 Jan 2024 20:44:01 GMT, Sean Mullan wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor fixes to make the code more readable, inlined init(), removed >> PKCS9Attributes.getAttributes() > > src/java.base/sh

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-04 Thread Sean Mullan
On Wed, 3 Jan 2024 20:39:57 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `PK

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-04 Thread Sean Mullan
On Wed, 3 Jan 2024 20:39:57 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `PK

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-04 Thread Sean Mullan
On Wed, 3 Jan 2024 20:39:57 GMT, Ben Perez wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays `PK

Re: RFR: 8265372: Simplify PKCS9Attribute [v2]

2024-01-03 Thread Ben Perez
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.

Re: RFR: 8265372: Simplify PKCS9Attribute

2024-01-03 Thread Weijun Wang
On Wed, 3 Jan 2024 18:43:41 GMT, Ben Perez wrote: >> src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java line 344: >> >>> 342: info = oidMap.get(oid); >>> 343: Class clazz = (info == null) ? BYTE_ARRAY_CLASS : >>> info.valueClass(); >>> 344: if (clazz == nu

Re: RFR: 8265372: Simplify PKCS9Attribute

2024-01-03 Thread Ben Perez
On Thu, 21 Dec 2023 17:01:08 GMT, Weijun Wang wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays

Re: RFR: 8265372: Simplify PKCS9Attribute

2024-01-02 Thread Weijun Wang
On Tue, 2 Jan 2024 18:22:51 GMT, Ben Perez wrote: >> src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java line 186: >> >>> 184: /** >>> 185: * Array of attribute OIDs defined in PKCS9, by number. >>> 186: */ >> >> I don't think `PKCS9_OIDS` is useful now. It's used in

Re: RFR: 8265372: Simplify PKCS9Attribute

2024-01-02 Thread Ben Perez
On Thu, 21 Dec 2023 16:27:43 GMT, Weijun Wang wrote: >> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The >> key for the hash map is an `ObjectIdentifier` and the values are a record >> `AttributeInfo` that stores the information previously contained in the >> arrays

Re: RFR: 8265372: Simplify PKCS9Attribute

2023-12-21 Thread Weijun Wang
On Fri, 15 Dec 2023 20:34:21 GMT, Ben Perez wrote: > Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9

Re: RFR: 8265372: Simplify PKCS9Attribute

2023-12-21 Thread Weijun Wang
On Fri, 15 Dec 2023 20:34:21 GMT, Ben Perez wrote: > Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9

Re: RFR: 8265372: Simplify PKCS9Attribute

2023-12-21 Thread Weijun Wang
On Fri, 15 Dec 2023 20:34:21 GMT, Ben Perez wrote: > Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The > key for the hash map is an `ObjectIdentifier` and the values are a record > `AttributeInfo` that stores the information previously contained in the > arrays `PKCS9

RFR: 8265372: Simplify PKCS9Attribute

2023-12-15 Thread Ben Perez
Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The key for the hash map is an `ObjectIdentifier` and the values are a record `AttributeInfo` that stores the information previously contained in the arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`. It seem