File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/main/java/org/tron/core/config Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,10 @@ public static com.typesafe.config.Config getByFileName(final String shellConfFil
5959 private static void resolveConfigFile (String fileName , File confFile ) {
6060 if (confFile .exists ()) {
6161 config = ConfigFactory .parseFile (confFile );
62- } else {
63- try {
64- ResourceUtils .getFile ("classpath:" + fileName );
65- } catch (FileNotFoundException e ) {
66- throw new IllegalArgumentException ("Configuration path is required! No Such file " + fileName );
67- }
62+ } else if (Thread .currentThread ().getContextClassLoader ().getResourceAsStream (fileName ) != null ) {
6863 config = ConfigFactory .load (fileName );
64+ } else {
65+ throw new IllegalArgumentException ("Configuration path is required! No Such file " + fileName );
6966 }
7067 }
7168}
You can’t perform that action at this time.
0 commit comments