awsdocs / aws-cdk-guide

User guide for the AWS Cloud Development Kit (CDK).
Other
335 stars 222 forks source link

Clarifies the Arrays.asList method #421

Closed Haakon-Lotveit closed 2 years ago

Haakon-Lotveit commented 2 years ago

The list returned by Arrays.asList is Arrays$ArrayList, not ArrayList. Since one is unmodifiable and one is not, this can trip up people. It should also be noted that Java 8's docs says Arrays.asList returns List, not ArrayList[1]. So to make sure that the docs always smell of freshly baked quality, I propose this modest change.

[1] https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ghost commented 2 years ago

Very helpful! Thanks for the contribution. Merging now.