Skip to content

Commit

Permalink
use javax.annotation.Nonnull instead of edu.umd.cs.findbugs.annotatio…
Browse files Browse the repository at this point in the history
…ns.NonNull
  • Loading branch information
B0pol committed Apr 22, 2020
1 parent 632d51d commit 5bb7234
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
package org.schabi.newpipe.extractor.localization;

import edu.umd.cs.findbugs.annotations.NonNull;

import javax.annotation.Nonnull;
import java.io.Serializable;
import java.util.Calendar;

/**
* A wrapper class that provides a field to describe if the date is precise or just an approximation.
*/
public class DateWrapper implements Serializable {
@NonNull private final Calendar date;
@Nonnull private final Calendar date;
private final boolean isApproximation;

public DateWrapper(@NonNull Calendar date) {
public DateWrapper(@Nonnull Calendar date) {
this(date, false);
}

public DateWrapper(@NonNull Calendar date, boolean isApproximation) {
public DateWrapper(@Nonnull Calendar date, boolean isApproximation) {
this.date = date;
this.isApproximation = isApproximation;
}

/**
* @return the wrapped date.
*/
@NonNull
@Nonnull
public Calendar date() {
return date;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public int hashCode() {
* @param code a three letter language code
* @return the Locale corresponding
*/
public static Locale getLocaleFromThreeLetterCode(@NonNull String code) throws ParsingException {
public static Locale getLocaleFromThreeLetterCode(@Nonnull String code) throws ParsingException {
String[] languages = Locale.getISOLanguages();
Map<String, Locale> localeMap = new HashMap<>(languages.length);
for (String language : languages) {
Expand Down

0 comments on commit 5bb7234

Please sign in to comment.