RFR: 8070: Move to JDK 17 leftovers

Brice Dutheil bdutheil at openjdk.org
Wed May 17 16:03:39 UTC 2023


On Wed, 17 May 2023 15:40:40 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> application/org.openjdk.jmc.ui/src/main/java/org/openjdk/jmc/ui/misc/DndToolkit.java line 120:
>> 
>>> 118: 		IDropAction<List<U>, T> action,
>>> 119: 		IDropValidator<List<U>, T> validator
>>> 120: 	) {
>> 
>> **question:** It seems this change is not accepted by the formatter, I can change it back, but do you think we could improve readability if the formatter rules were updated.
>> 
>> 
>> Error:  Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.17.2:check (default-cli) on project org.openjdk.jmc.ui: The following files had format violations:
>> Error:      src/main/java/org/openjdk/jmc/ui/misc/DndToolkit.java
>> Error:          @@ -112,12 +112,8 @@
>> Error:           \t}
>> Error:           
>> Error:           \tpublic·static·<T,·U>·ViewerDropAdapter·createLocalDropListTarget(
>> Error:          -\t\tViewer·viewer,
>> Error:          -\t\tClass<T>·targetType,
>> Error:          -\t\tClass<U>·srcType,
>> Error:          -\t\tIDropAction<List<U>,·T>·action,
>> Error:          -\t\tIDropValidator<List<U>,·T>·validator
>> Error:          -\t)·{
>> Error:          +\t\tViewer·viewer,·Class<T>·targetType,·Class<U>·srcType,·IDropAction<List<U>,·T>·action,
>> Error:          +\t\tIDropValidator<List<U>,·T>·validator)·{
>> Error:           \t\treturn·createLocalDropTarget(viewer,·targetType,·new·IDropAction<ISelection,·T>()·{
>> Error:           
>> Error:           \t\t\t at SuppressWarnings("unchecked")
>> Error:  Run 'mvn spotless:apply' to fix these violations.
>> Error:  -> [Help 1]
>
> Yeah, just seen that. From this output it's not clear to me where the formatting violation is... that's not nice

After `spotless:apply` the code becomes less readable in my opinion:


	public static <T, U> ViewerDropAdapter createLocalDropListTarget(
- 		Viewer viewer,
- 		Class<T> targetType,
- 		Class<U> srcType,
- 		IDropAction<List<U>, T> action,
- 		IDropValidator<List<U>, T> validator
- 	) {
+ 		Viewer viewer, Class<T> targetType, Class<U> srcType, IDropAction<List<U>, T> action,
+ 		IDropValidator<List<U>, T> validator) {

-------------

PR Review Comment: https://git.openjdk.org/jmc/pull/483#discussion_r1196729955


More information about the jmc-dev mailing list