Source:
private void validate(ReporterConfiguration reporterConfiguration) { try { VideoType.valueOf(VideoType.class, getVideoType()); } catch (IllegalArgumentException ex) { throw new VideoConfigurationException( "Video type you specified in arquillian.xml is not valid video type." + "Supported video types are: " + VideoType.getAll(), ex); } final String report = reporterConfiguration.getReport().toLowerCase(); if (report.contains("htm") || report.contains("ad") || report.equals("asciidoc")) { final File recorderRootDir = new File(reporterConfiguration.getRootDir(), "videos"); if (!getRootDir().equals(recorderRootDir)) { setProperty("rootDir", recorderRootDir.getAbsolutePath()); } } try { if (!getRootDir().exists()) { boolean created = getRootDir().mkdir(); if (!created) { throw new VideoConfigurationException("Unable to create root directory " + getRootDir().getAbsolutePath()); } } else { if (!getRootDir().isDirectory()) { throw new VideoConfigurationException("Root directory you specified is not a directory - " + getRootDir().getAbsolutePath()); } if (!getRootDir().canWrite()) { throw new VideoConfigurationException( "You can not write to '" + getRootDir().getAbsolutePath() + "'."); } } } catch (SecurityException ex) { throw new VideoConfigurationException( "You are not permitted to operate on specified resource: " + getRootDir().getAbsolutePath() + "'.", ex); } try { if (Integer.parseInt(getProperty("width", WIDTH)) < 0) { throw new VideoConfigurationException("It seems you have set width of video to be lower then 0."); } } catch (NumberFormatException ex) { throw new VideoConfigurationException("Provided width of video is not recognized to be an integer number."); } try { if (Integer.parseInt(getProperty("height", HEIGHT)) < 0) { throw new VideoConfigurationException("It seems you have set height of video to be lower then 0."); } } catch (NumberFormatException ex) { throw new VideoConfigurationException("Provided height of video is not recognized to be an integer number."); } }

Target:
private void validate(ReporterConfiguration reporterConfiguration) { try { VideoType.valueOf(VideoType.class, getVideoType()); } catch (IllegalArgumentException ex) { throw new VideoConfigurationException( "Video type you specified in arquillian.xml is not valid video type. " + "The configured video type is: " + getVideoType() + ". " + "The supported video types are: " + VideoType.getAll()); } final String report = reporterConfiguration.getReport().toLowerCase(); if (report.contains("htm") || report.contains("ad") || report.equals("asciidoc")) { final File recorderRootDir = new File(reporterConfiguration.getRootDir(), "videos"); if (!getRootDir().equals(recorderRootDir)) { setProperty("rootDir", recorderRootDir.getAbsolutePath()); } } try { if (!getRootDir().exists()) { boolean created = getRootDir().mkdir(); if (!created) { throw new VideoConfigurationException("Unable to create root directory " + getRootDir().getAbsolutePath()); } } else { if (!getRootDir().isDirectory()) { throw new VideoConfigurationException("Root directory you specified is not a directory - " + getRootDir().getAbsolutePath()); } if (!getRootDir().canWrite()) { throw new VideoConfigurationException( "You can not write to '" + getRootDir().getAbsolutePath() + "'."); } } } catch (SecurityException ex) { throw new VideoConfigurationException( "You are not permitted to operate on specified resource: " + getRootDir().getAbsolutePath() + "'.", ex); } try { if (Integer.parseInt(getProperty("width", WIDTH)) < 0) { throw new VideoConfigurationException("It seems you have set width of video to be lower then 0."); } } catch (NumberFormatException ex) { throw new VideoConfigurationException("Provided width of video is not recognized to be an integer number."); } try { if (Integer.parseInt(getProperty("height", HEIGHT)) < 0) { throw new VideoConfigurationException("It seems you have set height of video to be lower then 0."); } } catch (NumberFormatException ex) { throw new VideoConfigurationException("Provided height of video is not recognized to be an integer number."); } }