diff --git a/modules/test/whip/src/com/liferay/whip/coveragedata/ProjectDataUtil.java b/modules/test/whip/src/com/liferay/whip/coveragedata/ProjectDataUtil.java index 7d03351a116b8f..4f2956c070bb29 100644 --- a/modules/test/whip/src/com/liferay/whip/coveragedata/ProjectDataUtil.java +++ b/modules/test/whip/src/com/liferay/whip/coveragedata/ProjectDataUtil.java @@ -79,25 +79,15 @@ private static FileLock _lockFile() { } private static ProjectData _readProjectData(File dataFile) { - for (int i = 0; i < _RETRY_TIMES; i++) { - try (FileInputStream fileInputStream = new FileInputStream( - dataFile); - ObjectInputStream objectInputStream = new ObjectInputStream( - fileInputStream)) { + try (FileInputStream fileInputStream = new FileInputStream(dataFile); + ObjectInputStream objectInputStream = new ObjectInputStream( + fileInputStream)) { - return (ProjectData)objectInputStream.readObject(); - } - catch (IOException ioe) { - continue; - } - catch (Exception e) { - throw new RuntimeException(e); - } + return (ProjectData)objectInputStream.readObject(); + } + catch (Exception e) { + throw new RuntimeException(e); } - - throw new IllegalStateException( - "Unable to load project data after retry for " + _RETRY_TIMES + - " times"); } private static void _unlockFile(FileLock fileLock) { @@ -127,8 +117,6 @@ private static void _writeProjectData( } } - private static final int _RETRY_TIMES = 10; - private static final ProjectData _projectData = new ProjectData(); } \ No newline at end of file