From 7519e039e801a3302bc7c77ec7612798c33a294e Mon Sep 17 00:00:00 2001 From: Jason Shepherd Date: Wed, 13 Sep 2017 13:33:56 +1000 Subject: [PATCH 1/2] 1.3.5 release --- .gitignore | 1 + README.md | 2 +- pom.xml | 390 ++++++++++-------- .../com/redhat/victims/VictimsConfig.java | 28 +- .../com/redhat/victims/VictimsRecord.java | 4 +- .../redhat/victims/database/VictimsSQL.java | 2 +- .../redhat/victims/database/VictimsSqlDB.java | 12 +- .../redhat/victims/fingerprint/JarFile.java | 2 +- 8 files changed, 241 insertions(+), 200 deletions(-) diff --git a/.gitignore b/.gitignore index 425f092..6a7d088 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.class +release.properties # Package Files # *.jar diff --git a/README.md b/README.md index 85621a1..b6e1227 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ victims-lib-java [![Build Status](https://travis-ci.org/victims/victims-lib-java ================ A java library providing fingerprinting and service interaction for the Victims Project. -Current version is ```1.3.2```. +Current version is ```1.3.3```. ### GPG Keys Download: [pgp.mit.edu](http://pgp.mit.edu:11371/pks/lookup?search=0xEEE72232&op=index) diff --git a/pom.xml b/pom.xml index 2b32096..5382543 100644 --- a/pom.xml +++ b/pom.xml @@ -1,177 +1,227 @@ - - org.sonatype.oss - oss-parent - 7 - - 4.0.0 - com.redhat.victims - victims-lib - 1.4-SNAPSHOT - jar - - - com.google.code.gson - gson - 2.2.3 - - - org.apache.bcel - bcel - 5.2 - - - commons-codec - commons-codec - 1.7 - - - commons-io - commons-io - 2.4 - - - junit - junit - 4.11 - test - - - com.h2database - h2 - 1.4.182 - - - commons-lang - commons-lang - 2.6 - - + 4.0.0 - victims-lib - https://github.com/victims/victims-lib-java - A java library providing fingerprinting and service interaction for the Victims Project. - - The Victims Project - http://victi.ms - - 2013 - - - GNU Affero General Public License, Version 3 - http://www.gnu.org/licenses/agpl-3.0.txt - repo - - - - - abn - Arun Babu Neelicattu - abn@redhat.com - - - gm - Grant Murphy - gmurphy@redhat.com - http://people.redhat.com/gmurphy - - + com.redhat.victims + victims-lib + 1.3.3 + jar + + + com.google.code.gson + gson + 2.2.3 + + + org.apache.bcel + bcel + 5.2 + + + commons-codec + commons-codec + 1.7 + + + commons-io + commons-io + 2.4 + + + junit + junit + 4.11 + test + + + com.h2database + h2 + 1.4.182 + + + commons-lang + commons-lang + 2.6 + + - - UTF-8 - EEE72232 - + victims-lib + https://github.com/victims/victims-lib-java + A java library providing fingerprinting and service interaction for the Victims Project. + + The Victims Project + http://victi.ms + + 2013 + + + GNU Affero General Public License, Version 3 + http://www.gnu.org/licenses/agpl-3.0.txt + repo + + + + + abn + Arun Babu Neelicattu + abn@redhat.com + + + gm + Grant Murphy + gmurphy@redhat.com + http://people.redhat.com/gmurphy + + - - - - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - org.codehaus.mojo - license-maven-plugin - 1.4 - - ${basedir}/src/license/header.ftl - false - agpl_v3 - - **/main/**/* - **/test/**/mock/* - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.4 - - - test-jar - - - **/mock/* - - - - test-jar - - - - - - + + UTF-8 + EEE72232 + - - https://github.com/victims/victims-lib-java/issues - - - https://travis-ci.org/victims/victims-lib-java - - - - victims@librelist.com - - - - scm:git:git@github.com:victims/victims-lib-java.git - git@github.com:victims/victims-lib-java.git - scm:git:git@github.com:victims/victims-lib-java.git - victims-lib-1.0 - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.1 - - - sign-artifacts - verify - - sign - - - - - - - - + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + true + + + + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + org.codehaus.mojo + license-maven-plugin + 1.4 + + ${basedir}/src/license/header.ftl + false + agpl_v3 + + **/main/**/* + **/test/**/mock/* + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + + test-jar + + + **/mock/* + + + + test-jar + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + false + release + deploy + + + + + + + https://github.com/victims/victims-lib-java/issues + + + https://travis-ci.org/victims/victims-lib-java + + + + victims@librelist.com + + + + scm:git:git@github.com:victims/victims-lib-java.git + git@github.com:victims/victims-lib-java.git + scm:git:git@github.com:victims/victims-lib-java.git + victims-lib-1.3.3 + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + + + diff --git a/src/main/java/com/redhat/victims/VictimsConfig.java b/src/main/java/com/redhat/victims/VictimsConfig.java index 8a183fe..f9c58bc 100644 --- a/src/main/java/com/redhat/victims/VictimsConfig.java +++ b/src/main/java/com/redhat/victims/VictimsConfig.java @@ -94,7 +94,7 @@ public static Charset charset() { /** * Get the webservice base URI. * - * @return + * @return Returns the service URI value */ public static String uri() { return getPropertyValue(Key.URI); @@ -103,7 +103,7 @@ public static String uri() { /** * Get the webservice entry point. * - * @return + * @return Returns the service entry path value */ public static String entry() { return getPropertyValue(Key.ENTRY); @@ -112,7 +112,7 @@ public static String entry() { /** * Get a complete webservice uri by merging base and entry point. * - * @return + * @return Validated Service URI * @throws VictimsException */ public static String serviceURI() throws VictimsException { @@ -130,8 +130,8 @@ public static String serviceURI() throws VictimsException { * Get the configured cache directory. If the directory does not exist, it * will be created. * - * @return - * @throws VictimsException + * @return Validated Home Directory + * @throws VictimsException if directory cannot be created */ public static File home() throws VictimsException { File directory = new File(getPropertyValue(Key.HOME)); @@ -147,11 +147,11 @@ public static File home() throws VictimsException { } /** - * Returns a list of valid algorithms to be used when fingerprinting. If not + * + * + * @return Returns a list of valid algorithms to be used when fingerprinting. If not * specified, or if all values are illegal, all available algorithms are * used. - * - * @return */ public static ArrayList algorithms() { ArrayList algorithms = new ArrayList(); @@ -174,7 +174,7 @@ public static ArrayList algorithms() { /** * Get the db driver class string in use. * - * @return + * @return DB Driver class */ public static String dbDriver() { return getPropertyValue(Key.DB_DRIVER); @@ -183,7 +183,7 @@ public static String dbDriver() { /** * Get the db connection URL. * - * @return + * @return Validated DB ConnectionURL */ public static String dbUrl() { String dbUrl = getPropertyValue(Key.DB_URL); @@ -199,7 +199,7 @@ public static String dbUrl() { /** * Get the database user configured. * - * @return + * @return Database user value */ public static String dbUser() { return getPropertyValue(Key.DB_USER); @@ -208,7 +208,7 @@ public static String dbUser() { /** * Get the database password configured. * - * @return + * @return Database password value */ public static String dbPass() { return getPropertyValue(Key.DB_PASS); @@ -217,7 +217,7 @@ public static String dbPass() { /** * Is a force database update required. * - * @return + * @return Database Purge value */ public static boolean forcedUpdate() { return Boolean.getBoolean(Key.DB_PURGE); @@ -226,7 +226,7 @@ public static boolean forcedUpdate() { /** * A client option to check if it's cache has to be purged. * - * @return + * @return Cache purge value */ public static boolean purgeCache() { return Boolean.getBoolean(Key.PURGE_CACHE); diff --git a/src/main/java/com/redhat/victims/VictimsRecord.java b/src/main/java/com/redhat/victims/VictimsRecord.java index e900975..7a08870 100644 --- a/src/main/java/com/redhat/victims/VictimsRecord.java +++ b/src/main/java/com/redhat/victims/VictimsRecord.java @@ -95,7 +95,7 @@ public String toString() { * comparison is done first on combined hashes and then by testing if all * available file hashes match. * - * @param that + * @param rhs * @return */ @Override @@ -135,7 +135,7 @@ public boolean containsAlgorithm(Algorithms algorithm) { * algorithms until a subset match is found. If for an algorithm, either * this or that record is empty, check is skipped. * - * @param that + * @param o * @return */ public boolean containsAll(Object o) { diff --git a/src/main/java/com/redhat/victims/database/VictimsSQL.java b/src/main/java/com/redhat/victims/database/VictimsSQL.java index f09d921..fe5cba2 100644 --- a/src/main/java/com/redhat/victims/database/VictimsSQL.java +++ b/src/main/java/com/redhat/victims/database/VictimsSQL.java @@ -49,7 +49,7 @@ public class VictimsSQL { private String dbPass = null; /** - * Get a new connection from the {@link VictimsSqlManager} pool. + * Get a new connection from the {@link DriverManager} pool. * * @return * @throws SQLException diff --git a/src/main/java/com/redhat/victims/database/VictimsSqlDB.java b/src/main/java/com/redhat/victims/database/VictimsSqlDB.java index b299617..483e833 100644 --- a/src/main/java/com/redhat/victims/database/VictimsSqlDB.java +++ b/src/main/java/com/redhat/victims/database/VictimsSqlDB.java @@ -59,17 +59,7 @@ public class VictimsSqlDB extends VictimsSQL implements VictimsDBInterface { protected VictimsResultCache cache; /** - * Create a new instance with the given parameters. - * - * @param driver - * The driver class to use. - * @param dbUrl - * The connection string without username and password. - * @param create - * Are we creating this database? If so initialize. - * @throws IOException - * @throws ClassNotFoundException - * @throws SQLException + * Create a new instance * @throws VictimsException */ public VictimsSqlDB() throws VictimsException { diff --git a/src/main/java/com/redhat/victims/fingerprint/JarFile.java b/src/main/java/com/redhat/victims/fingerprint/JarFile.java index e1c62f7..7b42ad4 100644 --- a/src/main/java/com/redhat/victims/fingerprint/JarFile.java +++ b/src/main/java/com/redhat/victims/fingerprint/JarFile.java @@ -222,7 +222,7 @@ protected Content getNextFile() throws IOException { } /** - * Content -- Inner class for use by {@link ArchiveFile}. This is used to + * Content -- Inner class for use by {@link JarFile}. This is used to * group name of file extracted in memory and the corresponding bytes that * were read. * From 1b5414a8f3449e3341946c32bd04312b1e42d58b Mon Sep 17 00:00:00 2001 From: Jason Shepherd Date: Tue, 12 Sep 2017 13:45:21 +1000 Subject: [PATCH 2/2] added trailing slash --- src/main/java/com/redhat/victims/VictimsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/redhat/victims/VictimsService.java b/src/main/java/com/redhat/victims/VictimsService.java index 976693d..9fa952c 100644 --- a/src/main/java/com/redhat/victims/VictimsService.java +++ b/src/main/java/com/redhat/victims/VictimsService.java @@ -101,7 +101,7 @@ public RecordStream removed(Date since) throws IOException { */ protected RecordStream fetch(Date since, String type) throws IOException { SimpleDateFormat fmt = new SimpleDateFormat(VictimsRecord.DATE_FORMAT); - String spec = FileUtils.getFile(serviceEntry, type, fmt.format(since)) + String spec = FileUtils.getFile(serviceEntry, type, fmt.format(since), "/") .toString(); spec = FilenameUtils.normalize(spec, true); URL merged = new URL(new URL(baseURI), spec);