8340670: Policy.UNSUPPORTED_EMPTY_COLLECTION.isReadOnly does not return true
Reviewed-by: mullan
This commit is contained in:
parent
8c08c43a34
commit
e3d80f1e1e
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -896,5 +896,15 @@ public abstract class Policy {
|
|||||||
@Override public Enumeration<Permission> elements() {
|
@Override public Enumeration<Permission> elements() {
|
||||||
return perms.elements();
|
return perms.elements();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this object is readonly, no new objects can be added to it using {@code add}.
|
||||||
|
*
|
||||||
|
* @return {@code true} if this object is marked as readonly, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isReadOnly() {
|
||||||
|
return perms.isReadOnly();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user