Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8345001: java/awt/doc-files/FocusSpec.html has SecurityManager references #22377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,6 @@ <h2>Focus and PropertyChangeListener</h2>
the <code>KeyboardFocusManager</code>'s context, even though the
focus owner, focused Window, active Window, and current focus cycle
root comprise the global focus state shared by all contexts.
We believe this is less intrusive than requiring client code to pass
a security check before installing a <code>PropertyChangeListener</code>.
<p>
Component supports the following focus-related properties:

Expand Down Expand Up @@ -1195,26 +1193,6 @@ <h2>Replacing DefaultKeyboardFocusManager</h2>
VetoableChangeListeners, and other concepts discussed in this document
before resorting to a full replacement of the <code>KeyboardFocusManager</code>.
<p>
First note that, because unhindered access to Components in other
contexts represents a security hole, the SecurityManager must grant a
new permission, "replaceKeyboardFocusManager", before client code is
permitted to replace the <code>KeyboardFocusManager</code> with an arbitrary
subclass instance. Because of the security check, replacing the
<code>KeyboardFocusManager</code> is not an option for applications that will be
deployed in environments with a SecurityManager, such as applets in a
browser.
<p>
Once installed, a <code>KeyboardFocusManager</code> instance has
access to the global focus state via a set of protected functions.
The <code>KeyboardFocusManager</code> can only call these functions
if it is installed in the calling thread's context. This ensures
that malicious code cannot circumvent the security check in
<code>KeyboardFocusManager.setCurrentFocusManager</code>.
A <code>KeyboardFocusManager</code> should always work with
the global focus state instead of the context focus state.
Failure to do this will lead to incorrect behavior of the
<code>KeyboardFocusManager</code>.
<p>
The primary responsibility of a <code>KeyboardFocusManager</code>
is the dispatch of the following events:

Expand Down