This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | SecurityException: All swing access to clipboard should be redirected to ExClipboard | ||
---|---|---|---|
Product: | editor | Reporter: | matteodg <matteodg> |
Component: | Actions/Menu/Toolbar | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hmichel, petrk, vkvashin, vv159170 |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 202787 |
Attachments: |
stacktrace
stacktrace stacktrace |
Description
matteodg
2014-10-16 23:04:43 UTC
Created attachment 149950 [details]
stacktrace
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=202787 The code in org.netbeans.editor.BaseCaret.getSystemSelection should be changed to use ExClipboard. If the direct access to system clipboard is desirable, then the check in TopSecurityManager needs to be updated. For example: --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -753,6 +753,9 @@ */ private void checkWhetherAccessedFromSwingTransfer () throws SecurityException { for (Class<?> c : getClassContext()) { + if (c.getName().equals("org.netbeans.editor.BaseCaret")) { // NOI18N + return; + } if (c.getName().equals("javax.swing.TransferHandler$TransferAction")) { throw new SecurityException ("All swing access to clipboard should be redirected to ExClipboard"); // NOI18N } passing to editor to decide and integrate. Created attachment 153553 [details]
stacktrace
tried to cut a rectangular bloc k
*** Bug 252120 has been marked as a duplicate of this bug. *** Created attachment 158389 [details]
stacktrace
paste Ctrl+Shift+D text
Fixed as suggested by Yarda since I did not find any better way. http://hg.netbeans.org/jet-main/rev/50990a2535ba Integrated into 'main-silver', will be available in build *201602090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/50990a2535ba User: Miloslav Metelka <mmetelka@netbeans.org> Log: #Bug 247990 - SecurityException: All swing access to clipboard should be redirected to ExClipboard. |