Consistent use of @Nullable in spring-test
This commit also removes nullability from two common spots: ResolvableType.getType() and TargetSource.getTarget(), both of which are never effectively null with any regular implementation. For such scenarios, a non-null empty type/target is the cleaner contract. Issue: SPR-15540
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -22,19 +22,19 @@ package org.springframework.jmx;
|
||||
*/
|
||||
public interface IJmxTestBean {
|
||||
|
||||
public int add(int x, int y);
|
||||
int add(int x, int y);
|
||||
|
||||
public long myOperation();
|
||||
long myOperation();
|
||||
|
||||
public int getAge();
|
||||
int getAge();
|
||||
|
||||
public void setAge(int age);
|
||||
void setAge(int age);
|
||||
|
||||
public void setName(String name) throws Exception;
|
||||
void setName(String name) throws Exception;
|
||||
|
||||
public String getName();
|
||||
String getName();
|
||||
|
||||
// used to test invalid methods that exist in the proxy interface
|
||||
public void dontExposeMe();
|
||||
void dontExposeMe();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -449,24 +449,21 @@ public class RmiSupportTests {
|
||||
}
|
||||
|
||||
|
||||
public static interface IBusinessBean {
|
||||
|
||||
public void setName(String name);
|
||||
public interface IBusinessBean {
|
||||
|
||||
void setName(String name);
|
||||
}
|
||||
|
||||
|
||||
public static interface IWrongBusinessBean {
|
||||
|
||||
public void setOtherName(String name);
|
||||
public interface IWrongBusinessBean {
|
||||
|
||||
void setOtherName(String name);
|
||||
}
|
||||
|
||||
|
||||
public static interface IRemoteBean extends Remote {
|
||||
|
||||
public void setName(String name) throws RemoteException;
|
||||
public interface IRemoteBean extends Remote {
|
||||
|
||||
void setName(String name) throws RemoteException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user