From 46b71c810ce3ee52b1e00f63e21aa5c5d3fb5ca6 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 19 Feb 2019 00:09:03 +0100 Subject: [issue #2039] update docs to warn about a javac peculiarity for named static imports. --- website/templates/features/experimental/UtilityClass.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'website/templates/features/experimental/UtilityClass.html') diff --git a/website/templates/features/experimental/UtilityClass.html b/website/templates/features/experimental/UtilityClass.html index 4cee3657..c5f51e29 100644 --- a/website/templates/features/experimental/UtilityClass.html +++ b/website/templates/features/experimental/UtilityClass.html @@ -39,6 +39,8 @@ <@f.smallPrint>

There isn't currently any way to create non-static members, or to define your own constructor. If you want to instantiate the utility class, even only as an internal implementation detail, @UtilityClass cannot be used. +

+ Due to a peculiar way javac processes static imports, trying to do a non-star static import of any of the members of a `@UtilityClass` won't work. Either use a star static import: `import static TypeMarkedWithUtilityClass.*;` or don't statically import any of the members.

-- cgit