Skip to content

Commit

Permalink
refactor: Simplify set creation in CtReferenceImpl (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen authored Aug 15, 2021
1 parent b5cd560 commit 140daab
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.Serializable;
import java.lang.reflect.AnnotatedElement;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
Expand All @@ -34,10 +35,10 @@ public abstract class CtReferenceImpl extends CtElementImpl implements CtReferen

// See isKeyword for more information on keywords
private static final Collection<String> baseKeywords = fillWithBaseKeywords();
private static final Collection<String> java2Keywords = Stream.of("strictfp").collect(Collectors.toCollection(HashSet::new));
private static final Collection<String> java4Keywords = Stream.of("assert").collect(Collectors.toCollection(HashSet::new));
private static final Collection<String> java5Keywords = Stream.of("enum").collect(Collectors.toCollection(HashSet::new));
private static final Collection<String> java9Keywords = Stream.of("_").collect(Collectors.toCollection(HashSet::new));
private static final Collection<String> java2Keywords = Collections.singleton("strictfp");
private static final Collection<String> java4Keywords = Collections.singleton("assert");
private static final Collection<String> java5Keywords = Collections.singleton("enum");
private static final Collection<String> java9Keywords = Collections.singleton("_");

@MetamodelPropertyField(role = NAME)
protected String simplename = "";
Expand Down

0 comments on commit 140daab

Please sign in to comment.