You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eclipse shows an Error (Syntax error on token "RestrictedIdentifierWhen", delete this token) when using the Mockito when method which is a static import.
The error is just shown for the first occurence of a 'when' in a test Method.
If i see it correctly 'when' is a restricted identifiers in a 'switch case' statement.
Workarround is to use the fully qualified name org.mockito.Mockito.when.
I use the following version:
Eclipse JDT (Java Development Tools) Patch with Java 21 support for 2023-09 development stream 1.2.300.v20230920-0334_BETA_JAVA21 org.eclipse.jdt.java21patch.feature.group Eclipse.org
Eclipse shows an Error (Syntax error on token "RestrictedIdentifierWhen", delete this token) when using the Mockito when method which is a static import.
The error is just shown for the first occurence of a 'when' in a test Method.
If i see it correctly 'when' is a restricted identifiers in a 'switch case' statement.
Workarround is to use the fully qualified name org.mockito.Mockito.when.
I use the following version:
Eclipse JDT (Java Development Tools) Patch with Java 21 support for 2023-09 development stream 1.2.300.v20230920-0334_BETA_JAVA21 org.eclipse.jdt.java21patch.feature.group Eclipse.org
RestrictedIdentifierWhenExample.txt
The text was updated successfully, but these errors were encountered: