mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
Added @SafeVarargs annotation for methods with varargs
Suppress compiler warning Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
This commit is contained in:
parent
c11fc9bb46
commit
89fc6af674
3 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,7 @@ public final class Tuples {
|
|||
return new Triple<A, B, C>(a,b,c);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <A,B> Map<A,B> toMap(Pair<A,B>...pairs) {
|
||||
Map<A, B> result = new LinkedHashMap<A, B>();
|
||||
for (Pair<A,B> pair : pairs) {
|
||||
|
|
|
@ -158,6 +158,7 @@ public class NfaToProduction {
|
|||
super();
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public AlternativeAlias(boolean optional, boolean many, AbstractElementAlias<T>... children) {
|
||||
super(optional, many);
|
||||
Collections.addAll(this.children, children);
|
||||
|
@ -243,6 +244,7 @@ public class NfaToProduction {
|
|||
super();
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public GroupAlias(boolean optional, boolean many, AbstractElementAlias<T>... children) {
|
||||
super(optional, many);
|
||||
Collections.addAll(this.children, children);
|
||||
|
|
|
@ -27,6 +27,7 @@ public class RegionsOutsideFrameException extends RuntimeException {
|
|||
private final String frameTitle;
|
||||
private final Pair<String, ITextSegment>[] regions;
|
||||
|
||||
@SafeVarargs
|
||||
public RegionsOutsideFrameException(String title, ITextSegment frame, Pair<String, ITextSegment>... regions) {
|
||||
this.frameTitle = title;
|
||||
this.frameRegion = frame;
|
||||
|
|
Loading…
Reference in a new issue