P_W999 avatar P_W999 committed cf925cf

- checkstyle, findbugs, source cleanup

Comments (0)

Files changed (17)

src/be/pw/jexif/DemoApp.java

 			LOG.error(e1.getMessage());
 		}
 		tool.stop();
-		/*IMessageConveyor mc = new MessageConveyor(Locale.ENGLISH);
-		System.out.println(mc.getMessage(Errors.GENERAL, "test"));
-
-		mc = new MessageConveyor(new Locale("nl"));
-		System.out.println(mc.getMessage(Errors.GENERAL, "test"));
-
-		System.out.println(Cal10nUtil.get(Errors.GENERAL, "test"));*/
-		
-		
+		/*
+		 * IMessageConveyor mc = new MessageConveyor(Locale.ENGLISH); System.out.println(mc.getMessage(Errors.GENERAL, "test")); mc = new MessageConveyor(new Locale("nl")); System.out.println(mc.getMessage(Errors.GENERAL, "test")); System.out.println(Cal10nUtil.get(Errors.GENERAL, "test"));
+		 */
 
 		JExifInfo gpsInfo = tool.getInfo(gps);
 		// 50.84791165546716N 4.350469368264016E == Bourse @ Brussels
 		gpsInfo.setGPSInfo("60 35 13.08", "S", "131 50 9.38", "W", "100", "1");
 		tool.stop();
 
-		/*System.out.println(Cal10nUtil.get(Errors.VALIDATION_RAT_FOR_INT));
-		Cal10nUtil.changeLocale(Locale.ENGLISH);
-		System.out.println(Cal10nUtil.get(Errors.VALIDATION_RAT_FOR_INT));
-		Cal10nUtil.changeLocale(new Locale("nl"));
-		System.out.println(Cal10nUtil.get(Errors.VALIDATION_RAT_FOR_INT));*/
-		
+		/*
+		 * System.out.println(Cal10nUtil.get(Errors.VALIDATION_RAT_FOR_INT)); Cal10nUtil.changeLocale(Locale.ENGLISH); System.out.println(Cal10nUtil.get(Errors.VALIDATION_RAT_FOR_INT)); Cal10nUtil.changeLocale(new Locale("nl")); System.out.println(Cal10nUtil.get(Errors.VALIDATION_RAT_FOR_INT));
+		 */
+
 		LOG.info("Executing took {} ms", watch.elapsedTime(TimeUnit.MILLISECONDS));
 		LOG.info("Finished main method");
 	}

src/be/pw/jexif/JExifTool.java

 	 */
 	private final File argsFile = new File("args");
 	/**
-	 * The writer for {@link be.pw.jexif.JExifTool#argsFile}
+	 * The writer for {@link be.pw.jexif.JExifTool#argsFile}.
 	 */
 	private FileWriter argsWriter = null;
 	/**
-	 * The path to the ExifTool executable. If the system property was not defined, the application will back to the current directory and expects the executable to be called "exiftool.exe". <br />
+	 * The path to the ExifTool executable. If the system property was not defined, the application will back to the current directory and expects the executable to be called "exiftool.exe".
+	 * <p>
 	 * @see be.pw.jexif.internal.constants.ExecutionConstant#EXIFTOOLPATH
 	 */
 	private final File exifToolPath = new File(System.getProperty(ExecutionConstant.EXIFTOOLPATH, ".\\exiftool.exe"));
 	/**
-	 * Timeout in milliseconds before the application decides that the for-looping which is waiting for the ExifTool output has deadlocked.<br />
+	 * Timeout in milliseconds before the application decides that the for-looping which is waiting for the ExifTool output has deadlocked.
+	 * <p>
 	 * This might happen if all of a sudden ExifTool crashes or is not up and running.
 	 * @see be.pw.jexif.internal.constants.ExecutionConstant#EXIFTOOLDEADLOCK
 	 */
 	 * Starts the ExifTool process using Apache Commons Exec This method is automatically called when a new instance of JExifTool is created.
 	 * @throws JExifException if failed to start thread.
 	 */
