Skip to content

Commit 06cde1b

Browse files
committed
Minor corrections
Typos, wording, and version correction
1 parent a26adde commit 06cde1b

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

biojava-core/src/main/java/org/biojava/nbio/core/util/FileDownloadUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public static void createValidationFiles(URL url, File localDestination, URL has
195195
* @param resourceUrlConnection the remote file URLConnection to download
196196
* @param localDestination the local file to download into
197197
* @param hashURL the URL of the hash file to download. Can be <code>null</code>.
198-
* @since 6.0.6
198+
* @since 6.1.1
199199
*/
200200
public static void createValidationFiles(URLConnection resourceUrlConnection, File localDestination, URL hashURL){
201201
long size = resourceUrlConnection.getContentLengthLong();
@@ -234,8 +234,8 @@ public static void createValidationFiles(URLConnection resourceUrlConnection, Fi
234234
* <p>
235235
* This function does not implement hash code verification yet.
236236
* @param localFile The file to validate
237-
* @return <code>false</code> if any of the size or hash code metadata files exists but its contents does not match the expected value in the file, <code>true'</code> otherwise.
238-
* @since 6.0.6
237+
* @return <code>false</code> if any of the size or hash code metadata files exists but its contents does not match the expected value in the file, <code>true</code> otherwise.
238+
* @since 6.1.1
239239
*/
240240
public static boolean validateFile(File localFile) {
241241
File sizeFile = new File(localFile.getParentFile(), localFile.getName()+".size");

biojava-core/src/test/java/org/biojava/nbio/core/util/FileDownloadUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ void testValidationFiles() throws IOException{
214214
FileDownloadUtils.downloadFile(sourceUrl, destFile);
215215
assertTrue(destFile.exists(), "couldn't create dest file");
216216

217-
assertTrue(FileDownloadUtils.validateFile(destFile), "file not detected to be invalid although there are no validation files");
217+
assertTrue(FileDownloadUtils.validateFile(destFile), "file detected to be invalid although there are no validation files");
218218

219219
PrintStream temp1 = new PrintStream(sizeFile);
220220
temp1.print(15); // some wrong size value
@@ -232,7 +232,7 @@ void testValidationFiles() throws IOException{
232232
//This is not yet implemented. I am using this test for documentation purpose.
233233
assertThrows(UnsupportedOperationException.class,
234234
() -> FileDownloadUtils.validateFile(destFile),
235-
"file not detected to be invalid although size value is wrong.");
235+
"file not detected to be invalid although hash value is wrong.");
236236

237237
destFile.delete();
238238
sizeFile.delete();

biojava-structure/src/main/java/org/biojava/nbio/structure/ecod/EcodFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public static EcodDatabase getEcodDatabase(String version) {
8989
}
9090
} catch (IOException e) {
9191
// For parsing errors, just use the requested version
92-
// What about corrupted downloading errors?? Amr
93-
logger.warn("Cound not get Ecod version, or file is corrupted", e);
92+
// TODO What about corrupted downloading errors?? Amr
93+
logger.warn("Could not get Ecod version, or file is corrupted", e);
9494
return null;
9595
}
9696
}

0 commit comments

Comments
 (0)