-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A stub type to use instead of relying on Java API, which, in Java 21 has lost the java.lang.annotation.Target} specification.
- Loading branch information
1 parent
51a4ae2
commit 2791444
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
org.eclipse.xtend.core.tests/testdata/testdata/stubs/StubbedSuppressWarnings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lorenzo Bettini and others. | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package testdata.stubs; | ||
|
||
import static java.lang.annotation.ElementType.*; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* A stub type to use instead of relying on Java API {@link SuppressWarnings}, which, in Java 21 has lost the | ||
* {@link java.lang.annotation.Target} specification. | ||
* | ||
* @author Lorenzo Bettini - Initial contribution and API | ||
*/ | ||
@Target({ TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, MODULE }) | ||
@Retention(RetentionPolicy.SOURCE) | ||
public @interface StubbedSuppressWarnings { | ||
String[] value(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters