@Override public void validate() throws JPValidationException { super.validate(); if (!getValueType().equals((AbstractJavaProperty.ValueType.PropertyDefault))) { logger.warn("Started in hardware simulation mode!!"); } }
@Override public void validate() throws JPValidationException { super.validate(); if (!getValueType().equals((AbstractJavaProperty.ValueType.PropertyDefault))) { logger.warn("Started in hardware simulation mode!!"); } }
@Override public void validate() throws JPValidationException { super.validate(); if (!getValueType().equals((AbstractJavaProperty.ValueType.PropertyDefault))) { try { if (!JPService.getProperty(JPForce.class).getValue()) { logger.warn("Started in benchmark mode!! Make sure no hardware is connected to avoid hardware damage."); String userConfirmation = System.console().readLine("Please confirm the benchmark by pressing 'Y'").toLowerCase(); if (!userConfirmation.contains("y") && !userConfirmation.contains("j") && !userConfirmation.contains("z")) { logger.warn("Benchmark canceled by user..."); System.exit(22); } } } catch (JPNotAvailableException ex) { logger.warn("JPForce property not available", ex); } } }
@Override public void validate() throws JPValidationException { super.validate(); if (!getValueType().equals((AbstractJavaProperty.ValueType.PropertyDefault))) { logger.warn(JPService.getApplicationName() + " started in read only mode!"); } }
@Override public void validate() throws JPValidationException { super.validate(); if (getValueType().equals((ValueType.CommandLine))) { logger.warn("WARNING: OVERWRITING CURRENT SETTINGS!!!"); try { if (JPService.getProperty(JPTestMode.class).getValue()) { return; } } catch (JPServiceException ex) { JPService.printError("Could not access java property!", ex); } logger.warn("=== Type y and press enter to continue ==="); try { if (!(System.in.read() == 'y')) { throw new JPValidationException("Execution aborted by user!"); } } catch (IOException ex) { throw new JPValidationException("Validation failed because of invalid input state!", ex); } } }
@Override public void validate() throws JPValidationException { super.validate(); if (getValueType().equals((AbstractJavaProperty.ValueType.CommandLine))) { logger.warn("WARNING: OVERWRITING CURRENT CREDENTIALS!!!"); try { if (JPService.getProperty(JPTestMode.class).getValue()) { return; } } catch (JPServiceException ex) { ExceptionPrinter.printHistory(new CouldNotPerformException("Could not access java property!", ex), logger); } logger.warn("=== Type y and press enter to contine ==="); try { if (!(System.in.read() == 'y')) { throw new JPValidationException("Execution aborted by user!"); } } catch (IOException ex) { throw new JPValidationException("Validation failed because of invalid input state!", ex); } } }