HDFS-17215. RBF: Fix some method annotations about @throws . (#6136). Contributed by xiaojunxiang.

This commit is contained in:
xiaojunxiang 2023-12-26 03:07:58 +08:00 committed by GitHub
parent 630ffb280d
commit e07e445326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 7 deletions

View File

@ -75,7 +75,7 @@ public class Quota {
* @param storagespaceQuota Storage space quota.
* @param type StorageType that the space quota is intended to be set on.
* @param checkMountEntry whether to check the path is a mount entry.
* @throws AccessControlException If the quota system is disabled or if
* @throws IOException If the quota system is disabled or if
* checkMountEntry is true and the path is a mount entry.
*/
public void setQuota(String path, long namespaceQuota, long storagespaceQuota,

View File

@ -138,7 +138,7 @@ public class StateStoreService extends CompositeService {
* Initialize the State Store and the connection to the back-end.
*
* @param config Configuration for the State Store.
* @throws IOException Cannot create driver for the State Store.
* @throws Exception Cannot create driver for the State Store.
*/
@Override
protected void serviceInit(Configuration config) throws Exception {
@ -239,7 +239,6 @@ public class StateStoreService extends CompositeService {
*
* @param <T> Type of the records stored.
* @param clazz Class of the record store to track.
* @return New record store.
* @throws ReflectiveOperationException
*/
private <T extends RecordStore<?>> void addRecordStore(
@ -428,7 +427,6 @@ public class StateStoreService extends CompositeService {
result = cachedStore.loadCache(force);
} catch (IOException e) {
LOG.error("Error updating cache for {}", cacheName, e);
result = false;
}
if (!result) {
success = false;

View File

@ -70,7 +70,7 @@ public class MountTableStoreImpl extends MountTableStore {
*
* @param src mount entry being accessed
* @param action type of action being performed on the mount entry
* @throws AccessControlException if mount table cannot be accessed
* @throws IOException if mount table cannot be accessed
*/
private void checkMountTableEntryPermission(String src, FsAction action)
throws IOException {
@ -90,7 +90,7 @@ public class MountTableStoreImpl extends MountTableStore {
* Check parent path permission recursively. It needs WRITE permission
* of the nearest parent entry and other EXECUTE permission.
* @param src mount entry being checked
* @throws AccessControlException if mount table cannot be accessed
* @throws IOException if mount table cannot be accessed
*/
private void checkMountTablePermission(final String src) throws IOException {
String parent = src.substring(0, src.lastIndexOf(Path.SEPARATOR));

View File

@ -54,7 +54,7 @@ public class FederationProtocolPBTranslator<P extends GeneratedMessageV3,
* the proto handler this translator holds.
*/
@SuppressWarnings("unchecked")
public void setProto(Message p) {
public void setProto(Message p) throws IllegalArgumentException {
if (protoClass.isInstance(p)) {
if (this.builder != null) {
// Merge with builder