Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Commit

Permalink
Fix unable to create AttributeConverter instance
Browse files Browse the repository at this point in the history
  • Loading branch information
svenpopping authored and Julian committed Jan 7, 2022
1 parent b71f500 commit eafb232
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ abstract class AbstractCryptoConverter<T> implements AttributeConverter<T, Strin
/** CipherInitializer. */
private CipherInitializer cipherInitializer;

/**
* AbstractCryptoConverter constructor.
*/
public AbstractCryptoConverter() {
this(new CipherInitializer());
}

/**
* AbstractCryptoConverter constructor.
*
* @param cipherInitializer of type CipherInitializer
*/
AbstractCryptoConverter(CipherInitializer cipherInitializer) {
public AbstractCryptoConverter(CipherInitializer cipherInitializer) {
this.cipherInitializer = cipherInitializer;
}

Expand Down
11 changes: 10 additions & 1 deletion src/main/java/ch/wisv/converters/StringCryptoConverter.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
package ch.wisv.converters;

import javax.persistence.Converter;
import static org.apache.commons.lang3.StringUtils.isNotEmpty;

/**
* StringCryptoConverter.
*/
@Converter
public class StringCryptoConverter extends AbstractCryptoConverter<String> {

/**
* StringCryptoConverter constructor.
*/
public StringCryptoConverter() {
this(new CipherInitializer());
}

/**
* StringCryptoConverter constructor.
*
* @param cipherInitializer of type CipherInitializer
*/
StringCryptoConverter(CipherInitializer cipherInitializer) {
public StringCryptoConverter(CipherInitializer cipherInitializer) {
super(cipherInitializer);
}

Expand Down

0 comments on commit eafb232

Please sign in to comment.