-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to fix bug that happens during parallel initialization of Re…
…flectionCache. Fixes #47
- Loading branch information
Showing
6 changed files
with
137 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.bol.system.model; | ||
|
||
import com.bol.secure.Encrypted; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static com.bol.system.model.InitBean.MONGO_INITBEAN; | ||
|
||
@Document(collection = MONGO_INITBEAN) | ||
public class InitBean { | ||
public static final String MONGO_INITBEAN = "initbean"; | ||
public static final String MONGO_SUB_BEANS = "subBeans"; | ||
public static final String MONGO_DATA1 = "data1"; | ||
public static final String MONGO_DATA2 = "data2"; | ||
|
||
@Id | ||
public String id; | ||
@Encrypted | ||
public String data1; | ||
public List<InitSubBean> subBeans = new ArrayList<>(); | ||
|
||
// this also tests non-public subdocuments | ||
public void addSubBean(String input) { | ||
InitSubBean initSubBean = new InitSubBean(); | ||
initSubBean.data2 = input; | ||
subBeans.add(initSubBean); | ||
} | ||
} | ||
|
||
class InitSubBean { | ||
@Encrypted | ||
public String data2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters