diff --git a/LICENSE.TXT b/LICENSE.TXT new file mode 100644 index 0000000..4d3d187 --- /dev/null +++ b/LICENSE.TXT @@ -0,0 +1,27 @@ +Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of this project nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/ant/jreleaseinfo-1.3.0.jar b/ant/jreleaseinfo-1.3.0.jar deleted file mode 100644 index 0c00c5f..0000000 Binary files a/ant/jreleaseinfo-1.3.0.jar and /dev/null differ diff --git a/build.gradle b/build.gradle index c08f2ba..484eff9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,117 +1,136 @@ +plugins { + id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.2" +} apply plugin: 'java' apply plugin: 'idea' apply plugin: 'application' defaultTasks 'deploy' -version = '0.6' - def packageName = 'net.thauvin.erik.mobibot' def deployDir = 'deploy' def isRelease = 'release' in gradle.startParameter.taskNames +def getVersion(isIncrement = false) +{ + def propsFile = 'version.properties' + def majorKey = 'version.major' + def minorKey = 'version.minor' + def patchKey = 'version.patch' + def metaKey = 'version.buildmeta' + def preKey = 'version.prerelease' + if (isIncrement) + { + ant.propertyfile(file: propsFile) { + entry(key: patchKey, + type: 'int', + default: '-1', + operation: '+') + } + } + def p = new Properties() + file(propsFile).withInputStream { stream -> p.load(stream) } + def metadata = p.getProperty(metaKey, '') + def prerelease = p.getProperty(preKey, '') + return (p.getProperty(majorKey, '1') + '.' + p.getProperty(minorKey, '0') + '.' + p.getProperty(patchKey, '0') + + (prerelease.length() > 0 ? '-' + prerelease : '') + (metadata.length() > 0 ? '+' + metadata : '')) +} + +version = getVersion() + mainClassName = packageName + '.Mobibot' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' repositories { - mavenCentral() + mavenLocal() + mavenCentral() } dependencies { - compile 'log4j:log4j:1.2.17@jar' + compile 'log4j:log4j:1.2.17@jar' - compile 'pircbot:pircbot:1.5.0' + compile 'pircbot:pircbot:1.5.0' - compile 'commons-codec:commons-codec:1.10' - compile 'commons-logging:commons-logging:1.2' - compile 'commons-net:commons-net:1.4.1' - compile 'commons-cli:commons-cli:1.2' - compile 'commons-httpclient:commons-httpclient:3.1' + compile 'commons-codec:commons-codec:1.10' + compile 'commons-logging:commons-logging:1.2' + compile 'commons-net:commons-net:1.4.1' + compile 'commons-cli:commons-cli:1.2' + compile 'commons-httpclient:commons-httpclient:3.1' - compile 'oro:oro:2.0.8' + compile 'oro:oro:2.0.8' - compile 'org.jdom:jdom:1.1.3' - compile 'org.jsoup:jsoup:1.8.3' - compile 'rome:rome:1.0@jar' - compile 'rome:rome-fetcher:1.0@jar' - compile 'org.json:json:20150729' - compile 'org.ostermiller:utils:1.07.00' + compile 'org.jdom:jdom:1.1.3' + compile 'org.jsoup:jsoup:1.8.3' + compile 'rome:rome:1.0@jar' + compile 'rome:rome-fetcher:1.0@jar' + compile 'org.json:json:20150729' + compile 'org.ostermiller:utils:1.07.00' - compile 'net.sourceforge.jweather:jweather:0.3.0@jar' - compile 'net.objecthunter:exp4j:0.4.5' + compile 'net.sourceforge.jweather:jweather:0.3.0@jar' + compile 'net.objecthunter:exp4j:0.4.5' - compile 'org.twitter4j:twitter4j-core:4.0.4' - compile 'net.sf.delicious-java:delicious:1.14' + compile 'org.twitter4j:twitter4j-core:4.0.4' + compile 'net.sf.delicious-java:delicious:1.14' - //compile fileTree(dir: 'lib', include: '*.jar') - //compile files('../path/to/example.jar') + compile 'net.thauvin.erik:semver:0.9.1-beta' +} + +annotationProcessor { + project.version = getVersion(isRelease) + library 'net.thauvin.erik:semver:0.9.1-beta' + processor 'net.thauvin.erik.semver.VersionProcessor' } compileJava { - doFirst { - if (isRelease) - { - ant.taskdef(name: 'jreleaseinfo', - classname: 'ch.oscg.jreleaseinfo.anttask.JReleaseInfoAntTask', - classpath: 'ant/jreleaseinfo-1.3.0.jar') - ant.jreleaseinfo(targetDir: file('src/main/java'), - className: 'ReleaseInfo', - packageName: packageName, - project: rootProject.name, - version: version, - buildnumfile: file('buildnum.properties')) - - } - - } - options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" + options.compilerArgs << '-proc:none' << '-Xlint:unchecked' << '-Xlint:deprecation' } javadoc { - options.tags = ['created'] + options.tags = ['created'] } jar { - manifest.attributes('Main-Class': mainClassName, - 'Class-Path': '. ./lib/' + configurations.compile.collect { it.getName() }.join(' ./lib/')) + manifest.attributes('Main-Class': mainClassName, + 'Class-Path': '. ./lib/' + configurations.compile.collect { it.getName() }.join(' ./lib/')) - version = null + version = null } clean { - delete deployDir + delete deployDir } task wrapper(type: Wrapper) { - gradleVersion = gradle.gradleVersion + gradleVersion = gradle.gradleVersion } task copyToDeploy(type: Copy) { - from('properties') { - include '*.properties' - } - from jar - into deployDir + from('properties') { + include '*.properties' + } + from jar + into deployDir } task copyToDeployLib(type: Copy) { - from configurations.runtime - into deployDir + '/lib' + from configurations.runtime + into deployDir + '/lib' } task deploy(dependsOn: ['build']) { - description = "Copies all needed files to the ${deployDir} directory." - group = "Publishing" - outputs.dir deployDir - inputs.files copyToDeploy - inputs.files copyToDeployLib - doLast { - file(deployDir + '/logs').mkdir() - } - mustRunAfter clean + description = 'Copies all needed files to the ${deployDir} directory.' + group = 'Publishing' + outputs.dir deployDir + inputs.files copyToDeploy + inputs.files copyToDeployLib + doLast { + file(deployDir + '/logs').mkdir() + } + mustRunAfter clean } -task release(dependsOn: ['deploy', 'wrapper']) { - group = "Publishing" - description = "Releases new version." +task release(dependsOn: ['deploy', 'wrapper']) << { + group = 'Publishing' + description = 'Releases new version.' + isRelease = true } diff --git a/buildnum.properties b/buildnum.properties deleted file mode 100644 index 268e39c..0000000 --- a/buildnum.properties +++ /dev/null @@ -1,3 +0,0 @@ -#ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler -#Mon Oct 26 14:39:18 PDT 2015 -build.num.last=0 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e8c6bf7..13372ae 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 580ff2f..3b69f79 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Oct 24 14:24:39 PDT 2015 +#Mon Jan 25 16:37:02 PST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip diff --git a/gradlew b/gradlew index 97fac78..9d82f78 100644 --- a/gradlew +++ b/gradlew @@ -56,9 +56,9 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar diff --git a/mobibot.iml b/mobibot.iml index de5056b..78a2fd9 100644 --- a/mobibot.iml +++ b/mobibot.iml @@ -1,12 +1,14 @@ - + + + @@ -32,5 +34,214 @@ + + + + + + + + + \ No newline at end of file diff --git a/mobibot.ipr b/mobibot.ipr index 30be848..67925dd 100644 --- a/mobibot.ipr +++ b/mobibot.ipr @@ -72,7 +72,7 @@ - + + + + + + + \ No newline at end of file diff --git a/src/generated/java/net/thauvin/erik/mobibot/ReleaseInfo.java b/src/generated/java/net/thauvin/erik/mobibot/ReleaseInfo.java new file mode 100644 index 0000000..c2a290f --- /dev/null +++ b/src/generated/java/net/thauvin/erik/mobibot/ReleaseInfo.java @@ -0,0 +1,128 @@ +/* + * This file is automatically generated by the Semantic Version Annotation Processor. + * Do not modify this file -- YOUR CHANGES WILL BE ERASED! + */ +package net.thauvin.erik.mobibot; + +import java.util.Date; + +/** + * This class provides semantic version information. + * + * @author Semantic Version Annotation Processor + */ +public final class ReleaseInfo { + private final static String buildmeta = "002"; + private final static Date date = new Date(1453769004642L); + private final static int major = 0; + private final static int minor = 6; + private final static int patch = 1; + private final static String prerelease = "beta"; + private final static String project = "mobibot"; + + /** + * Returns the build date. + * + * @return The build date. + */ + public static Date getBuildDate() { + return date; + } + + /** + * Returns the full version string. + *

+ * Formatted as: + *

+ * MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA] + *
+ *

+ * For example: + *

+ * + * @return The version string. + */ + public static String getVersion() { + return Integer.toString(getMajor()) + '.' + + Integer.toString(getMinor()) + '.' + + Integer.toString(getPatch()) + + getPreRelease() + getBuildMetadata(); + } + + /** + * Returns the major version. + * + * @return The major version. + */ + public static int getMajor() { + return major; + } + + /** + * Returns the minor version. + * + * @return The minor version. + */ + public static int getMinor() { + return minor; + } + + /** + * Returns the patch version. + * + * @return The patch version. + */ + public static int getPatch() { + return patch; + } + + /** + * Returns the pre-release version. + * + * @return The pre-release version, if any. + */ + public static String getPreRelease() { + if (prerelease.length() > 0) { + return '-' + prerelease; + } + + return ""; + } + + /** + * Returns the project name. + * + * @return The project name, if any. + */ + public static String getProject() { + return project; + } + + /** + * Returns the build metadata. + * + * @return The build metadata, if any. + */ + public static String getBuildMetadata() { + if (buildmeta.length() > 0) { + return '+' + buildmeta; + } + + return ""; + } + + /** + * Disables the default constructor. + * + * @throws UnsupportedOperationException if the constructor is called. + */ + private ReleaseInfo() + throws UnsupportedOperationException { + throw new UnsupportedOperationException("Illegal constructor call."); + } +} \ No newline at end of file diff --git a/src/main/java/net/thauvin/erik/mobibot/Commands.java b/src/main/java/net/thauvin/erik/mobibot/Commands.java index b784ea4..81509c5 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Commands.java +++ b/src/main/java/net/thauvin/erik/mobibot/Commands.java @@ -1,35 +1,33 @@ /* * Commands.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -40,7 +38,7 @@ package net.thauvin.erik.mobibot; * @created 2014-04-26 * @since 1.0 */ -class Commands +final class Commands { /** * The add (back)log command. diff --git a/src/main/java/net/thauvin/erik/mobibot/CurrencyConverter.java b/src/main/java/net/thauvin/erik/mobibot/CurrencyConverter.java index b138c95..0cf5fbf 100644 --- a/src/main/java/net/thauvin/erik/mobibot/CurrencyConverter.java +++ b/src/main/java/net/thauvin/erik/mobibot/CurrencyConverter.java @@ -1,35 +1,33 @@ /* * CurrencyConverter.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; diff --git a/src/main/java/net/thauvin/erik/mobibot/DeliciousPoster.java b/src/main/java/net/thauvin/erik/mobibot/DeliciousPoster.java index b5bd726..2e536ee 100644 --- a/src/main/java/net/thauvin/erik/mobibot/DeliciousPoster.java +++ b/src/main/java/net/thauvin/erik/mobibot/DeliciousPoster.java @@ -1,35 +1,33 @@ /* * DeliciousPoster.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -55,7 +53,7 @@ class DeliciousPoster * @param password The del.icio.us password. * @param ircServer The IRC server. */ - public DeliciousPoster(String username, String password, String ircServer) + public DeliciousPoster(final String username, final String password, final String ircServer) { delicious = new Delicious(username, password); this.ircServer = ircServer; @@ -90,7 +88,7 @@ class DeliciousPoster * * @return The extended attribution line. */ - private String postedBy(EntryLink entry) + private String postedBy(final EntryLink entry) { return "Posted by " + entry.getNick() + " on " + entry.getChannel() + " (" + ircServer + ')'; } @@ -100,7 +98,7 @@ class DeliciousPoster * * @param entry The entry to delete. */ - public final void deletePost(EntryLink entry) + public final void deletePost(final EntryLink entry) { final String link = entry.getLink(); diff --git a/src/main/java/net/thauvin/erik/mobibot/Dice.java b/src/main/java/net/thauvin/erik/mobibot/Dice.java index 4031c04..127e9c1 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Dice.java +++ b/src/main/java/net/thauvin/erik/mobibot/Dice.java @@ -1,35 +1,33 @@ /* * Dice.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -42,7 +40,7 @@ import java.util.Random; * @created 2014-04-28 * @since 1.0 */ -class Dice +final class Dice { /** * Disables the default constructor. @@ -61,7 +59,7 @@ class Dice * @param bot The bot's instance. * @param sender The sender's nickname. */ - public static void roll(Mobibot bot, String sender) + public static void roll(final Mobibot bot, final String sender) { final Random r = new Random(); diff --git a/src/main/java/net/thauvin/erik/mobibot/EntriesMgr.java b/src/main/java/net/thauvin/erik/mobibot/EntriesMgr.java index 371fce0..141f761 100644 --- a/src/main/java/net/thauvin/erik/mobibot/EntriesMgr.java +++ b/src/main/java/net/thauvin/erik/mobibot/EntriesMgr.java @@ -1,35 +1,33 @@ /* * EntriesMgr.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -50,7 +48,7 @@ import java.util.List; * @created 2014-04-28 * @since 1.0 */ -class EntriesMgr +final class EntriesMgr { /** * The name of the file containing the current entries. @@ -92,7 +90,7 @@ class EntriesMgr * @throws FileNotFoundException If the file was not found. * @throws FeedException If an error occurred while reading the feed. */ - public static void loadBacklogs(String file, List history) + public static void loadBacklogs(final String file, final List history) throws FileNotFoundException, FeedException { history.clear(); @@ -145,7 +143,7 @@ class EntriesMgr * @throws com.sun.syndication.io.FeedException If an error occurred while reading the feed. */ @SuppressWarnings("unchecked") - public static String loadEntries(String file, String channel, List entries) + public static String loadEntries(final String file, final String channel, final List entries) throws FileNotFoundException, FeedException { entries.clear(); @@ -224,7 +222,7 @@ class EntriesMgr * @param history The history array. * @param isDayBackup Set the true if the daily backup file should also be created. */ - public static void saveEntries(Mobibot bot, List entries, List history, boolean isDayBackup) + public static void saveEntries(final Mobibot bot, final List entries, final List history, final boolean isDayBackup) { if (bot.getLogger().isDebugEnabled()) { diff --git a/src/main/java/net/thauvin/erik/mobibot/EntryComment.java b/src/main/java/net/thauvin/erik/mobibot/EntryComment.java index 1fe3eae..e8e09b2 100644 --- a/src/main/java/net/thauvin/erik/mobibot/EntryComment.java +++ b/src/main/java/net/thauvin/erik/mobibot/EntryComment.java @@ -1,35 +1,33 @@ /* * EntryComment.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -66,7 +64,7 @@ public class EntryComment implements Serializable * @param comment The new comment. * @param nick The nickname of the comment's author. */ - public EntryComment(String comment, String nick) + public EntryComment(final String comment, final String nick) { this.comment = comment; this.nick = nick; @@ -97,7 +95,7 @@ public class EntryComment implements Serializable * @param comment The actual comment. */ @SuppressWarnings("UnusedDeclaration") - public final void setComment(String comment) + public final void setComment(final String comment) { this.comment = comment; } @@ -128,7 +126,7 @@ public class EntryComment implements Serializable * * @param nick The new nickname. */ - public final void setNick(String nick) + public final void setNick(final String nick) { this.nick = nick; } diff --git a/src/main/java/net/thauvin/erik/mobibot/EntryLink.java b/src/main/java/net/thauvin/erik/mobibot/EntryLink.java index bcfe220..881f960 100644 --- a/src/main/java/net/thauvin/erik/mobibot/EntryLink.java +++ b/src/main/java/net/thauvin/erik/mobibot/EntryLink.java @@ -1,35 +1,33 @@ /* * EntryLink.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -89,7 +87,7 @@ public class EntryLink implements Serializable * @param channel The channel. * @param tags The entry's tags/categories. */ - public EntryLink(String link, String title, String nick, String login, String channel, String tags) + public EntryLink(final String link, final String title, final String nick, final String login, final String channel, final String tags) { this.link = link; this.title = title; @@ -105,7 +103,7 @@ public class EntryLink implements Serializable * * @param tags The space-delimited tags. */ - public final void setTags(String tags) + public final void setTags(final String tags) { if (tags != null) { @@ -165,7 +163,7 @@ public class EntryLink implements Serializable * @param date The entry date. * @param tags The entry's tags/categories. */ - public EntryLink(String link, String title, String nick, String channel, Date date, List tags) + public EntryLink(final String link, final String title, final String nick, final String channel, final Date date, final List tags) { this.link = link; this.title = title; @@ -184,7 +182,7 @@ public class EntryLink implements Serializable * * @return The total number of comments for this entry. */ - public final int addComment(String comment, String nick) + public final int addComment(final String comment, final String nick) { comments.add(new EntryComment(comment, nick)); @@ -196,7 +194,7 @@ public class EntryLink implements Serializable * * @param index The index of the comment to delete. */ - public final void deleteComment(int index) + public final void deleteComment(final int index) { if (index < comments.size()) { @@ -220,7 +218,7 @@ public class EntryLink implements Serializable * @param channel The channel. */ @SuppressWarnings("UnusedDeclaration") - public final void setChannel(String channel) + public final void setChannel(final String channel) { this.channel = channel; } @@ -232,7 +230,7 @@ public class EntryLink implements Serializable * * @return The specific comment. */ - public final EntryComment getComment(int index) + public final EntryComment getComment(final int index) { return (comments.get(index)); } @@ -300,7 +298,7 @@ public class EntryLink implements Serializable * * @param link The new link. */ - public final void setLink(String link) + public final void setLink(final String link) { this.link = link; } @@ -321,7 +319,7 @@ public class EntryLink implements Serializable * @param login The new login. */ @SuppressWarnings("UnusedDeclaration") - public final void setLogin(String login) + public final void setLogin(final String login) { this.login = login; } @@ -341,7 +339,7 @@ public class EntryLink implements Serializable * * @param nick The new nickname. */ - public final void setNick(String nick) + public final void setNick(final String nick) { this.nick = nick; } @@ -361,7 +359,7 @@ public class EntryLink implements Serializable * * @param tags The tags. */ - private void setTags(List tags) + private void setTags(final List tags) { this.tags.addAll(tags); } @@ -381,7 +379,7 @@ public class EntryLink implements Serializable * * @param title The new title. */ - public final void setTitle(String title) + public final void setTitle(final String title) { this.title = title; } @@ -413,7 +411,7 @@ public class EntryLink implements Serializable * @param comment The actual comment. * @param nick The nickname of the author of the comment. */ - public final void setComment(int index, String comment, String nick) + public final void setComment(final int index, final String comment, final String nick) { if (index < comments.size()) { diff --git a/src/main/java/net/thauvin/erik/mobibot/FeedReader.java b/src/main/java/net/thauvin/erik/mobibot/FeedReader.java index 65bfda2..8640f37 100644 --- a/src/main/java/net/thauvin/erik/mobibot/FeedReader.java +++ b/src/main/java/net/thauvin/erik/mobibot/FeedReader.java @@ -1,35 +1,33 @@ /* * FeedReader.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -84,7 +82,7 @@ class FeedReader implements Runnable * @param sender The nick of the person who sent the message. * @param url The URL to fetch. */ - public FeedReader(Mobibot bot, String sender, String url) + public FeedReader(final Mobibot bot, final String sender, final String url) { this.bot = bot; this.sender = sender; diff --git a/src/main/java/net/thauvin/erik/mobibot/GoogleSearch.java b/src/main/java/net/thauvin/erik/mobibot/GoogleSearch.java index f84e167..25298a1 100644 --- a/src/main/java/net/thauvin/erik/mobibot/GoogleSearch.java +++ b/src/main/java/net/thauvin/erik/mobibot/GoogleSearch.java @@ -1,35 +1,33 @@ /* * GoogleSearch.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -78,7 +76,7 @@ class GoogleSearch implements Runnable * @param sender The nick of the person who sent the message. * @param query The Google query */ - public GoogleSearch(Mobibot bot, String sender, String query) + public GoogleSearch(final Mobibot bot, final String sender, final String query) { this.bot = bot; this.sender = sender; diff --git a/src/main/java/net/thauvin/erik/mobibot/Joke.java b/src/main/java/net/thauvin/erik/mobibot/Joke.java index 1c013eb..facffa7 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Joke.java +++ b/src/main/java/net/thauvin/erik/mobibot/Joke.java @@ -1,35 +1,33 @@ /* * Joke.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -72,7 +70,7 @@ class Joke implements Runnable * @param bot The bot's instance. * @param sender The nick of the person who sent the message. */ - public Joke(Mobibot bot, String sender) + public Joke(final Mobibot bot, final String sender) { this.bot = bot; this.sender = sender; diff --git a/src/main/java/net/thauvin/erik/mobibot/Lookup.java b/src/main/java/net/thauvin/erik/mobibot/Lookup.java index 2a72f05..560f90a 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Lookup.java +++ b/src/main/java/net/thauvin/erik/mobibot/Lookup.java @@ -1,35 +1,33 @@ /* * Lookup.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -46,7 +44,7 @@ import java.net.UnknownHostException; * @created 2014-04-26 * @since 1.0 */ -class Lookup +final class Lookup { /** @@ -74,7 +72,7 @@ class Lookup * * @throws java.net.UnknownHostException If the host is unknown. */ - public static String lookup(String query) + public static String lookup(final String query) throws UnknownHostException { final StringBuilder buffer = new StringBuilder(""); @@ -118,7 +116,7 @@ class Lookup * * @throws java.io.IOException If a connection error occurs. */ - public static String[] whois(String query) + public static String[] whois(final String query) throws IOException { return whois(query, WHOIS_HOST); @@ -135,7 +133,7 @@ class Lookup * @throws java.io.IOException If a connection error occurs. */ @SuppressWarnings("WeakerAccess, SameParameterValue") - public static String[] whois(String query, String host) + public static String[] whois(final String query, final String host) throws IOException { final WhoisClient whois = new WhoisClient(); diff --git a/src/main/java/net/thauvin/erik/mobibot/Mobibot.java b/src/main/java/net/thauvin/erik/mobibot/Mobibot.java index 8fe9503..2605827 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Mobibot.java +++ b/src/main/java/net/thauvin/erik/mobibot/Mobibot.java @@ -1,35 +1,33 @@ /* * Mobibot.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -38,6 +36,7 @@ import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache; import com.sun.syndication.io.FeedException; import net.objecthunter.exp4j.Expression; import net.objecthunter.exp4j.ExpressionBuilder; +import net.thauvin.erik.semver.Version; import org.apache.commons.cli.*; import org.apache.commons.logging.impl.Log4JLogger; import org.apache.log4j.Level; @@ -60,6 +59,7 @@ import java.util.concurrent.CopyOnWriteArrayList; * @created Jan 31, 2004 * @since 1.0 */ +@Version(properties = "version.properties", className = "ReleaseInfo") public class Mobibot extends PircBot { /** @@ -92,8 +92,8 @@ public class Mobibot extends PircBot * The info strings. */ private static final String[] INFO_STRS = { - ReleaseInfo.getProject() + " v" + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() - + " by Erik C. Thauvin (erik@thauvin.net)", "http://www.mobitopia.org/mobibot/" + ReleaseInfo.getProject() + " v" + ReleaseInfo.getVersion() + " by Erik C. Thauvin (erik@thauvin.net)", + "http://www.mobitopia.org/mobibot/" }; /** @@ -145,8 +145,7 @@ public class Mobibot extends PircBot * The version strings. */ private static final String[] VERSION_STRS = { - "Version: " + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() + " (" + Utils.ISO_SDF - .format(ReleaseInfo.getBuildDate()) + ')', + "Version: " + ReleaseInfo.getVersion() + " (" + Utils.ISO_SDF.format(ReleaseInfo.getBuildDate()) + ')', "Platform: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ", " + System .getProperty("os.arch") + ", " + System.getProperty("user.country") + ')', "Runtime: " + System.getProperty("java.runtime.name") + " (build " + System @@ -320,7 +319,8 @@ public class Mobibot extends PircBot * @param logsDir The logs directory. */ @SuppressWarnings("WeakerAccess") - public Mobibot(String server, int port, String nickname, String channel, String logsDir) + public Mobibot(final String server, final int port, final String nickname, final String channel, + final String logsDir) { System.getProperties().setProperty("sun.net.client.defaultConnectTimeout", String.valueOf(CONNECT_TIMEOUT)); System.getProperties().setProperty("sun.net.client.defaultReadTimeout", String.valueOf(CONNECT_TIMEOUT)); @@ -385,7 +385,7 @@ public class Mobibot extends PircBot * * @param args The command line arguments. */ - public static void main(String[] args) + public static void main(final String[] args) { // Setup the command line options final Options options = new Options(); @@ -639,7 +639,7 @@ public class Mobibot extends PircBot * * @param pwd The password. */ - private void setIdent(String pwd) + private void setIdent(final String pwd) { ident = pwd; } @@ -649,7 +649,7 @@ public class Mobibot extends PircBot * * @param nick The nickname. */ - private void setIdentNick(String nick) + private void setIdentNick(final String nick) { identNick = nick; } @@ -659,7 +659,7 @@ public class Mobibot extends PircBot * * @param msg The message. */ - private void setIdentMsg(String msg) + private void setIdentMsg(final String msg) { identMsg = msg; } @@ -669,7 +669,7 @@ public class Mobibot extends PircBot * * @param feedURL The feed URL. */ - private void setFeedURL(String feedURL) + private void setFeedURL(final String feedURL) { this.feedURL = feedURL; } @@ -680,7 +680,7 @@ public class Mobibot extends PircBot * @param username The del.icio.us user name. * @param password The del.icio.us password. */ - private void setDeliciousAuth(String username, String password) + private void setDeliciousAuth(final String username, final String password) { delicious = new DeliciousPoster(username, password, ircServer); } @@ -693,7 +693,8 @@ public class Mobibot extends PircBot * @param token The Twitter token. * @param tokenSecret The Twitter token secret. */ - private void setTwitterAuth(String consumerKey, String consumerSecret, String token, String tokenSecret) + private void setTwitterAuth(final String consumerKey, final String consumerSecret, final String token, + final String tokenSecret) { twitterConsumerKey = consumerKey; twitterConsumerSecret = consumerSecret; @@ -706,7 +707,7 @@ public class Mobibot extends PircBot * * @param tags The tags. */ - private void setTags(String tags) + private void setTags(final String tags) { defaultTags = tags; } @@ -716,7 +717,7 @@ public class Mobibot extends PircBot * * @param nicks The nicks to ignore */ - private void setIgnoredNicks(String nicks) + private void setIgnoredNicks(final String nicks) { if (Utils.isValidString(nicks)) { @@ -735,7 +736,7 @@ public class Mobibot extends PircBot * @param tellMaxDays The max number of days to hold messages for. * @param tellMaxSize The maximum number of messages to hold */ - private void setTell(int tellMaxDays, int tellMaxSize) + private void setTell(final int tellMaxDays, final int tellMaxSize) { this.tellMaxDays = tellMaxDays; this.tellMaxSize = tellMaxSize; @@ -746,7 +747,7 @@ public class Mobibot extends PircBot * * @param isDayBackup Set the true if the daily backup file should also be created. */ - private void saveEntries(boolean isDayBackup) + private void saveEntries(final boolean isDayBackup) { EntriesMgr.saveEntries(this, entries, history, isDayBackup); } @@ -756,7 +757,7 @@ public class Mobibot extends PircBot * * @param secs The number of seconds to sleep for. */ - private static void sleep(int secs) + private static void sleep(final int secs) { try { @@ -816,7 +817,7 @@ public class Mobibot extends PircBot * * @param action The action. */ - final void action(String action) + final void action(final String action) { action(channel, action); } @@ -827,7 +828,7 @@ public class Mobibot extends PircBot * @param channel The channel. * @param action The action. */ - private void action(String channel, String action) + private void action(final String channel, final String action) { if (Utils.isValidString(channel) && Utils.isValidString(action)) { @@ -842,7 +843,7 @@ public class Mobibot extends PircBot * @param args The command arguments. * @param message The actual message. */ - private void calcResponse(String sender, String args, String message) + private void calcResponse(final String sender, final String args, final String message) { if (Utils.isValidString(args)) { @@ -874,7 +875,7 @@ public class Mobibot extends PircBot * * @param sender The nick of the person who sent the private message. */ - private void feedResponse(String sender) + private void feedResponse(final String sender) { if (Utils.isValidString(feedURL)) { @@ -893,7 +894,7 @@ public class Mobibot extends PircBot * * @return The index or -1 if none. */ - private int findDupEntry(String link) + private int findDupEntry(final String link) { EntryLink entry; @@ -928,7 +929,7 @@ public class Mobibot extends PircBot * * @param backLogsUrl The backlogs URL. */ - private void setBacklogsUrl(String backLogsUrl) + private void setBacklogsUrl(final String backLogsUrl) { this.backLogsUrl = backLogsUrl; } @@ -1027,7 +1028,7 @@ public class Mobibot extends PircBot * * @param weblogUrl The weblog URL. */ - private void setWeblogUrl(String weblogUrl) + private void setWeblogUrl(final String weblogUrl) { this.weblogUrl = weblogUrl; } @@ -1038,7 +1039,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the private message. * @param query The Google query to execute. */ - private void googleResponse(String sender, String query) + private void googleResponse(final String sender, final String query) { if (query.length() > 0) { @@ -1057,7 +1058,7 @@ public class Mobibot extends PircBot * * @return The indented help string. */ - private String helpIndent(String help) + private String helpIndent(final String help) { return helpIndent(help, true); } @@ -1070,7 +1071,7 @@ public class Mobibot extends PircBot * * @return The indented help string. */ - private String helpIndent(String help, boolean isBold) + private String helpIndent(final String help, final boolean isBold) { return " " + (isBold ? Utils.bold(help) : help); } @@ -1081,7 +1082,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the private message. * @param topic The help topic, if any. */ - public final void helpResponse(String sender, String topic) + public final void helpResponse(final String sender, final String topic) { final String lcTopic = topic.toLowerCase(); @@ -1336,7 +1337,7 @@ public class Mobibot extends PircBot * @param sender The sender. * @param args The command arguments. */ - private void ignoreResponse(String sender, String args) + private void ignoreResponse(final String sender, final String args) { if (!isOp(sender)) { @@ -1404,7 +1405,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the message. * @param isPrivate Set to true is the response should be send as a private message. */ - private void infoResponse(String sender, boolean isPrivate) + private void infoResponse(final String sender, final boolean isPrivate) { for (final String info : INFO_STRS) { @@ -1434,7 +1435,7 @@ public class Mobibot extends PircBot * * @return true if the nick should be ignored, false otherwise. */ - private boolean isIgnoredNick(String nick) + private boolean isIgnoredNick(final String nick) { return Utils.isValidString(nick) && ignoredNicks.contains(nick.toLowerCase()); @@ -1447,7 +1448,7 @@ public class Mobibot extends PircBot * * @return true, if the sender is an Op. */ - private boolean isOp(String sender) + private boolean isOp(final String sender) { final User[] users = getUsers(channel); @@ -1479,7 +1480,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the message * @param query The hostname or IP address. */ - private void lookupResponse(String sender, String query) + private void lookupResponse(final String sender, final String query) { if (query.matches("(\\S.)+(\\S)+")) { @@ -1598,7 +1599,8 @@ public class Mobibot extends PircBot } @Override - protected final void onMessage(String channel, String sender, String login, String hostname, String message) + protected final void onMessage(final String channel, final String sender, final String login, final String hostname, + final String message) { if (logger.isDebugEnabled()) { @@ -2093,7 +2095,8 @@ public class Mobibot extends PircBot } @Override - protected final void onPrivateMessage(String sender, String login, String hostname, String message) + protected final void onPrivateMessage(final String sender, final String login, final String hostname, + final String message) { if (logger.isDebugEnabled()) { @@ -2270,7 +2273,8 @@ public class Mobibot extends PircBot } @Override - protected final void onAction(String sender, String login, String hostname, String target, String action) + protected final void onAction(final String sender, final String login, final String hostname, final String target, + final String action) { if (target.equals(channel)) { @@ -2285,7 +2289,7 @@ public class Mobibot extends PircBot * @param message The actual message sent. * @param isAction Set to true if the message is an action. */ - private void recap(String sender, String message, boolean isAction) + private void recap(final String sender, final String message, final boolean isAction) { recap.add(Utils.UTC_SDF.format(Calendar.getInstance().getTime()) + " -> " + sender + (isAction ? " " : ": ") + message); @@ -2297,13 +2301,13 @@ public class Mobibot extends PircBot } @Override - protected void onJoin(String channel, String sender, String login, String hostname) + protected void onJoin(final String channel, final String sender, final String login, final String hostname) { tellSendMessages(sender); } @Override - protected void onNickChange(String oldNick, String login, String hostname, String newNick) + protected void onNickChange(final String oldNick, final String login, final String hostname, final String newNick) { tellSendMessages(newNick); } @@ -2313,7 +2317,7 @@ public class Mobibot extends PircBot * * @param nickname The user's nickname. */ - private void tellSendMessages(String nickname) + private void tellSendMessages(final String nickname) { tellSendMessages(nickname, false); } @@ -2324,7 +2328,7 @@ public class Mobibot extends PircBot * @param nickname The user's nickname. * @param isMessage The message flag. */ - private void tellSendMessages(String nickname, boolean isMessage) + private void tellSendMessages(final String nickname, final boolean isMessage) { if (!nickname.equals(getNick()) && isTellEnabled()) { @@ -2396,7 +2400,7 @@ public class Mobibot extends PircBot * @param message The actual message. * @param isPrivate Set to true if the response should be a private message, otherwise a notice is sent. */ - public final void send(String sender, String message, boolean isPrivate) + public final void send(final String sender, final String message, final boolean isPrivate) { if (Utils.isValidString(message) && Utils.isValidString(sender)) { @@ -2427,7 +2431,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the private message. * @param isPrivate Set to true is the response should be send as a private message. */ - private void recapResponse(String sender, boolean isPrivate) + private void recapResponse(final String sender, final boolean isPrivate) { for (final String recap : this.recap) { @@ -2441,7 +2445,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the message. * @param message The actual message. */ - public final void send(String sender, String message) + public final void send(final String sender, final String message) { send(sender, message, false); } @@ -2452,7 +2456,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the message. * @param symbol The stock symbol to lookup. */ - private void stockResponse(String sender, String symbol) + private void stockResponse(final String sender, final String symbol) { if (symbol.length() > 0) { @@ -2470,7 +2474,7 @@ public class Mobibot extends PircBot * @param sender The sender's nick. * @param cmds The commands string. */ - private void tellResponse(String sender, String cmds) + private void tellResponse(final String sender, final String cmds) { if (!Utils.isValidString(cmds)) { @@ -2653,7 +2657,7 @@ public class Mobibot extends PircBot * @param sender The sender's nick. * @param message The message. */ - private void twitterResponse(String sender, String message) + private void twitterResponse(final String sender, final String message) { if (isTwitterEnabled()) { @@ -2684,7 +2688,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the message. * @param isPrivate Set to true is the response should be send as a private message. */ - private void usersResponse(String sender, boolean isPrivate) + private void usersResponse(final String sender, final boolean isPrivate) { final User[] users = getUsers(channel); final String[] nicks = new String[users.length]; @@ -2717,7 +2721,7 @@ public class Mobibot extends PircBot * @param sender The nick of the person who sent the message. * @param isPrivate Set to true is the response should be send as a private message. */ - private void versionResponse(String sender, boolean isPrivate) + private void versionResponse(final String sender, final boolean isPrivate) { if (isOp(sender)) { @@ -2735,7 +2739,7 @@ public class Mobibot extends PircBot * @param args The view command arguments. * @param isPrivate Set to true is the response should be send as a private message. */ - private void viewResponse(String sender, String args, boolean isPrivate) + private void viewResponse(final String sender, final String args, final boolean isPrivate) { String lcArgs = args.toLowerCase(); @@ -2838,7 +2842,7 @@ public class Mobibot extends PircBot * @param id The station's ID. * @param isPrivate Set to true is the response should be send as a private message. */ - private void weatherResponse(String sender, String id, boolean isPrivate) + private void weatherResponse(final String sender, final String id, final boolean isPrivate) { new Thread(new Weather(this, sender, id, isPrivate)).start(); } diff --git a/src/main/java/net/thauvin/erik/mobibot/ReleaseInfo.java b/src/main/java/net/thauvin/erik/mobibot/ReleaseInfo.java deleted file mode 100644 index 6179c2b..0000000 --- a/src/main/java/net/thauvin/erik/mobibot/ReleaseInfo.java +++ /dev/null @@ -1,59 +0,0 @@ -/* Created by JReleaseInfo AntTask from Open Source Competence Group */ -/* Creation date Mon Oct 26 14:39:18 PDT 2015 */ -package net.thauvin.erik.mobibot; - -import java.util.Date; - -/** - * This class provides information gathered from the build environment. - * - * @author JReleaseInfo AntTask - */ -public class ReleaseInfo { - - /** - * Disables the default constructor. - * @throws UnsupportedOperationException if the constructor is called. - */ - private ReleaseInfo() throws UnsupportedOperationException { - throw new UnsupportedOperationException("Illegal constructor call."); - } - - - /** buildDate (set during build process to 1445895558361L). */ - private static final Date buildDate = new Date(1445895558361L); - - /** - * Get buildDate (set during build process to Mon Oct 26 14:39:18 PDT 2015). - * @return Date buildDate - */ - public static Date getBuildDate() { return buildDate; } - - - /** project (set during build process to "mobibot"). */ - private static final String project = "mobibot"; - - /** - * Get project (set during build process to "mobibot"). - * @return String project - */ - public static String getProject() { return project; } - - - /** version (set during build process to "0.6"). */ - private static final String version = "0.6"; - - /** - * Get version (set during build process to "0.6"). - * @return String version - */ - public static String getVersion() { return version; } - - - /** - * Get buildNumber (set during build process to 0). - * @return int buildNumber - */ - public static int getBuildNumber() { return 0; } - -} diff --git a/src/main/java/net/thauvin/erik/mobibot/StockQuote.java b/src/main/java/net/thauvin/erik/mobibot/StockQuote.java index 01d0de4..e026841 100644 --- a/src/main/java/net/thauvin/erik/mobibot/StockQuote.java +++ b/src/main/java/net/thauvin/erik/mobibot/StockQuote.java @@ -1,35 +1,33 @@ /* * StockQuote.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -75,7 +73,7 @@ class StockQuote implements Runnable * @param sender The nick of the person who sent the message. * @param symbol The stock symbol. */ - public StockQuote(Mobibot bot, String sender, String symbol) + public StockQuote(final Mobibot bot, final String sender, final String symbol) { this.bot = bot; this.sender = sender; diff --git a/src/main/java/net/thauvin/erik/mobibot/TellMessage.java b/src/main/java/net/thauvin/erik/mobibot/TellMessage.java index 22e3346..1d20b77 100644 --- a/src/main/java/net/thauvin/erik/mobibot/TellMessage.java +++ b/src/main/java/net/thauvin/erik/mobibot/TellMessage.java @@ -1,35 +1,33 @@ /* * TellMessage.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -71,7 +69,7 @@ public class TellMessage implements Serializable * @param recipient The recipient's nick. * @param message The message. */ - public TellMessage(String sender, String recipient, String message) + public TellMessage(final String sender, final String recipient, final String message) { this.sender = sender; this.recipient = recipient; @@ -149,7 +147,7 @@ public class TellMessage implements Serializable * * @return true if the nickname matches. */ - public boolean isMatch(String nick) + public boolean isMatch(final String nick) { return (sender.equalsIgnoreCase(nick) || recipient.equalsIgnoreCase(nick)); } @@ -161,7 +159,7 @@ public class TellMessage implements Serializable * * @return true if the id matches. */ - public boolean isMatchId(String id) + public boolean isMatchId(final String id) { return this.id.equals(id); } diff --git a/src/main/java/net/thauvin/erik/mobibot/TellMessagesMgr.java b/src/main/java/net/thauvin/erik/mobibot/TellMessagesMgr.java index a6fc52b..cc659bd 100644 --- a/src/main/java/net/thauvin/erik/mobibot/TellMessagesMgr.java +++ b/src/main/java/net/thauvin/erik/mobibot/TellMessagesMgr.java @@ -1,35 +1,33 @@ /* * TellMessagesMgr.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -48,7 +46,7 @@ import java.util.List; * @created 2014-04-26 * @since 1.0 */ -class TellMessagesMgr +final class TellMessagesMgr { /** * Disables the default constructor. @@ -69,7 +67,7 @@ class TellMessagesMgr * * @return True if the queue was cleaned. */ - public static boolean cleanTellMessages(List tellMessages, int tellMaxDays) + public static boolean cleanTellMessages(final List tellMessages, final int tellMaxDays) { final Calendar maxDate = Calendar.getInstance(); final Date today = new Date(); @@ -99,7 +97,7 @@ class TellMessagesMgr * @return The {@link net.thauvin.erik.mobibot.TellMessage} array. */ @SuppressWarnings("unchecked") - public static List load(String file, Log4JLogger logger) + public static List load(final String file, final Log4JLogger logger) { try { @@ -142,7 +140,7 @@ class TellMessagesMgr * @param messages The {@link net.thauvin.erik.mobibot.TellMessage} array. * @param logger The logger. */ - public static void save(String file, List messages, Log4JLogger logger) + public static void save(final String file, final List messages, final Log4JLogger logger) { try { diff --git a/src/main/java/net/thauvin/erik/mobibot/Twitter.java b/src/main/java/net/thauvin/erik/mobibot/Twitter.java index f9b55e5..3bf3030 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Twitter.java +++ b/src/main/java/net/thauvin/erik/mobibot/Twitter.java @@ -1,35 +1,33 @@ /* * Twitter.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -92,8 +90,8 @@ class Twitter implements Runnable * @param accessTokenSecret The Twitter access token secret. * @param message The Twitter message. */ - public Twitter(Mobibot bot, String sender, String consumerKey, String consumerSecret, String accessToken, - String accessTokenSecret, String message) + public Twitter(final Mobibot bot, final String sender, final String consumerKey, final String consumerSecret, final String accessToken, + final String accessTokenSecret, final String message) { this.bot = bot; this.consumerKey = consumerKey; diff --git a/src/main/java/net/thauvin/erik/mobibot/Utils.java b/src/main/java/net/thauvin/erik/mobibot/Utils.java index 9a0977b..d56de0d 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Utils.java +++ b/src/main/java/net/thauvin/erik/mobibot/Utils.java @@ -1,35 +1,33 @@ /* * Utils.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; diff --git a/src/main/java/net/thauvin/erik/mobibot/War.java b/src/main/java/net/thauvin/erik/mobibot/War.java index 7313720..f4c5b0e 100644 --- a/src/main/java/net/thauvin/erik/mobibot/War.java +++ b/src/main/java/net/thauvin/erik/mobibot/War.java @@ -1,35 +1,33 @@ /* * War.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -42,7 +40,7 @@ import java.util.Random; * @created 2014-04-28 * @since 1.0 */ -class War +final class War { /** * The deck of card for the {@link net.thauvin.erik.mobibot.Commands#WAR_CMD war} command. @@ -72,7 +70,7 @@ class War * @param bot The bot's instance. * @param sender The sender's nickname. */ - public static void play(Mobibot bot, String sender) + public static void play(final Mobibot bot, final String sender) { final Random r = new Random(); diff --git a/src/main/java/net/thauvin/erik/mobibot/Weather.java b/src/main/java/net/thauvin/erik/mobibot/Weather.java index 0b40551..e0b457d 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Weather.java +++ b/src/main/java/net/thauvin/erik/mobibot/Weather.java @@ -1,35 +1,33 @@ /* * Weather.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -87,7 +85,7 @@ class Weather implements Runnable * @param station The station ID. * @param isPrivate Set to true is the response should be send as a private message. */ - public Weather(Mobibot bot, String sender, String station, boolean isPrivate) + public Weather(final Mobibot bot, final String sender, final String station, final boolean isPrivate) { this.bot = bot; this.sender = sender; diff --git a/src/main/java/net/thauvin/erik/mobibot/WorldTime.java b/src/main/java/net/thauvin/erik/mobibot/WorldTime.java index 2b2116e..da6364c 100644 --- a/src/main/java/net/thauvin/erik/mobibot/WorldTime.java +++ b/src/main/java/net/thauvin/erik/mobibot/WorldTime.java @@ -1,35 +1,33 @@ /* * WorldTime.java * - * Copyright (c) 2004-2015, Erik C. Thauvin (erik@thauvin.net) + * Copyright (c) 2004-2016, Erik C. Thauvin (erik@thauvin.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * modification, are permitted provided that the following conditions are met: * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.thauvin.erik.mobibot; @@ -147,7 +145,7 @@ class WorldTime * @param args The time command arguments. * @param isPrivate Set to true is the response should be send as a private message. */ - public final void timeResponse(Mobibot bot, String sender, String args, boolean isPrivate) + public final void timeResponse(final Mobibot bot, final String sender, final String args, final boolean isPrivate) { boolean isInvalidTz = false; final String tz = (COUNTRIES_MAP.get((args.substring(args.indexOf(' ') + 1).trim().toUpperCase()))); diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..3349c49 --- /dev/null +++ b/version.properties @@ -0,0 +1,8 @@ +#Mon, 25 Jan 2016 16:36:57 -0800 +#Mon Dec 07 01:31:00 PST 2015 +version.project=mobibot +version.major=0 +version.minor=6 +version.patch=1 +version.prerelease=beta +version.buildmeta=002