Skip to content

Commit

Permalink
Replaced JSR-305 annotations with local ones.
Browse files Browse the repository at this point in the history
Workaround until issue #5 is solved
  • Loading branch information
michael-schnell committed Jan 4, 2020
1 parent 8124c45 commit 8e39958
Show file tree
Hide file tree
Showing 36 changed files with 51 additions and 44 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/fuin/objects4j/common/Contract.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.List;
import java.util.Set;

import javax.annotation.Nullable;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;

import javax.annotation.Nullable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Nullable;

/**
* Wrapper for a class that has some annotations to perform some actions with.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/ui/ClassTextInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
package org.fuin.objects4j.ui;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

/**
* Stores some text associated with a class.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/ui/FontSize.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import java.io.Serializable;
import java.text.DecimalFormat;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

/**
* Size of a font including the unit.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/ui/TableColumnInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
import java.util.List;
import java.util.Locale;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;

/**
* Table column information for a field of a class.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/ui/TextFieldInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import java.lang.reflect.Field;
import java.util.Locale;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

/**
* Information about a text field.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/ui/TextInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.ui;

import javax.annotation.concurrent.Immutable;
import org.fuin.objects4j.common.Immutable;

/**
* Stores some text.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/vo/CurrencyAmount.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import java.math.BigInteger;
import java.util.Currency;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.ui.Label;
import org.fuin.objects4j.ui.ShortLabel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

import java.util.Currency;

import javax.annotation.concurrent.ThreadSafe;
import javax.persistence.AttributeConverter;

import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link CurrencyAmount}.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/vo/DayOfTheWeek.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import java.util.Collections;
import java.util.List;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;
import org.fuin.objects4j.ui.Label;
import org.fuin.objects4j.ui.Prompt;
import org.fuin.objects4j.ui.ShortLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link DayOfTheWeek} into a String and back.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/vo/DayOpeningHours.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;
import org.fuin.objects4j.ui.Prompt;
import org.fuin.objects4j.vo.HourRanges.ChangeType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link DayOpeningHours} into a String and back.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/vo/EmailAddress.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.Immutable;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.ui.Label;
import org.fuin.objects4j.ui.ShortLabel;
import org.fuin.objects4j.ui.Tooltip;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

import org.fuin.objects4j.common.ThreadSafe;

/**
* Creates a {@link EmailAddress}.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/vo/Hour.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

import java.util.regex.Pattern;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;
import org.fuin.objects4j.ui.Label;
import org.fuin.objects4j.ui.Prompt;
import org.fuin.objects4j.ui.ShortLabel;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/vo/HourConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link Hour} into a String and back.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/vo/HourRange.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
import java.util.BitSet;
import java.util.List;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;
import org.fuin.objects4j.ui.Label;
import org.fuin.objects4j.ui.Prompt;
import org.fuin.objects4j.ui.ShortLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link HourRange} into a String and back.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/vo/HourRanges.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import java.util.List;
import java.util.StringTokenizer;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;
import org.fuin.objects4j.ui.Prompt;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts {@link HourRanges} into a String and back.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/vo/KeyValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import java.util.HashMap;
import java.util.Map;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

/**
* Container for a key and a value.
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/fuin/objects4j/vo/LocaleConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import java.util.Locale;
import java.util.StringTokenizer;

import javax.annotation.concurrent.ThreadSafe;
import javax.persistence.AttributeConverter;
import javax.xml.bind.annotation.adapters.XmlAdapter;

import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link Locale} into a String and back.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fuin/objects4j/vo/MultiDayOfTheWeek.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import java.util.List;
import java.util.StringTokenizer;

import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;
import org.fuin.objects4j.ui.Prompt;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts {@link MultiDayOfTheWeek} into a String and back.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/vo/Password.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.ui.Label;
import org.fuin.objects4j.ui.ShortLabel;
import org.fuin.objects4j.ui.Tooltip;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/fuin/objects4j/vo/PasswordConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

import org.fuin.objects4j.common.ThreadSafe;

/**
* Creates a {@link Password}.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fuin/objects4j/vo/PasswordSha512.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.ConstraintViolationException;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

/**
* SHA-512 hashed password that is HEX encoded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
*/
package org.fuin.objects4j.vo;

import javax.annotation.concurrent.ThreadSafe;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

import org.fuin.objects4j.common.ThreadSafe;

/**
* Creates a {@link PasswordSha512}.
*/
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/fuin/objects4j/vo/SecurityToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

import javax.annotation.concurrent.Immutable;
import javax.validation.constraints.NotNull;

import org.fuin.objects4j.common.Immutable;

/**
* Creates a BASE64 encoded string based on a SHA1PRNG {@link SecureRandom}.
*/
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/fuin/objects4j/vo/UUIDConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@

import java.util.UUID;

import javax.annotation.concurrent.ThreadSafe;
import javax.persistence.AttributeConverter;
import javax.xml.bind.annotation.adapters.XmlAdapter;

import org.fuin.objects4j.common.ThreadSafe;

/**
* Converts a {@link UUID} into a String and back.
*/
Expand Down
Loading

0 comments on commit 8e39958

Please sign in to comment.