-	private synchronized void start() throws JExifException {
+	private void start() throws JExifException {
 		LOG.info("Starting ExifTool");
 		LOG.trace("Using exifToolPath in: " + exifToolPath.getAbsolutePath());
 		LOG.trace("Argsfile is stored in: " + argsFile.getAbsolutePath());
 			executor.setProcessDestroyer(new ShutdownHookProcessDestroyer());
 			executor.execute(cl, resultHandler);
 			LOG.info("ExifTool was started");
-			Thread.sleep(500);	//wait a bit to ensure process has started
+			Thread.sleep(250); // wait a bit to ensure process has started
 		} catch (IOException e) {
 			LOG.debug("Failed to start ExifTool", e);
 			throw new JExifException(Cal10nUtil.get(Errors.IO_ARGSFILE), e);
 	 * Starts the ExifTool process if needed
 	 * @throws JExifException if failed to start ExifTool.
 	 */
-	private synchronized void startIfNecessary() throws JExifException {
+	private void startIfNecessary() throws JExifException {
 		if (resultHandler != null) {
 			if (resultHandler.hasResult() || executor.getWatchdog().killedProcess()) {
 				LOG.info("Restarting ExifTool");
 	 * @throws JExifException if it failed to stop (there is a Thread.sleep which may throw an InterruptedException).
 	 */
 	@Beta
-	public synchronized void stop() throws JExifException {
+	public void stop() throws JExifException {
 		try {
 			LOG.info("Stopping ExifTool process");
 			argsWriter.append(ExecutionConstant.STAY_OPEN).append("\r\n");
 			argsWriter.append("false\n");
-			argsWriter.flush();	
+			argsWriter.flush();
 			executor.setWatchdog(new ExecuteWatchdog(1500));
-			while (!resultHandler.hasResult());	//wait for ExifTool to stop
+			while (!resultHandler.hasResult()) {
+				; // wait for ExifTool to stop
+			}
 			LOG.info("ExifTool stopped");
 		} catch (IOException e) {
 			LOG.debug("Failed to stop ExifTool", e);
 			}
 			handler = new EventHandler();
 			bus.register(handler);
-			
+
 			String[] arguments = action.buildArguments();
 			for (String argument : arguments) {
 				argsWriter.append(argument).append("\r\n");
 			action = ActionFactory.createTagWriteAction(file, valuesToWrite);
 			handler = new EventHandler();
 			bus.register(handler);
-			
+
 			String[] arguments = action.buildArguments();
 			for (String argument : arguments) {
 				argsWriter.append(argument).append("\r\n");
 			String[] arguments = action.buildArguments();
 			handler = new EventHandler();
 			bus.register(handler);
-			
+
 			for (String argument : arguments) {
 				argsWriter.append(argument).append("\r\n");
 			}
 			}
 			handler = new EventHandler();
 			bus.register(handler);
-			
+
 			String[] arguments = action.buildArguments();
 			for (String argument : arguments) {
 				argsWriter.append(argument).append("\r\n");

src/be/pw/jexif/enums/tag/ExifIFD.java

  */
 public enum ExifIFD implements Tag {
 
-	APERTUREVALUE("ApertureValue", false, false, false, RAT64U), APPLICATIONNOTES("ApplicationNotes", true, false, false, INT8U), BRIGHTNESS("Brightness", false, true, false, STRING), BRIGHTNESSVALUE("BrightnessValue", false, false, false, RAT64S), CFAPATTERN("CFAPattern", false, false, false, UNDEF), COLORSPACE("ColorSpace", false, false, false, INT16U), COMPONENTSCONFIGURATION("ComponentsConfiguration", true, false, false, UNDEF), COMPRESSEDBITSPERPIXEL("CompressedBitsPerPixel", true, false, false, RAT64U), CONTRAST("Contrast", false, false, false, INT16U), CONVERTER("Converter", false, true, false, STRING), CREATEDATE("CreateDate", false, false, false, STRING), CUSTOMRENDERED("CustomRendered", false, false, false, INT16U), DATETIMEORIGINAL("DateTimeOriginal", false, false, false, STRING), DIGITALZOOMRATIO("DigitalZoomRatio", false, false, false, RAT64U), EXIFIMAGEHEIGHT("ExifImageHeight", false, false, false, INT16U), EXIFIMAGEWIDTH("ExifImageWidth", false, false, false, INT16U), EXIFVERSION("ExifVersion", false, false, false, UNDEF), EXPOSURE("Exposure", false, true, false, STRING), EXPOSURECOMPENSATION("ExposureCompensation", false, false, false, RAT64S), EXPOSUREINDEX("ExposureIndex", false, false, false, RAT64U), EXPOSUREMODE("ExposureMode", false, false, false, INT16U), EXPOSUREPROGRAM("ExposureProgram", false, false, false, INT16U), EXPOSURETIME("ExposureTime", false, false, false, RAT64U), FILESOURCE("FileSource", false, false, false, UNDEF), FLASH("Flash", false, false, false, INT16U), FLASHENERGY("FlashEnergy", false, false, false, RAT64U), FLASHPIXVERSION("FlashpixVersion", false, false, false, UNDEF), FNUMBER("FNumber", false, false, false, RAT64U), FOCALLENGTH("FocalLength", false, false, false, RAT64U), FOCALLENGTHIN35MMFORMAT("FocalLengthIn35mmFormat", false, false, false, INT16U), FOCALPLANERESOLUTIONUNIT("FocalPlaneResolutionUnit", false, false, false, INT16U), FOCALPLANEXRESOLUTION("FocalPlaneXResolution", false, false, false, RAT64U), FOCALPLANEYRESOLUTION("FocalPlaneYResolution", false, false, false, RAT64U), GAINCONTROL("GainControl", false, false, false, INT16U), GAMMA("Gamma", false, false, false, RAT64U), IMAGEHISTORY("ImageHistory", false, false, false, STRING), IMAGENUMBER("ImageNumber", false, false, false, INT32U), IMAGEUNIQUEID("ImageUniqueID", false, false, false, STRING), ISO("ISO", false, false, false, INT16U), ISOSPEED("ISOSpeed", false, false, false, INT32U), ISOSPEEDLATITUDEYYY("ISOSpeedLatitudeyyy", false, false, false, INT32U), ISOSPEEDLATITUDEZZZ("ISOSpeedLatitudezzz", false, false, false, INT32U), LENS("Lens", false, true, false, STRING), LENSINFO("LensInfo", false, false, false, RAT64U), LENSMAKE("LensMake", false, false, false, STRING), LENSMODEL("LensModel", false, false, false, STRING), LENSSERIALNUMBER("LensSerialNumber", false, false, false, STRING), LIGHTSOURCE("LightSource", false, false, false, INT16U), MAXAPERTUREVALUE("MaxApertureValue", false, false, false, RAT64U), METERINGMODE("MeteringMode", false, false, false, INT16U), MOIREFILTER("MoireFilter", false, true, false, STRING), OFFSETSCHEMA("OffsetSchema", false, false, false, INT32S), OWNERNAME("OwnerName", false, false, false, STRING), PADDING("Padding", false, false, false, UNDEF), RAWFILE("RawFile", false, true, false, STRING), RECOMMENDEDEXPOSUREINDEX("RecommendedExposureIndex", false, false, false, INT32U), RELATEDSOUNDFILE("RelatedSoundFile", false, false, false, STRING), SATURATION("Saturation", false, false, false, INT16U), SCENECAPTURETYPE("SceneCaptureType", false, false, false, INT16U), SCENETYPE("SceneType", false, false, false, UNDEF), SECURITYCLASSIFICATION("SecurityClassification", false, false, false, STRING), SELFTIMERMODE("SelfTimerMode", false, false, false, INT16U), SENSINGMETHOD("SensingMethod", false, false, false, INT16U), SENSITIVITYTYPE("SensitivityType", false, false, false, INT16U), SERIALNUMBER("SerialNumber", false, false, false, STRING), SHADOWS("Shadows", false, true, false, STRING), SHARPNESS("Sharpness", false, false, false, INT16U), SHUTTERSPEEDVALUE("ShutterSpeedValue", false, false, false, RAT64S), SMOOTHNESS("Smoothness", false, true, false, STRING), SPECTRALSENSITIVITY("SpectralSensitivity", false, false, false, STRING), STANDARDOUTPUTSENSITIVITY("StandardOutputSensitivity", false, false, false, INT32U), SUBJECTAREA("SubjectArea", false, false, false, INT16U), SUBJECTDISTANCE("SubjectDistance", false, false, false, RAT64U), SUBJECTDISTANCERANGE("SubjectDistanceRange", false, false, false, INT16U), SUBJECTLOCATION("SubjectLocation", false, false, false, INT16U), SUBSECTIME("SubSecTime", false, false, false, STRING), SUBSECTIMEDIGITIZED("SubSecTimeDigitized", false, false, false, STRING), SUBSECTIMEORIGINAL("SubSecTimeOriginal", false, false, false, STRING), TIMEZONEOFFSET("TimeZoneOffset", false, false, false, INT16S), USERCOMMENT("UserComment", false, false, false, UNDEF), WHITEBALANCE("WhiteBalance", false, false, false, INT16U), ;
+	APERTUREVALUE("ApertureValue", false, false, false, RAT64U), APPLICATIONNOTES("ApplicationNotes", true, false, false, INT8U), BRIGHTNESS("Brightness", false, true, false, STRING), BRIGHTNESSVALUE("BrightnessValue", false, false, false, RAT64S), CFAPATTERN("CFAPattern", false, false, false, UNDEF), COLORSPACE("ColorSpace", false, false, false, INT16U), COMPONENTSCONFIGURATION("ComponentsConfiguration", true, false, false, UNDEF), COMPRESSEDBITSPERPIXEL("CompressedBitsPerPixel", true, false, false, RAT64U), CONTRAST("Contrast", false, false, false, INT16U), CONVERTER("Converter", false, true, false, STRING), CREATEDATE("CreateDate", false, false, false, STRING), CUSTOMRENDERED("CustomRendered", false, false, false, INT16U), DATETIMEORIGINAL("DateTimeOriginal", false, false, false, STRING), DIGITALZOOMRATIO("DigitalZoomRatio", false, false, false, RAT64U), EXIFIMAGEHEIGHT("ExifImageHeight", false, false, false, INT16U), EXIFIMAGEWIDTH("ExifImageWidth", false, false, false, INT16U), EXIFVERSION("ExifVersion", false, false, false, UNDEF), EXPOSURE("Exposure", false, true, false, STRING), EXPOSURECOMPENSATION("ExposureCompensation", false, false, false, RAT64S), EXPOSUREINDEX("ExposureIndex", false, false, false, RAT64U), EXPOSUREMODE("ExposureMode", false, false, false, INT16U), EXPOSUREPROGRAM("ExposureProgram", false, false, false, INT16U), EXPOSURETIME("ExposureTime", false, false, false, RAT64U), FILESOURCE("FileSource", false, false, false, UNDEF), FLASH("Flash", false, false, false, INT16U), FLASHENERGY("FlashEnergy", false, false, false, RAT64U), FLASHPIXVERSION("FlashpixVersion", false, false, false, UNDEF), FNUMBER("FNumber", false, false, false, RAT64U), FOCALLENGTH("FocalLength", false, false, false, RAT64U), FOCALLENGTHIN35MMFORMAT("FocalLengthIn35mmFormat", false, false, false, INT16U), FOCALPLANERESOLUTIONUNIT("FocalPlaneResolutionUnit", false, false, false, INT16U), FOCALPLANEXRESOLUTION("FocalPlaneXResolution", false, false, false, RAT64U), FOCALPLANEYRESOLUTION("FocalPlaneYResolution", false, false, false, RAT64U), GAINCONTROL("GainControl", false, false, false, INT16U), GAMMA("Gamma", false, false, false, RAT64U), IMAGEHISTORY("ImageHistory", false, false, false, STRING), IMAGENUMBER("ImageNumber", false, false, false, INT32U), IMAGEUNIQUEID("ImageUniqueID", false, false, false, STRING), ISO("ISO", false, false, false, INT16U), ISOSPEED("ISOSpeed", false, false, false, INT32U), ISOSPEEDLATITUDEYYY("ISOSpeedLatitudeyyy", false, false, false, INT32U), ISOSPEEDLATITUDEZZZ("ISOSpeedLatitudezzz", false, false, false, INT32U), LENS("Lens", false, true, false, STRING), LENSINFO("LensInfo", false, false, false, RAT64U), LENSMAKE("LensMake", false, false, false, STRING), LENSMODEL("LensModel", false, false, false, STRING), LENSSERIALNUMBER("LensSerialNumber", false, false, false, STRING), LIGHTSOURCE("LightSource", false, false, false, INT16U), MAXAPERTUREVALUE("MaxApertureValue", false, false, false, RAT64U), METERINGMODE("MeteringMode", false, false, false, INT16U), MOIREFILTER("MoireFilter", false, true, false, STRING), OFFSETSCHEMA("OffsetSchema", false, false, false, INT32S), OWNERNAME("OwnerName", false, false, false, STRING), PADDING("Padding", false, false, false, UNDEF), RAWFILE("RawFile", false, true, false, STRING), RECOMMENDEDEXPOSUREINDEX("RecommendedExposureIndex", false, false, false, INT32U), RELATEDSOUNDFILE("RelatedSoundFile", false, false, false, STRING), SATURATION("Saturation", false, false, false, INT16U), SCENECAPTURETYPE("SceneCaptureType", false, false, false, INT16U), SCENETYPE("SceneType", false, false, false, UNDEF), SECURITYCLASSIFICATION("SecurityClassification", false, false, false, STRING), SELFTIMERMODE("SelfTimerMode", false, false, false, INT16U), SENSINGMETHOD("SensingMethod", false, false, false, INT16U), SENSITIVITYTYPE("SensitivityType", false, false, false, INT16U), SERIALNUMBER("SerialNumber", false, false, false, STRING), SHADOWS("Shadows", false, true, false, STRING), SHARPNESS("Sharpness", false, false, false, INT16U), SHUTTERSPEEDVALUE("ShutterSpeedValue", false, false, false, RAT64S), SMOOTHNESS("Smoothness", false, true, false, STRING), SPECTRALSENSITIVITY("SpectralSensitivity", false, false, false, STRING), STANDARDOUTPUTSENSITIVITY("StandardOutputSensitivity", false, false, false, INT32U), SUBJECTAREA("SubjectArea", false, false, false, INT16U), SUBJECTDISTANCE("SubjectDistance", false, false, false, RAT64U), SUBJECTDISTANCERANGE("SubjectDistanceRange", false, false, false, INT16U), SUBJECTLOCATION("SubjectLocation", false, false, false, INT16U), SUBSECTIME("SubSecTime", false, false, false, STRING), SUBSECTIMEDIGITIZED("SubSecTimeDigitized", false, false, false, STRING), SUBSECTIMEORIGINAL("SubSecTimeOriginal", false, false, false, STRING), TIMEZONEOFFSET("TimeZoneOffset", false, false, false, INT16S), USERCOMMENT("UserComment", false, false, false, UNDEF), WHITEBALANCE("WhiteBalance", false, false, false, INT16U);
 
 	private final boolean avoided;
 	private final boolean unsafe;

src/be/pw/jexif/exception/JExifValidationException.java

 public class JExifValidationException extends JExifException {
 
 	/**
-	 * UID
+	 * UID.
 	 */
 	private static final long serialVersionUID = 3697142392447599863L;
 
 	/**
-	 * Hidden constructor to prevent creation of JExifExceptions without information
+	 * Hidden constructor to prevent creation of JExifExceptions without information.
 	 */
 	@SuppressWarnings("unused")
 	private JExifValidationException() {
 	}
 
 	/**
-	 * @param message the reason of the exception or a clear message for the user
+	 * @param message the reason of the exception or a clear message for the user.
 	 * @param cause the cause
 	 */
 	public JExifValidationException(final String message, final Throwable cause) {
 	}
 
 	/**
-	 * @param message the reason of the exception or a clear message for the user
+	 * @param message the reason of the exception or a clear message for the user.
 	 */
 	public JExifValidationException(final String message) {
 		super(message);

src/be/pw/jexif/internal/action/impl/TagReadExactAction.java

 	@Override
 	public String[] buildArguments() throws JExifException {
 		LOG.trace("Calling super.buildArguments()");
-		String arguments[] = super.buildArguments();
-		String newArguments[] = new String[arguments.length + 1];
+		String[] arguments = super.buildArguments();
+		String[] newArguments = new String[arguments.length + 1];
 		System.arraycopy(arguments, 0, newArguments, 0, arguments.length);
 		newArguments[newArguments.length - 1] = newArguments[newArguments.length - 2]; // shift
 		newArguments[newArguments.length - 2] = newArguments[newArguments.length - 3]; // shift

src/be/pw/jexif/internal/action/impl/TagReadExactAllAction.java

 	@Override
 	public String[] buildArguments() throws JExifException {
 		LOG.trace("Calling super.buildArguments()");
-		String arguments[] = super.buildArguments();
-		String newArguments[] = new String[arguments.length + 1];
+		String[] arguments = super.buildArguments();
+		String[] newArguments = new String[arguments.length + 1];
 		System.arraycopy(arguments, 0, newArguments, 0, arguments.length);
 		newArguments[newArguments.length - 1] = newArguments[newArguments.length - 2]; // shift
 		newArguments[newArguments.length - 2] = newArguments[newArguments.length - 3]; // shift

src/be/pw/jexif/internal/result/impl/ParserFactory.java

  ******************************************************************************/
 package be.pw.jexif.internal.result.impl;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import be.pw.jexif.enums.Errors;
 import be.pw.jexif.exception.JExifException;
 import be.pw.jexif.internal.action.IAction;
 	/**
 	 * Returns an instance of a parser for a given action instance.
 	 * @param action the action for which you want a parser.
+	 * @return the instance of a parser
 	 * @throws JExifException if the action is null or if an unknown action type is given.
 	 */
 	public static IResultParser getInstance(final IAction action) throws JExifException {

src/be/pw/jexif/internal/result/impl/TagReadAllParser.java

 import com.google.common.base.Splitter;
 
 /**
- * Parses the result for the {@link TagReadAllAction}
+ * Parses the result for the {@link TagReadAllAction}.
  * @author phillip
  */
 class TagReadAllParser implements IResultParser {
 	/**
-	 * Logger for this class
+	 * Logger for this class.
 	 */
 	private static final Logger LOG = LoggerFactory.getLogger(TagReadAllParser.class);
 

src/be/pw/jexif/internal/result/impl/TagReadExactParser.java

 import be.pw.jexif.internal.action.ITagReadExactAction;
 
 /**
- * Parses the result for the {@link TagReadExactAction}
+ * Parses the result for the {@link TagReadExactAction}.
  * @author phillip
  */
 class TagReadExactParser extends TagReadParser {

src/be/pw/jexif/internal/result/impl/TagWriteParser.java

 import com.google.common.base.Preconditions;
 
 /**
- * Parses the result for the {@link TagWriteAction}
+ * Parses the result for the {@link TagWriteAction}.
  * @author phillip
  */
 class TagWriteParser implements IResultParser {
 	/**
-	 * Logger for this class
+	 * Logger for this class.
 	 */
 	private static final Logger LOG = LoggerFactory.getLogger(TagWriteParser.class);
 

src/be/pw/jexif/internal/thread/JExifOutputStream.java

 	private EventBus bus;
 	private boolean error;
 	private String buff = null;
-	
-	public JExifOutputStream(EventBus bus, boolean error) throws IOException {
+
+	public JExifOutputStream(final EventBus bus, final boolean error) throws IOException {
 		this.bus = bus;
 		this.error = error;
 	}
-	
+
 	@Override
-	public void write(int b) throws IOException {
-		
+	public void write(final int b) throws IOException {
+
 	}
-	
+
 	@Override
-	public void write(byte[] b, int off, int len) throws IOException {
+	public void write(final byte[] b, final int off, final int len) throws IOException {
 		StringBuilder build = new StringBuilder();
 		if (buff != null) {
 			build.append(buff);
 		}
-		for (int i = 0; i < len; ++i) {	//not newline character
+		for (int i = 0; i < len; ++i) { // not newline character
 			if (b[i] != '\r' && b[i] != '\n') {
-				build.append((char)b[i]);
-			} else if ((i+1) == len || (b[i+1] != '\r' && b[i+1] != '\n')) {	//current = newline, next isn't newline OR at the end of buffer
+				build.append((char) b[i]);
+			} else if ((i + 1) == len || (b[i + 1] != '\r' && b[i + 1] != '\n')) { // current = newline, next isn't newline OR at the end of buffer
 				if (error) {
 					bus.post(new ErrorEvent(build.toString()));
 				} else {
 					bus.post(new InputEvent(build.toString()));
 				}
 				build = new StringBuilder();
-			} 
+			}
 		}
 		if (!build.toString().isEmpty()) {
 			buff = build.toString();

src/be/pw/jexif/internal/thread/event/ErrorEvent.java

  */
 public class ErrorEvent {
 	/**
-	 * The message which shall be posted to the EventBus
+	 * The message which shall be posted to the EventBus.
 	 */
 	private final String msg;
 
 	/**
-	 * Creates a new ErrorEvent
+	 * Creates a new ErrorEvent.
 	 * @param msg the message to be put in the event.
 	 */
 	public ErrorEvent(final String msg) {

src/be/pw/jexif/internal/thread/event/InputEvent.java

  */
 public class InputEvent {
 	/**
-	 * The message which shall be posted to the EventBus
+	 * The message which shall be posted to the EventBus.
 	 */
 	private final String msg;
 
 	/**
-	 * Creates a new InputEvent
+	 * Creates a new InputEvent.
 	 * @param msg the message to be put in the event.
 	 */
 	public InputEvent(final String msg) {

src/be/pw/jexif/internal/util/Cal10nUtil.java

 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 import be.pw.jexif.enums.Errors;
 import ch.qos.cal10n.IMessageConveyor;
 import ch.qos.cal10n.MessageConveyor;
 import ch.qos.cal10n.MessageConveyorException;
 
+import com.google.common.base.Preconditions;
+
 /**
  * A utility for i18n'ing the API's output. <br />
  * Uses Cal10n: <a href="http://cal10n.qos.ch/">http://cal10n.qos.ch/</a>
  * @author phillip
  */
 public final class Cal10nUtil {
-	
+
 	/**
 	 * Logger for this class.
 	 */
 	private static final Logger LOG = LoggerFactory.getLogger(Cal10nUtil.class);
-	
+
 	/**
 	 * The application wide MessageConveyor.
 	 */
 	 * List containing the supported Languages.
 	 */
 	private static final List<Locale> supportedLanguages;
-	
+
 	static {
 		supportedLanguages = new ArrayList<>(2);
 		supportedLanguages.add(Locale.ENGLISH);
 		}
 		mc = new MessageConveyor(l);
 	}
-	
+
 	public static void changeLocale(Locale l) {
 		Preconditions.checkNotNull(l, "Provided locale can not be null");
 		if (!supportedLanguages.contains(l)) {
 		}
 		mc = new MessageConveyor(l);
 	}
-	
+
 	/**
 	 * Returns an i18n'ed error message.
 	 * @param error the error-message.
 			return b.toString();
 		}
 	}
-	
+
 	/**
 	 * Returns a list of supported languages.
-	 * @return
+	 * @return the list of supported locales
 	 */
 	public static final List<Locale> getSupportedLanguages() {
 		return supportedLanguages;

src/be/pw/jexif/internal/util/GPSUtil.java

 	 * <li>{@link ExifGPS#GPSLATITUDE}</li>
 	 * <li>{@link ExifGPS#GPSLATITUDEREF}</li>
 	 * </ul>
-	 * @param valuesToValidate the map with the GPS values
+	 * @param valuesToValidate the map with the GPS values.
 	 * @throws JExifValidationException
 	 */
 	public static void validateGPSValues(final Map<Tag, String> valuesToValidate) throws JExifValidationException {

src/be/pw/jexif/internal/util/TagUtil.java

 	 */
 	private static final Map<String, Tag> TAG_LOOKUP_MAP = new HashMap<>(246); // at v0.0.3, the supported tag count is 246
 	/**
-	 * The minimum value for an Unsigned Int8
+	 * The minimum value for an Unsigned Int8.
 	 */
 	private static final Integer MIN_INT8U = -128;
 	/**
-	 * The maximum value for an Unsigned Int8
+	 * The maximum value for an Unsigned Int8.
 	 */
 	private static final Integer MAX_INT8S = 127;
 	/**
-	 * The maximum value for a Signed Int8
+	 * The maximum value for a Signed Int8.
 	 */
 	private static final Integer MAX_INT8U = 255;
 	/**
-	 * The maximum value for an Unsigned Int16
+	 * The maximum value for an Unsigned Int16.
 	 */
 	private static final Long MAX_INT16U = 65535L;
 	/**
-	 * The maximum value for an Unsigned Int32
+	 * The maximum value for an Unsigned Int32.
 	 */
 	private static final Float MAX_INT32U = 4294967295F;
 

test/be/pw/jexif/JExifToolTest.java

 	@BeforeMethod(alwaysRun = true)
 	public void beforeTest() {
 		System.setProperty(ExecutionConstant.EXIFTOOLPATH, exifTool.getAbsolutePath());
-		tool = new JExifTool();
+		try {
+			tool = new JExifTool();
+		} catch (JExifException e) {
+			Fail.fail(e.getMessage());
+		}
 	}
 
 	@BeforeMethod(groups = { "write", "medium" }, alwaysRun = true)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.