Skip to content

Commit

Permalink
refactor: update core function
Browse files Browse the repository at this point in the history
- Update regex of package paths

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Sep 29, 2023
1 parent 41f7463 commit e58deee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ private static Language createLanguageObjects(URL url, String className) {

static boolean hasPremium(String className) {
return className.matches("org\\.languagetool\\.language\\.(" +
"Portuguese|AngolaPortuguese|BrazilianPortuguese|MozambiquePortuguese|PortugalPortuguese|" +
"German|GermanyGerman|AustrianGerman|SwissGerman|" +
"Dutch|French|Spanish|" +
"English|AustralianEnglish|AmericanEnglish|BritishEnglish|CanadianEnglish|NewZealandEnglish|SouthAfricanEnglish" +
"pt\\.Portuguese|pt\\.AngolaPortuguese|pt\\.BrazilianPortuguese|pt\\.MozambiquePortuguese|pt\\.PortugalPortuguese|" +
"de\\.German|de\\.GermanyGerman|de\\.AustrianGerman|de\\.SwissGerman|" +
"nl\\.Dutch|fr\\.French|es\\.Spanish|" +
"en\\.English|en\\.AustralianEnglish|en\\.AmericanEnglish|en\\.BritishEnglish|en\\.CanadianEnglish|en\\.NewZealandEnglish|en\\.SouthAfricanEnglish" +
")");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@
*/
public final class Contributor {

@Getter
private final String name;

@Getter
private final String url;

/**
* @param name full name
* @param url URL to homepage or similar (optional)
* @param url URL to homepage or similar (optional)
*/
public Contributor(String name, String url) {
this.name = Objects.requireNonNull(name, "name cannot be null");
Expand All @@ -51,4 +48,11 @@ public String toString() {
return name;
}

public String getName() {
return name;
}

public String getUrl() {
return url;
}
}

0 comments on commit e58deee

Please sign in to comment.