Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jan 27, 2025
1 parent 5499878 commit 34d6dd9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -225,7 +225,7 @@ public int param3() {
}


private static class NestedDataClass {
static class NestedDataClass {

private final String param1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -180,10 +180,7 @@ public void setDescription(String description) {
@RegisterReflection(memberCategories = MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)
static class AnnotatedSimplePojo {

private String test;

AnnotatedSimplePojo(String test) {
this.test = test;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -405,7 +405,10 @@ void someMethod(T theArg, Object otherArg) {
}


public abstract static class SubBar<T extends StringBuffer> extends InterBar<T> {
public abstract static class SubBar<T extends StringProducer> extends InterBar<T> {
}

public interface StringProducer extends CharSequence {
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,12 @@ void stringListToListOfSubclassOfUnboundGenericClass() {
conversionService.addConverter(new StringListToAListConverter());
conversionService.addConverter(new StringListToBListConverter());

List<ARaw> aList = (List<ARaw>) conversionService.convert(List.of("foo"),
List<?> aList = (List<?>) conversionService.convert(List.of("foo"),
TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(String.class)),
TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(ARaw.class)));
assertThat(aList).allMatch(e -> e instanceof ARaw);

List<BRaw> bList = (List<BRaw>) conversionService.convert(List.of("foo"),
List<?> bList = (List<?>) conversionService.convert(List.of("foo"),
TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(String.class)),
TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(BRaw.class)));
assertThat(bList).allMatch(e -> e instanceof BRaw);
Expand Down Expand Up @@ -945,9 +945,11 @@ public Color convert(String source) {
private static class GenericBaseClass<T> {
}

@SuppressWarnings("rawtypes")
private static class ARaw extends GenericBaseClass {
}

@SuppressWarnings("rawtypes")
private static class BRaw extends GenericBaseClass {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -330,7 +330,7 @@ public void setSomePartList(List<FilePart> somePartList) {
}


private static class MultipartDataClass {
static class MultipartDataClass {

private final FilePart part;

Expand All @@ -351,4 +351,5 @@ public FilePart getNullablePart() {
return nullablePart;
}
}

}

0 comments on commit 34d6dd9

Please sign in to comment.