Skip to content

Commit 8912970

Browse files
committed
Made breaking changes more breaking
1 parent f163221 commit 8912970

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

phase4-lib/src/main/java/com/helger/phase4/config/AS4Configuration.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.helger.commons.ValueEnforcer;
2929
import com.helger.commons.concurrent.SimpleReadWriteLock;
3030
import com.helger.commons.equals.EqualsHelper;
31+
import com.helger.commons.exception.InitializationException;
3132
import com.helger.commons.io.resource.IReadableResource;
3233
import com.helger.commons.io.resourceprovider.ClassPathResourceProvider;
3334
import com.helger.commons.io.resourceprovider.FileSystemResourceProvider;
@@ -70,11 +71,17 @@ public final class AS4Configuration
7071
{
7172
// Since 0.11.0 - remove in 1.0
7273
if (StringHelper.hasText (SystemProperties.getPropertyValueOrNull ("phase4.server.configfile")))
73-
LOGGER.error ("The system property 'phase4.server.configfile' is no longer supported. See https://github.com/phax/ph-commons#ph-config for alternatives.");
74+
throw new InitializationException ("The system property 'phase4.server.configfile' is no longer supported." +
75+
" See https://github.com/phax/ph-commons#ph-config for alternatives." +
76+
" Consider using the system property 'config.file' instead.");
7477
if (StringHelper.hasText (SystemProperties.getPropertyValueOrNull ("as4.server.configfile")))
75-
LOGGER.error ("The system property 'as4.server.configfile' is no longer supported. See https://github.com/phax/ph-commons#ph-config for alternatives.");
78+
throw new InitializationException ("The system property 'as4.server.configfile' is no longer supported." +
79+
" See https://github.com/phax/ph-commons#ph-config for alternatives." +
80+
" Consider using the system property 'config.file' instead.");
7681
if (StringHelper.hasText (System.getenv ().get ("PHASE4_SERVER_CONFIG")))
77-
LOGGER.error ("The environment variable 'PHASE4_SERVER_CONFIG' is no longer supported. See https://github.com/phax/ph-commons#ph-config for alternatives.");
82+
throw new InitializationException ("The environment variable 'PHASE4_SERVER_CONFIG' is no longer supported." +
83+
" See https://github.com/phax/ph-commons#ph-config for alternatives." +
84+
" Consider using the environment variable 'CONFIG_FILE' instead.");
7885
}
7986

8087
/**

0 commit comments

Comments
 (0)