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.

Bug 220870 - NPE: org.netbeans.module.copyfqn.actions.CopyFQNAction.setClipboardContents
Summary: NPE: org.netbeans.module.copyfqn.actions.CopyFQNAction.setClipboardContents
Status: RESOLVED FIXED
Alias: None
Product: third-party
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Michel Graciano
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 19:24 UTC by Michel Graciano
Modified: 2013-02-06 11:52 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 194099


Attachments
stacktrace (3.81 KB, text/plain)
2012-10-25 19:24 UTC, Michel Graciano
Details
stacktrace (343 bytes, text/plain)
2013-02-04 21:04 UTC, Michel Graciano
Details
Simple patch (1.01 KB, patch)
2013-02-04 21:20 UTC, Michel Graciano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2012-10-25 19:24:56 UTC
Build: NetBeans IDE Dev (Build 20121025-2fb84c03e244)
VM: Java HotSpot(TM) Client VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Linux

Stacktrace: 
java.lang.NullPointerException: contents
   at sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:98)
   at org.netbeans.NbClipboard$SetContents.run(NbClipboard.java:446)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2036)
Comment 1 Michel Graciano 2012-10-25 19:24:59 UTC
Created attachment 126575 [details]
stacktrace
Comment 2 Michel Graciano 2013-02-04 21:04:59 UTC
Created attachment 131016 [details]
stacktrace

Copy FQN issue
Comment 3 Michel Graciano 2013-02-04 21:20:44 UTC
Created attachment 131018 [details]
Simple patch

Looks like the fix here is just we do not need to update the system clipboard when there is no data to update (just keep the system clipboard unchanged).
Comment 4 Michel Graciano 2013-02-04 21:25:38 UTC
Jiri,
can you ask someone to review and integrate this simple patch? I tried but looks like I don't have commit permission to contrib anymore.
Comment 5 Michel Graciano 2013-02-06 11:52:24 UTC
I have just pushed a fix for this issue.

main/contrib #a2a369755e1c