Skip to content

Commit 0f3bd5f

Browse files
committed
Add hints for spotbugs.
1 parent c2242c7 commit 0f3bd5f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package net.bytebuddy.utility;
1717

18+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1819
import net.bytebuddy.ClassFileVersion;
1920
import net.bytebuddy.build.AccessControllerPlugin;
2021
import net.bytebuddy.description.enumeration.EnumerationDescription;
@@ -1000,6 +1001,7 @@ public static MethodType ofSetter(Field field) {
10001001
* @param fieldDescription The field to extract a setter type for.
10011002
* @return The type of a setter for the given field.
10021003
*/
1004+
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Assuming declaring type for type member.")
10031005
public static MethodType ofSetter(FieldDescription fieldDescription) {
10041006
return new MethodType(TypeDescription.ForLoadedType.of(void.class), fieldDescription.isStatic()
10051007
? Collections.singletonList(fieldDescription.getType().asErasure())
@@ -1022,6 +1024,7 @@ public static MethodType ofGetter(Field field) {
10221024
* @param fieldDescription The field to extract a getter type for.
10231025
* @return The type of a getter for the given field.
10241026
*/
1027+
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Assuming declaring type for type member.")
10251028
public static MethodType ofGetter(FieldDescription fieldDescription) {
10261029
return new MethodType(fieldDescription.getType().asErasure(), fieldDescription.isStatic()
10271030
? Collections.<TypeDescription>emptyList()

0 commit comments

Comments
 (0)