Repository: nvaccess/nvda

Issue:
NVDA gives error when  selecting text using NVDA+f10 gesture on Java applications
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/blob/master/devDocs/githubIssueTemplateExplanationAndExamples.md
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. 

Each of the questions and sections below start with multiple hash symbols (#). Place your answers and information on the blank line below each question.
-->

### Steps to reproduce:
1. Open a Java application that has an edit field, IntelliJ for example.
2. Press NVDA+f9 and select text with the review cursor.
3. Press NVDA+f10 to copy the text.

### Actual behavior:
<!--
Use "Speak command keys" (NVDA+4) and speech viewer to copy and paste here. 
Use braille viewer to copy and paste here.
You may additionally include an explanation.
-->
When the NVDA+f10 gesture is pressed, nvda keeps silent, however it produces the following message on the log:
  File "JABHandler.pyc", line 569, in selectTextRange
TypeError: this function takes at least 4 arguments (2 given)

### Expected behavior:
<!--
Use "Speak command keys" (NVDA+4) and speech viewer to copy and paste here. 
Use braille viewer to copy and paste here.
You may additionally include an explanation.
-->
NVDA should select the text and report the text whas selected.

### NVDA logs, crash dumps and other attachments:

### System configuration
#### NVDA installed/portable/running from source:
Installed / portable / source.

#### NVDA version:
2022.2.2, 2022.2, alpha-26596,2dbdb2b1 (2022.4.0.26596)

#### Windows version:
Windows 11 21H2 (10.0.22000)

#### Name and version of other software in use when reproducing the issue:
IntelliJ Idea 2022.1.4

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
Yes.

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
Yes, the behavior is the same.

#### If NVDA add-ons are disabled, is your problem still occurring?
Yes.

#### Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Yes.


Discussion:

Resolving patch:
diff --git a/source/JABHandler.py b/source/JABHandler.py
--- a/source/JABHandler.py
+++ b/source/JABHandler.py
@@ -565,8 +565,8 @@ def getCurrentAccessibleValueFromContext(self):
 		bridgeDll.getCurrentAccessibleValueFromContext(self.vmID,self.accContext,buf,SHORT_STRING_SIZE)
 		return buf.value
 
-	def selectTextRange(self,start,end):
-		bridgeDll.selectTextRange(start,end)
+	def selectTextRange(self, start: int, end: int) -> None:
+		bridgeDll.selectTextRange(self.vmID, self.accContext, start, end)
 
 	def setCaretPosition(self,offset):
 		bridgeDll.setCaretPosition(self.vmID,self.accContext,offset)


Test patch: