leehaut opened a new pull request, #9214:
URL: https://github.com/apache/hop/pull/9214

   Fix https://github.com/apache/hop/issues/9213
   
   ## Summary
   
   - Guard workflow/pipeline paste against a null or empty clipboard text so 
Ctrl+V no longer throws `NullPointerException` when the OS clipboard has no 
text (e.g. after copying a file). Paste becomes a silent no-op in that case; 
valid Hop clipboard content is unchanged.
   - In the File Explorer perspective, handle Ctrl+C / Ctrl+V with an 
informational dialog: file copy via clipboard is not supported; use drag and 
drop onto the target folder instead.
   
   ## Context
   
   `GuiResource.fromClipboard()` only reads `TextTransfer`. An OS file copy 
leaves text content `null`. Workflow paste then fell into `pasteNoXmlContent` 
and called `clipboardContent.startsWith(...)`, which NPE'd. Users trying to 
copy files with Ctrl+C/V in File Explorer hit the same path.
   
   ## Test plan
   
   - [x] Open a workflow, copy nothing / copy a file in the OS explorer, press 
Ctrl+V → no error dialog, canvas unchanged
   - [x] Copy actions/transforms in Hop, paste → still works
   - [x] Paste plain text onto a workflow canvas → still creates a note 
(non-empty non-XML path)
   - [x] File Explorer: Ctrl+C or Ctrl+V → info dialog about drag and drop
   - [x] File Explorer: drag a file onto a folder → copy/move still works
   - [x] Pipeline: same empty-clipboard and normal paste checks as workflow


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to