mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-02-25 14:54:44 +08:00
Update ImportEnter.java
This commit is contained in:
parent
12d39328a8
commit
209ed10857
1 changed files with 7 additions and 8 deletions
|
@ -118,16 +118,15 @@ public class ImportEnter {
|
|||
|
||||
// for TestCase
|
||||
if (!file.exists()) {
|
||||
URL classpathFile = ImportEnter.class.getClassLoader().getResource("com/rebuild/server/business/datas/" + rule.getString("file"));
|
||||
try {
|
||||
file = new File(classpathFile.toURI());
|
||||
} catch (URISyntaxException e) {
|
||||
throw new IllegalArgumentException("File not found : " + file, e);
|
||||
URL testFile = ImportEnter.class.getClassLoader().getResource("com/rebuild/server/business/datas/" + rule.getString("file"));
|
||||
if (testFile != null) {
|
||||
try {
|
||||
file = new File(testFile.toURI());
|
||||
} catch (URISyntaxException e) {
|
||||
throw new IllegalArgumentException("File not found : " + file, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!file.exists()) {
|
||||
throw new IllegalArgumentException("File not found : " + file);
|
||||
}
|
||||
|
||||
int repeatOpt = rule.getIntValue("repeat_opt");
|
||||
Field[] repeatFields = null;
|
||||
|
|
Loading…
Reference in a new issue