Added semantic version annotations.

Added and updated license.
This commit is contained in:
Erik C. Thauvin 2016-01-25 16:59:36 -08:00
parent b71c488977
commit 9cf5ee8fbc
32 changed files with 1227 additions and 671 deletions

27
LICENSE.TXT Normal file
View file

@ -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.

Binary file not shown.

View file

@ -1,19 +1,48 @@
plugins {
id "com.ewerk.gradle.plugins.annotation-processor" version "1.0.2"
}
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'application' apply plugin: 'application'
defaultTasks 'deploy' defaultTasks 'deploy'
version = '0.6'
def packageName = 'net.thauvin.erik.mobibot' def packageName = 'net.thauvin.erik.mobibot'
def deployDir = 'deploy' def deployDir = 'deploy'
def isRelease = 'release' in gradle.startParameter.taskNames 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' mainClassName = packageName + '.Mobibot'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories { repositories {
mavenLocal()
mavenCentral() mavenCentral()
} }
@ -43,28 +72,17 @@ dependencies {
compile 'org.twitter4j:twitter4j-core:4.0.4' compile 'org.twitter4j:twitter4j-core:4.0.4'
compile 'net.sf.delicious-java:delicious:1.14' compile 'net.sf.delicious-java:delicious:1.14'
//compile fileTree(dir: 'lib', include: '*.jar') compile 'net.thauvin.erik:semver:0.9.1-beta'
//compile files('../path/to/example.jar') }
annotationProcessor {
project.version = getVersion(isRelease)
library 'net.thauvin.erik:semver:0.9.1-beta'
processor 'net.thauvin.erik.semver.VersionProcessor'
} }
compileJava { compileJava {
doFirst { options.compilerArgs << '-proc:none' << '-Xlint:unchecked' << '-Xlint:deprecation'
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"
} }
javadoc { javadoc {
@ -100,8 +118,8 @@ task copyToDeployLib(type: Copy) {
} }
task deploy(dependsOn: ['build']) { task deploy(dependsOn: ['build']) {
description = "Copies all needed files to the ${deployDir} directory." description = 'Copies all needed files to the ${deployDir} directory.'
group = "Publishing" group = 'Publishing'
outputs.dir deployDir outputs.dir deployDir
inputs.files copyToDeploy inputs.files copyToDeploy
inputs.files copyToDeployLib inputs.files copyToDeployLib
@ -111,7 +129,8 @@ task deploy(dependsOn: ['build']) {
mustRunAfter clean mustRunAfter clean
} }
task release(dependsOn: ['deploy', 'wrapper']) { task release(dependsOn: ['deploy', 'wrapper']) << {
group = "Publishing" group = 'Publishing'
description = "Releases new version." description = 'Releases new version.'
isRelease = true
} }

View file

@ -1,3 +0,0 @@
#ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler
#Mon Oct 26 14:39:18 PDT 2015
build.num.last=0

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Sat Oct 24 14:24:39 PDT 2015 #Mon Jan 25 16:37:02 PST 2016
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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

4
gradlew vendored
View file

@ -56,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi fi
done done
SAVED="`pwd`" SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&- cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`" APP_HOME="`pwd -P`"
cd "$SAVED" >&- cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

View file

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="mobibot" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.6" relativePaths="false" type="JAVA_MODULE" version="4"> <module external.linked.project.id="mobibot" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.6.1" relativePaths="false" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false"> <component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" /> <output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" /> <output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/generated/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/annotationProcessor/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/.gradle" /> <excludeFolder url="file://$MODULE_DIR$/.gradle" />
@ -32,5 +34,214 @@
<orderEntry type="library" name="Gradle: org.json:json:20150729" level="project" /> <orderEntry type="library" name="Gradle: org.json:json:20150729" level="project" />
<orderEntry type="library" name="Gradle: org.jdom:jdom:1.1.3" level="project" /> <orderEntry type="library" name="Gradle: org.jdom:jdom:1.1.3" level="project" />
<orderEntry type="library" name="Gradle: net.objecthunter:exp4j:0.4.5" level="project" /> <orderEntry type="library" name="Gradle: net.objecthunter:exp4j:0.4.5" level="project" />
<orderEntry type="library" name="Gradle: net.thauvin.erik:semver:0.9.1-beta" level="project" />
<orderEntry type="library" name="Gradle: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Gradle: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Gradle: commons-lang:commons-lang:2.4" level="project" />
</component>
<component name="org.twodividedbyzero.idea.findbugs">
<option name="_basePreferences">
<map>
<entry key="property.analysisEffortLevel" value="default" />
<entry key="property.analyzeAfterAutoMake" value="false" />
<entry key="property.analyzeAfterCompile" value="false" />
<entry key="property.annotationGutterIconEnabled" value="true" />
<entry key="property.annotationSuppressWarningsClass" value="edu.umd.cs.findbugs.annotations.SuppressFBWarnings" />
<entry key="property.annotationTextRangeMarkupEnabled" value="true" />
<entry key="property.exportAsHtml" value="true" />
<entry key="property.exportAsXml" value="true" />
<entry key="property.exportBaseDir" value="" />
<entry key="property.exportCreateArchiveDir" value="false" />
<entry key="property.exportOpenBrowser" value="true" />
<entry key="property.minPriorityToReport" value="Medium" />
<entry key="property.runAnalysisInBackground" value="false" />
<entry key="property.showHiddenDetectors" value="false" />
<entry key="property.toolWindowToFront" value="true" />
</map>
</option>
<option name="_detectors">
<map>
<entry key="AppendingToAnObjectOutputStream" value="true" />
<entry key="AtomicityProblem" value="true" />
<entry key="BadAppletConstructor" value="false" />
<entry key="BadResultSetAccess" value="true" />
<entry key="BadSyntaxForRegularExpression" value="true" />
<entry key="BadUseOfReturnValue" value="true" />
<entry key="BadlyOverriddenAdapter" value="true" />
<entry key="BooleanReturnNull" value="true" />
<entry key="BuildInterproceduralCallGraph" value="false" />
<entry key="BuildObligationPolicyDatabase" value="true" />
<entry key="BuildStringPassthruGraph" value="true" />
<entry key="CallToUnsupportedMethod" value="false" />
<entry key="CalledMethods" value="true" />
<entry key="CheckCalls" value="false" />
<entry key="CheckExpectedWarnings" value="false" />
<entry key="CheckImmutableAnnotation" value="true" />
<entry key="CheckRelaxingNullnessAnnotation" value="true" />
<entry key="CheckTypeQualifiers" value="true" />
<entry key="CloneIdiom" value="true" />
<entry key="ComparatorIdiom" value="true" />
<entry key="ConfusedInheritance" value="true" />
<entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
<entry key="CovariantArrayAssignment" value="false" />
<entry key="CrossSiteScripting" value="true" />
<entry key="DefaultEncodingDetector" value="true" />
<entry key="DoInsideDoPrivileged" value="true" />
<entry key="DontCatchIllegalMonitorStateException" value="true" />
<entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
<entry key="DontUseEnum" value="true" />
<entry key="DroppedException" value="true" />
<entry key="DumbMethodInvocations" value="true" />
<entry key="DumbMethods" value="true" />
<entry key="DuplicateBranches" value="true" />
<entry key="EmptyZipFileEntry" value="false" />
<entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
<entry key="ExplicitSerialization" value="true" />
<entry key="FieldItemSummary" value="true" />
<entry key="FinalizerNullsFields" value="true" />
<entry key="FindBadCast2" value="true" />
<entry key="FindBadForLoop" value="true" />
<entry key="FindBugsSummaryStats" value="true" />
<entry key="FindCircularDependencies" value="false" />
<entry key="FindComparatorProblems" value="true" />
<entry key="FindDeadLocalStores" value="true" />
<entry key="FindDoubleCheck" value="true" />
<entry key="FindEmptySynchronizedBlock" value="true" />
<entry key="FindFieldSelfAssignment" value="true" />
<entry key="FindFinalizeInvocations" value="true" />
<entry key="FindFloatEquality" value="true" />
<entry key="FindFloatMath" value="false" />
<entry key="FindHEmismatch" value="true" />
<entry key="FindInconsistentSync2" value="true" />
<entry key="FindJSR166LockMonitorenter" value="true" />
<entry key="FindLocalSelfAssignment2" value="true" />
<entry key="FindMaskedFields" value="true" />
<entry key="FindMismatchedWaitOrNotify" value="true" />
<entry key="FindNakedNotify" value="true" />
<entry key="FindNoSideEffectMethods" value="true" />
<entry key="FindNonSerializableStoreIntoSession" value="false" />
<entry key="FindNonSerializableValuePassedToWriteObject" value="false" />
<entry key="FindNonShortCircuit" value="true" />
<entry key="FindNullDeref" value="true" />
<entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
<entry key="FindOpenStream" value="true" />
<entry key="FindPuzzlers" value="true" />
<entry key="FindRefComparison" value="true" />
<entry key="FindReturnRef" value="true" />
<entry key="FindRoughConstants" value="true" />
<entry key="FindRunInvocations" value="true" />
<entry key="FindSelfComparison" value="true" />
<entry key="FindSelfComparison2" value="true" />
<entry key="FindSleepWithLockHeld" value="true" />
<entry key="FindSpinLoop" value="true" />
<entry key="FindSqlInjection" value="true" />
<entry key="FindTwoLockWait" value="true" />
<entry key="FindUncalledPrivateMethods" value="true" />
<entry key="FindUnconditionalWait" value="true" />
<entry key="FindUninitializedGet" value="true" />
<entry key="FindUnrelatedTypesInGenericContainer" value="true" />
<entry key="FindUnreleasedLock" value="true" />
<entry key="FindUnsatisfiedObligation" value="true" />
<entry key="FindUnsyncGet" value="true" />
<entry key="FindUseOfNonSerializableValue" value="true" />
<entry key="FindUselessControlFlow" value="true" />
<entry key="FindUselessObjects" value="true" />
<entry key="FormatStringChecker" value="true" />
<entry key="FunctionsThatMightBeMistakenForProcedures" value="true" />
<entry key="HugeSharedStringConstants" value="true" />
<entry key="IDivResultCastToDouble" value="true" />
<entry key="IncompatMask" value="true" />
<entry key="InconsistentAnnotations" value="true" />
<entry key="InefficientIndexOf" value="false" />
<entry key="InefficientInitializationInsideLoop" value="false" />
<entry key="InefficientMemberAccess" value="false" />
<entry key="InefficientToArray" value="false" />
<entry key="InfiniteLoop" value="true" />
<entry key="InfiniteRecursiveLoop" value="true" />
<entry key="InheritanceUnsafeGetResource" value="true" />
<entry key="InitializationChain" value="true" />
<entry key="InitializeNonnullFieldsInConstructor" value="true" />
<entry key="InstantiateStaticClass" value="true" />
<entry key="IntCast2LongAsInstant" value="true" />
<entry key="InvalidJUnitTest" value="true" />
<entry key="IteratorIdioms" value="true" />
<entry key="LazyInit" value="true" />
<entry key="LoadOfKnownNullValue" value="true" />
<entry key="LostLoggerDueToWeakReference" value="true" />
<entry key="MethodReturnCheck" value="true" />
<entry key="Methods" value="true" />
<entry key="MultithreadedInstanceAccess" value="true" />
<entry key="MutableEnum" value="true" />
<entry key="MutableLock" value="true" />
<entry key="MutableStaticFields" value="true" />
<entry key="Naming" value="true" />
<entry key="Noise" value="false" />
<entry key="NoiseNullDeref" value="false" />
<entry key="NoteAnnotationRetention" value="true" />
<entry key="NoteCheckReturnValueAnnotations" value="true" />
<entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
<entry key="NoteJCIPAnnotation" value="true" />
<entry key="NoteNonNullAnnotations" value="false" />
<entry key="NoteNonnullReturnValues" value="false" />
<entry key="NoteSuppressedWarnings" value="true" />
<entry key="NoteUnconditionalParamDerefs" value="true" />
<entry key="NumberConstructor" value="true" />
<entry key="OptionalReturnNull" value="true" />
<entry key="OverridingEqualsNotSymmetrical" value="true" />
<entry key="PreferZeroLengthArrays" value="true" />
<entry key="PublicSemaphores" value="false" />
<entry key="QuestionableBooleanAssignment" value="true" />
<entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
<entry key="ReadReturnShouldBeChecked" value="true" />
<entry key="RedundantConditions" value="true" />
<entry key="RedundantInterfaces" value="true" />
<entry key="ReflectiveClasses" value="true" />
<entry key="RepeatedConditionals" value="true" />
<entry key="ResolveAllReferences" value="false" />
<entry key="RuntimeExceptionCapture" value="true" />
<entry key="SerializableIdiom" value="true" />
<entry key="StartInConstructor" value="true" />
<entry key="StaticCalendarDetector" value="true" />
<entry key="StringConcatenation" value="true" />
<entry key="SuperfluousInstanceOf" value="true" />
<entry key="SuspiciousThreadInterrupted" value="true" />
<entry key="SwitchFallthrough" value="true" />
<entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
<entry key="SynchronizeAndNullCheckField" value="true" />
<entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
<entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
<entry key="TestASM" value="false" />
<entry key="TestDataflowAnalysis" value="false" />
<entry key="TestingGround" value="false" />
<entry key="TestingGround2" value="false" />
<entry key="TrainFieldStoreTypes" value="true" />
<entry key="TrainLongInstantfParams" value="true" />
<entry key="TrainNonNullAnnotations" value="true" />
<entry key="TrainUnconditionalDerefParams" value="true" />
<entry key="URLProblems" value="true" />
<entry key="UncallableMethodOfAnonymousClass" value="true" />
<entry key="UnnecessaryMath" value="true" />
<entry key="UnreadFields" value="true" />
<entry key="UselessSubclassMethod" value="false" />
<entry key="VarArgsProblems" value="true" />
<entry key="VolatileUsage" value="true" />
<entry key="WaitInLoop" value="true" />
<entry key="WrongMapIterator" value="true" />
<entry key="XMLFactoryBypass" value="true" />
</map>
</option>
<option name="_reportCategories">
<map>
<entry key="BAD_PRACTICE" value="true" />
<entry key="CORRECTNESS" value="true" />
<entry key="EXPERIMENTAL" value="true" />
<entry key="I18N" value="true" />
<entry key="MALICIOUS_CODE" value="true" />
<entry key="MT_CORRECTNESS" value="true" />
<entry key="PERFORMANCE" value="true" />
<entry key="SECURITY" value="true" />
<entry key="STYLE" value="true" />
</map>
</option>
</component> </component>
</module> </module>

View file

@ -72,7 +72,7 @@
</component> </component>
<component name="CopyrightManager" default="Mobibot"> <component name="CopyrightManager" default="Mobibot">
<copyright> <copyright>
<option name="notice" value="&amp;#36;file.fileName&#10;&#10;Copyright (c) 2004-&amp;#36;today.year, Erik C. Thauvin (erik@thauvin.net)&#10;All rights reserved.&#10;&#10;Redistribution and use in source and binary forms, with or without&#10;modification, are permitted provided that the following conditions are&#10;met:&#10;&#10;Redistributions of source code must retain the above copyright notice,&#10;this list of conditions and the following disclaimer.&#10;&#10;Redistributions in binary form must reproduce the above copyright notice,&#10;this list of conditions and the following disclaimer in the documentation&#10;and/or other materials provided with the distribution.&#10;&#10;Neither the name of the author nor the names of its contributors may be&#10;used to endorse or promote products derived from this software without&#10;specific prior written permission.&#10;&#10;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS&#10;IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,&#10;THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR&#10;PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR&#10;CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,&#10;EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&#10;PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR&#10;PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF&#10;LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING&#10;NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS&#10;SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." /> <option name="notice" value="&amp;#36;file.fileName&#10;&#10;Copyright (c) 2004-&amp;#36;today.year, Erik C. Thauvin (erik@thauvin.net)&#10;All rights reserved.&#10;&#10;Redistribution and use in source and binary forms, with or without&#10;modification, are permitted provided that the following conditions are met:&#10;&#10; Redistributions of source code must retain the above copyright notice, this&#10; list of conditions and the following disclaimer.&#10;&#10; Redistributions in binary form must reproduce the above copyright notice,&#10; this list of conditions and the following disclaimer in the documentation&#10; and/or other materials provided with the distribution.&#10;&#10; Neither the name of this project nor the names of its contributors may be&#10; used to endorse or promote products derived from this software without&#10; specific prior written permission.&#10;&#10;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;&#10;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&#10;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&#10;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&#10;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&#10;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&#10;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&#10;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&#10;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&#10;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
<option name="keyword" value="Copyright" /> <option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="Erik C. Thauvin" /> <option name="allowReplaceKeyword" value="Erik C. Thauvin" />
<option name="myName" value="Mobibot" /> <option name="myName" value="Mobibot" />
@ -418,6 +418,15 @@
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.10/11fb3d88ae7e3b757d70237064210ceb954a5a04/commons-codec-1.10-sources.jar!/" /> <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.10/11fb3d88ae7e3b757d70237064210ceb954a5a04/commons-codec-1.10-sources.jar!/" />
</SOURCES> </SOURCES>
</library> </library>
<library name="Gradle: commons-collections:commons-collections:3.2.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2.1/761ea405b9b37ced573d2df0d1e3a4e0f9edc668/commons-collections-3.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2.1/fa095ef874374e5b2a11f8b06c26a5d68c7cb3a4/commons-collections-3.2.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: commons-httpclient:commons-httpclient:3.1"> <library name="Gradle: commons-httpclient:commons-httpclient:3.1">
<CLASSES> <CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-httpclient/commons-httpclient/3.1/964cd74171f427720480efdec40a7c7f6e58426a/commons-httpclient-3.1.jar!/" /> <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-httpclient/commons-httpclient/3.1/964cd74171f427720480efdec40a7c7f6e58426a/commons-httpclient-3.1.jar!/" />
@ -427,6 +436,15 @@
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-httpclient/commons-httpclient/3.1/c6d6ea83d0cf16d3ed9c1b7e600fa0f60b9d3159/commons-httpclient-3.1-sources.jar!/" /> <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-httpclient/commons-httpclient/3.1/c6d6ea83d0cf16d3ed9c1b7e600fa0f60b9d3159/commons-httpclient-3.1-sources.jar!/" />
</SOURCES> </SOURCES>
</library> </library>
<library name="Gradle: commons-lang:commons-lang:2.4">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.4/16313e02a793435009f1e458fa4af5d879f6fb11/commons-lang-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.4/2b8c4b3035e45520ef42033e823c7d33e4b4402c/commons-lang-2.4-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: commons-logging:commons-logging:1.2"> <library name="Gradle: commons-logging:commons-logging:1.2">
<CLASSES> <CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar!/" /> <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar!/" />
@ -481,6 +499,24 @@
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.sourceforge.jweather/jweather/0.3.0/385ecc27f62f9d7c31de57cee468a8df58cb415e/jweather-0.3.0-sources.jar!/" /> <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.sourceforge.jweather/jweather/0.3.0/385ecc27f62f9d7c31de57cee468a8df58cb415e/jweather-0.3.0-sources.jar!/" />
</SOURCES> </SOURCES>
</library> </library>
<library name="Gradle: net.thauvin.erik:semver:0.9.1-beta">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.thauvin.erik/semver/0.9.1-beta/644e4543823ae014b38e5f089f9d1c5cf9b5b1db/semver-0.9.1-beta.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.thauvin.erik/semver/0.9.1-beta/f100911addb16b8924d91897972ae074925908fc/semver-0.9.1-beta-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: org.apache.velocity:velocity:1.7">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/2ceb567b8f3f21118ecdec129fe1271dbc09aa7a/velocity-1.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/eb11eb70171ed64842b2e5216d5904e21ed162ac/velocity-1.7-sources.jar!/" />
</SOURCES>
</library>
<library name="Gradle: org.jdom:jdom:1.1.3"> <library name="Gradle: org.jdom:jdom:1.1.3">
<CLASSES> <CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jdom/jdom/1.1.3/8bdfeb39fa929c35f5e4f0b02d34350db39a1efc/jdom-1.1.3.jar!/" /> <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jdom/jdom/1.1.3/8bdfeb39fa929c35f5e4f0b02d34350db39a1efc/jdom-1.1.3.jar!/" />
@ -563,4 +599,227 @@
</SOURCES> </SOURCES>
</library> </library>
</component> </component>
<component name="org.twodividedbyzero.idea.findbugs">
<option name="annotationTypeSettings">
<map>
<entry key="ExpPriority" value="-4473925;-12828863;-8355712;WAVE_UNDERSCORE;0;" />
<entry key="HighPriority" value="-39836;-12828863;-39836;WAVE_UNDERSCORE;1;" />
<entry key="IgnorePriority" value="-4473925;-12828863;-11978414;WAVE_UNDERSCORE;0;" />
<entry key="LowPriority" value="-4473925;-12828863;-10316203;BOXED;0;" />
<entry key="NormalPriority" value="-4473925;-12828863;-10461184;WAVE_UNDERSCORE;2;" />
</map>
</option>
<option name="_basePreferences">
<map>
<entry key="property.analysisEffortLevel" value="default" />
<entry key="property.analyzeAfterAutoMake" value="false" />
<entry key="property.analyzeAfterCompile" value="false" />
<entry key="property.annotationGutterIconEnabled" value="true" />
<entry key="property.annotationSuppressWarningsClass" value="edu.umd.cs.findbugs.annotations.SuppressFBWarnings" />
<entry key="property.annotationTextRangeMarkupEnabled" value="true" />
<entry key="property.exportAsHtml" value="true" />
<entry key="property.exportAsXml" value="true" />
<entry key="property.exportBaseDir" value="" />
<entry key="property.exportCreateArchiveDir" value="false" />
<entry key="property.exportOpenBrowser" value="true" />
<entry key="property.minPriorityToReport" value="Medium" />
<entry key="property.runAnalysisInBackground" value="false" />
<entry key="property.showHiddenDetectors" value="false" />
<entry key="property.toolWindowToFront" value="true" />
</map>
</option>
<option name="_detectors">
<map>
<entry key="AppendingToAnObjectOutputStream" value="true" />
<entry key="AtomicityProblem" value="true" />
<entry key="BadAppletConstructor" value="false" />
<entry key="BadResultSetAccess" value="true" />
<entry key="BadSyntaxForRegularExpression" value="true" />
<entry key="BadUseOfReturnValue" value="true" />
<entry key="BadlyOverriddenAdapter" value="true" />
<entry key="BooleanReturnNull" value="true" />
<entry key="BuildInterproceduralCallGraph" value="false" />
<entry key="BuildObligationPolicyDatabase" value="true" />
<entry key="BuildStringPassthruGraph" value="true" />
<entry key="CallToUnsupportedMethod" value="false" />
<entry key="CalledMethods" value="true" />
<entry key="CheckCalls" value="false" />
<entry key="CheckExpectedWarnings" value="false" />
<entry key="CheckImmutableAnnotation" value="true" />
<entry key="CheckRelaxingNullnessAnnotation" value="true" />
<entry key="CheckTypeQualifiers" value="true" />
<entry key="CloneIdiom" value="true" />
<entry key="ComparatorIdiom" value="true" />
<entry key="ConfusedInheritance" value="true" />
<entry key="ConfusionBetweenInheritedAndOuterMethod" value="true" />
<entry key="CovariantArrayAssignment" value="false" />
<entry key="CrossSiteScripting" value="true" />
<entry key="DefaultEncodingDetector" value="true" />
<entry key="DoInsideDoPrivileged" value="true" />
<entry key="DontCatchIllegalMonitorStateException" value="true" />
<entry key="DontIgnoreResultOfPutIfAbsent" value="true" />
<entry key="DontUseEnum" value="true" />
<entry key="DroppedException" value="true" />
<entry key="DumbMethodInvocations" value="true" />
<entry key="DumbMethods" value="true" />
<entry key="DuplicateBranches" value="true" />
<entry key="EmptyZipFileEntry" value="false" />
<entry key="EqualsOperandShouldHaveClassCompatibleWithThis" value="true" />
<entry key="ExplicitSerialization" value="true" />
<entry key="FieldItemSummary" value="true" />
<entry key="FinalizerNullsFields" value="true" />
<entry key="FindBadCast2" value="true" />
<entry key="FindBadForLoop" value="true" />
<entry key="FindBugsSummaryStats" value="true" />
<entry key="FindCircularDependencies" value="false" />
<entry key="FindComparatorProblems" value="true" />
<entry key="FindDeadLocalStores" value="true" />
<entry key="FindDoubleCheck" value="true" />
<entry key="FindEmptySynchronizedBlock" value="true" />
<entry key="FindFieldSelfAssignment" value="true" />
<entry key="FindFinalizeInvocations" value="true" />
<entry key="FindFloatEquality" value="true" />
<entry key="FindFloatMath" value="false" />
<entry key="FindHEmismatch" value="true" />
<entry key="FindInconsistentSync2" value="true" />
<entry key="FindJSR166LockMonitorenter" value="true" />
<entry key="FindLocalSelfAssignment2" value="true" />
<entry key="FindMaskedFields" value="true" />
<entry key="FindMismatchedWaitOrNotify" value="true" />
<entry key="FindNakedNotify" value="true" />
<entry key="FindNoSideEffectMethods" value="true" />
<entry key="FindNonSerializableStoreIntoSession" value="false" />
<entry key="FindNonSerializableValuePassedToWriteObject" value="false" />
<entry key="FindNonShortCircuit" value="true" />
<entry key="FindNullDeref" value="true" />
<entry key="FindNullDerefsInvolvingNonShortCircuitEvaluation" value="true" />
<entry key="FindOpenStream" value="true" />
<entry key="FindPuzzlers" value="true" />
<entry key="FindRefComparison" value="true" />
<entry key="FindReturnRef" value="true" />
<entry key="FindRoughConstants" value="true" />
<entry key="FindRunInvocations" value="true" />
<entry key="FindSelfComparison" value="true" />
<entry key="FindSelfComparison2" value="true" />
<entry key="FindSleepWithLockHeld" value="true" />
<entry key="FindSpinLoop" value="true" />
<entry key="FindSqlInjection" value="true" />
<entry key="FindTwoLockWait" value="true" />
<entry key="FindUncalledPrivateMethods" value="true" />
<entry key="FindUnconditionalWait" value="true" />
<entry key="FindUninitializedGet" value="true" />
<entry key="FindUnrelatedTypesInGenericContainer" value="true" />
<entry key="FindUnreleasedLock" value="true" />
<entry key="FindUnsatisfiedObligation" value="true" />
<entry key="FindUnsyncGet" value="true" />
<entry key="FindUseOfNonSerializableValue" value="true" />
<entry key="FindUselessControlFlow" value="true" />
<entry key="FindUselessObjects" value="true" />
<entry key="FormatStringChecker" value="true" />
<entry key="FunctionsThatMightBeMistakenForProcedures" value="true" />
<entry key="HugeSharedStringConstants" value="true" />
<entry key="IDivResultCastToDouble" value="true" />
<entry key="IncompatMask" value="true" />
<entry key="InconsistentAnnotations" value="true" />
<entry key="InefficientIndexOf" value="false" />
<entry key="InefficientInitializationInsideLoop" value="false" />
<entry key="InefficientMemberAccess" value="false" />
<entry key="InefficientToArray" value="false" />
<entry key="InfiniteLoop" value="true" />
<entry key="InfiniteRecursiveLoop" value="true" />
<entry key="InheritanceUnsafeGetResource" value="true" />
<entry key="InitializationChain" value="true" />
<entry key="InitializeNonnullFieldsInConstructor" value="true" />
<entry key="InstantiateStaticClass" value="true" />
<entry key="IntCast2LongAsInstant" value="true" />
<entry key="InvalidJUnitTest" value="true" />
<entry key="IteratorIdioms" value="true" />
<entry key="LazyInit" value="true" />
<entry key="LoadOfKnownNullValue" value="true" />
<entry key="LostLoggerDueToWeakReference" value="true" />
<entry key="MethodReturnCheck" value="true" />
<entry key="Methods" value="true" />
<entry key="MultithreadedInstanceAccess" value="true" />
<entry key="MutableEnum" value="true" />
<entry key="MutableLock" value="true" />
<entry key="MutableStaticFields" value="true" />
<entry key="Naming" value="true" />
<entry key="Noise" value="false" />
<entry key="NoiseNullDeref" value="false" />
<entry key="NoteAnnotationRetention" value="true" />
<entry key="NoteCheckReturnValueAnnotations" value="true" />
<entry key="NoteDirectlyRelevantTypeQualifiers" value="true" />
<entry key="NoteJCIPAnnotation" value="true" />
<entry key="NoteNonNullAnnotations" value="false" />
<entry key="NoteNonnullReturnValues" value="false" />
<entry key="NoteSuppressedWarnings" value="true" />
<entry key="NoteUnconditionalParamDerefs" value="true" />
<entry key="NumberConstructor" value="true" />
<entry key="OptionalReturnNull" value="true" />
<entry key="OverridingEqualsNotSymmetrical" value="true" />
<entry key="PreferZeroLengthArrays" value="true" />
<entry key="PublicSemaphores" value="false" />
<entry key="QuestionableBooleanAssignment" value="true" />
<entry key="ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass" value="true" />
<entry key="ReadReturnShouldBeChecked" value="true" />
<entry key="RedundantConditions" value="true" />
<entry key="RedundantInterfaces" value="true" />
<entry key="ReflectiveClasses" value="true" />
<entry key="RepeatedConditionals" value="true" />
<entry key="ResolveAllReferences" value="false" />
<entry key="RuntimeExceptionCapture" value="true" />
<entry key="SerializableIdiom" value="true" />
<entry key="StartInConstructor" value="true" />
<entry key="StaticCalendarDetector" value="true" />
<entry key="StringConcatenation" value="true" />
<entry key="SuperfluousInstanceOf" value="true" />
<entry key="SuspiciousThreadInterrupted" value="true" />
<entry key="SwitchFallthrough" value="true" />
<entry key="SynchronizationOnSharedBuiltinConstant" value="true" />
<entry key="SynchronizeAndNullCheckField" value="true" />
<entry key="SynchronizeOnClassLiteralNotGetClass" value="true" />
<entry key="SynchronizingOnContentsOfFieldToProtectField" value="true" />
<entry key="TestASM" value="false" />
<entry key="TestDataflowAnalysis" value="false" />
<entry key="TestingGround" value="false" />
<entry key="TestingGround2" value="false" />
<entry key="TrainFieldStoreTypes" value="true" />
<entry key="TrainLongInstantfParams" value="true" />
<entry key="TrainNonNullAnnotations" value="true" />
<entry key="TrainUnconditionalDerefParams" value="true" />
<entry key="URLProblems" value="true" />
<entry key="UncallableMethodOfAnonymousClass" value="true" />
<entry key="UnnecessaryMath" value="true" />
<entry key="UnreadFields" value="true" />
<entry key="UselessSubclassMethod" value="false" />
<entry key="VarArgsProblems" value="true" />
<entry key="VolatileUsage" value="true" />
<entry key="WaitInLoop" value="true" />
<entry key="WrongMapIterator" value="true" />
<entry key="XMLFactoryBypass" value="true" />
</map>
</option>
<option name="_reportCategories">
<map>
<entry key="BAD_PRACTICE" value="true" />
<entry key="CORRECTNESS" value="true" />
<entry key="EXPERIMENTAL" value="true" />
<entry key="I18N" value="true" />
<entry key="MALICIOUS_CODE" value="true" />
<entry key="MT_CORRECTNESS" value="true" />
<entry key="PERFORMANCE" value="true" />
<entry key="SECURITY" value="true" />
<entry key="STYLE" value="true" />
</map>
</option>
<option name="_annotationTypeSettings">
<map>
<entry key="ExpPriority" value="-4473925;-12828863;-8355712;WAVE_UNDERSCORE;0;" />
<entry key="HighPriority" value="-39836;-12828863;-39836;WAVE_UNDERSCORE;1;" />
<entry key="IgnorePriority" value="-4473925;-12828863;-11978414;WAVE_UNDERSCORE;0;" />
<entry key="LowPriority" value="-4473925;-12828863;-10316203;BOXED;0;" />
<entry key="NormalPriority" value="-4473925;-12828863;-10461184;WAVE_UNDERSCORE;2;" />
</map>
</option>
</component>
</project> </project>

View file

@ -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.
* <p>
* Formatted as:
* <blockquote>
* <code>MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA]</code>
* </blockquote>
* <p>
* For example:
* <ul>
* <li><code>1.0.0</code></li>
* <li><code>1.0.0-beta</code></li>
* <li><code>1.0.0+20160124144700</code></li>
* <li><code>1.0.0-alpha+001</code></li>
* </ul>
*
* @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.");
}
}

View file

@ -1,35 +1,33 @@
/* /*
* Commands.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -40,7 +38,7 @@ package net.thauvin.erik.mobibot;
* @created 2014-04-26 * @created 2014-04-26
* @since 1.0 * @since 1.0
*/ */
class Commands final class Commands
{ {
/** /**
* The add (back)log command. * The add (back)log command.

View file

@ -1,35 +1,33 @@
/* /*
* CurrencyConverter.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;

View file

@ -1,35 +1,33 @@
/* /*
* DeliciousPoster.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -55,7 +53,7 @@ class DeliciousPoster
* @param password The del.icio.us password. * @param password The del.icio.us password.
* @param ircServer The IRC server. * @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); delicious = new Delicious(username, password);
this.ircServer = ircServer; this.ircServer = ircServer;
@ -90,7 +88,7 @@ class DeliciousPoster
* *
* @return The extended attribution line. * @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 + ')'; return "Posted by " + entry.getNick() + " on " + entry.getChannel() + " (" + ircServer + ')';
} }
@ -100,7 +98,7 @@ class DeliciousPoster
* *
* @param entry The entry to delete. * @param entry The entry to delete.
*/ */
public final void deletePost(EntryLink entry) public final void deletePost(final EntryLink entry)
{ {
final String link = entry.getLink(); final String link = entry.getLink();

View file

@ -1,35 +1,33 @@
/* /*
* Dice.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -42,7 +40,7 @@ import java.util.Random;
* @created 2014-04-28 * @created 2014-04-28
* @since 1.0 * @since 1.0
*/ */
class Dice final class Dice
{ {
/** /**
* Disables the default constructor. * Disables the default constructor.
@ -61,7 +59,7 @@ class Dice
* @param bot The bot's instance. * @param bot The bot's instance.
* @param sender The sender's nickname. * @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(); final Random r = new Random();

View file

@ -1,35 +1,33 @@
/* /*
* EntriesMgr.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -50,7 +48,7 @@ import java.util.List;
* @created 2014-04-28 * @created 2014-04-28
* @since 1.0 * @since 1.0
*/ */
class EntriesMgr final class EntriesMgr
{ {
/** /**
* The name of the file containing the current entries. * The name of the file containing the current entries.
@ -92,7 +90,7 @@ class EntriesMgr
* @throws FileNotFoundException If the file was not found. * @throws FileNotFoundException If the file was not found.
* @throws FeedException If an error occurred while reading the feed. * @throws FeedException If an error occurred while reading the feed.
*/ */
public static void loadBacklogs(String file, List<String> history) public static void loadBacklogs(final String file, final List<String> history)
throws FileNotFoundException, FeedException throws FileNotFoundException, FeedException
{ {
history.clear(); history.clear();
@ -145,7 +143,7 @@ class EntriesMgr
* @throws com.sun.syndication.io.FeedException If an error occurred while reading the feed. * @throws com.sun.syndication.io.FeedException If an error occurred while reading the feed.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static String loadEntries(String file, String channel, List<EntryLink> entries) public static String loadEntries(final String file, final String channel, final List<EntryLink> entries)
throws FileNotFoundException, FeedException throws FileNotFoundException, FeedException
{ {
entries.clear(); entries.clear();
@ -224,7 +222,7 @@ class EntriesMgr
* @param history The history array. * @param history The history array.
* @param isDayBackup Set the true if the daily backup file should also be created. * @param isDayBackup Set the true if the daily backup file should also be created.
*/ */
public static void saveEntries(Mobibot bot, List<EntryLink> entries, List<String> history, boolean isDayBackup) public static void saveEntries(final Mobibot bot, final List<EntryLink> entries, final List<String> history, final boolean isDayBackup)
{ {
if (bot.getLogger().isDebugEnabled()) if (bot.getLogger().isDebugEnabled())
{ {

View file

@ -1,35 +1,33 @@
/* /*
* EntryComment.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -66,7 +64,7 @@ public class EntryComment implements Serializable
* @param comment The new comment. * @param comment The new comment.
* @param nick The nickname of the comment's author. * @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.comment = comment;
this.nick = nick; this.nick = nick;
@ -97,7 +95,7 @@ public class EntryComment implements Serializable
* @param comment The actual comment. * @param comment The actual comment.
*/ */
@SuppressWarnings("UnusedDeclaration") @SuppressWarnings("UnusedDeclaration")
public final void setComment(String comment) public final void setComment(final String comment)
{ {
this.comment = comment; this.comment = comment;
} }
@ -128,7 +126,7 @@ public class EntryComment implements Serializable
* *
* @param nick The new nickname. * @param nick The new nickname.
*/ */
public final void setNick(String nick) public final void setNick(final String nick)
{ {
this.nick = nick; this.nick = nick;
} }

View file

@ -1,35 +1,33 @@
/* /*
* EntryLink.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -89,7 +87,7 @@ public class EntryLink implements Serializable
* @param channel The channel. * @param channel The channel.
* @param tags The entry's tags/categories. * @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.link = link;
this.title = title; this.title = title;
@ -105,7 +103,7 @@ public class EntryLink implements Serializable
* *
* @param tags The space-delimited tags. * @param tags The space-delimited tags.
*/ */
public final void setTags(String tags) public final void setTags(final String tags)
{ {
if (tags != null) if (tags != null)
{ {
@ -165,7 +163,7 @@ public class EntryLink implements Serializable
* @param date The entry date. * @param date The entry date.
* @param tags The entry's tags/categories. * @param tags The entry's tags/categories.
*/ */
public EntryLink(String link, String title, String nick, String channel, Date date, List<SyndCategoryImpl> tags) public EntryLink(final String link, final String title, final String nick, final String channel, final Date date, final List<SyndCategoryImpl> tags)
{ {
this.link = link; this.link = link;
this.title = title; this.title = title;
@ -184,7 +182,7 @@ public class EntryLink implements Serializable
* *
* @return The total number of comments for this entry. * @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)); comments.add(new EntryComment(comment, nick));
@ -196,7 +194,7 @@ public class EntryLink implements Serializable
* *
* @param index The index of the comment to delete. * @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()) if (index < comments.size())
{ {
@ -220,7 +218,7 @@ public class EntryLink implements Serializable
* @param channel The channel. * @param channel The channel.
*/ */
@SuppressWarnings("UnusedDeclaration") @SuppressWarnings("UnusedDeclaration")
public final void setChannel(String channel) public final void setChannel(final String channel)
{ {
this.channel = channel; this.channel = channel;
} }
@ -232,7 +230,7 @@ public class EntryLink implements Serializable
* *
* @return The specific comment. * @return The specific comment.
*/ */
public final EntryComment getComment(int index) public final EntryComment getComment(final int index)
{ {
return (comments.get(index)); return (comments.get(index));
} }
@ -300,7 +298,7 @@ public class EntryLink implements Serializable
* *
* @param link The new link. * @param link The new link.
*/ */
public final void setLink(String link) public final void setLink(final String link)
{ {
this.link = link; this.link = link;
} }
@ -321,7 +319,7 @@ public class EntryLink implements Serializable
* @param login The new login. * @param login The new login.
*/ */
@SuppressWarnings("UnusedDeclaration") @SuppressWarnings("UnusedDeclaration")
public final void setLogin(String login) public final void setLogin(final String login)
{ {
this.login = login; this.login = login;
} }
@ -341,7 +339,7 @@ public class EntryLink implements Serializable
* *
* @param nick The new nickname. * @param nick The new nickname.
*/ */
public final void setNick(String nick) public final void setNick(final String nick)
{ {
this.nick = nick; this.nick = nick;
} }
@ -361,7 +359,7 @@ public class EntryLink implements Serializable
* *
* @param tags The tags. * @param tags The tags.
*/ */
private void setTags(List<SyndCategoryImpl> tags) private void setTags(final List<SyndCategoryImpl> tags)
{ {
this.tags.addAll(tags); this.tags.addAll(tags);
} }
@ -381,7 +379,7 @@ public class EntryLink implements Serializable
* *
* @param title The new title. * @param title The new title.
*/ */
public final void setTitle(String title) public final void setTitle(final String title)
{ {
this.title = title; this.title = title;
} }
@ -413,7 +411,7 @@ public class EntryLink implements Serializable
* @param comment The actual comment. * @param comment The actual comment.
* @param nick The nickname of the author of the 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()) if (index < comments.size())
{ {

View file

@ -1,35 +1,33 @@
/* /*
* FeedReader.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; 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 sender The nick of the person who sent the message.
* @param url The URL to fetch. * @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.bot = bot;
this.sender = sender; this.sender = sender;

View file

@ -1,35 +1,33 @@
/* /*
* GoogleSearch.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; 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 sender The nick of the person who sent the message.
* @param query The Google query * @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.bot = bot;
this.sender = sender; this.sender = sender;

View file

@ -1,35 +1,33 @@
/* /*
* Joke.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -72,7 +70,7 @@ class Joke implements Runnable
* @param bot The bot's instance. * @param bot The bot's instance.
* @param sender The nick of the person who sent the message. * @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.bot = bot;
this.sender = sender; this.sender = sender;

View file

@ -1,35 +1,33 @@
/* /*
* Lookup.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -46,7 +44,7 @@ import java.net.UnknownHostException;
* @created 2014-04-26 * @created 2014-04-26
* @since 1.0 * @since 1.0
*/ */
class Lookup final class Lookup
{ {
/** /**
@ -74,7 +72,7 @@ class Lookup
* *
* @throws java.net.UnknownHostException If the host is unknown. * @throws java.net.UnknownHostException If the host is unknown.
*/ */
public static String lookup(String query) public static String lookup(final String query)
throws UnknownHostException throws UnknownHostException
{ {
final StringBuilder buffer = new StringBuilder(""); final StringBuilder buffer = new StringBuilder("");
@ -118,7 +116,7 @@ class Lookup
* *
* @throws java.io.IOException If a connection error occurs. * @throws java.io.IOException If a connection error occurs.
*/ */
public static String[] whois(String query) public static String[] whois(final String query)
throws IOException throws IOException
{ {
return whois(query, WHOIS_HOST); return whois(query, WHOIS_HOST);
@ -135,7 +133,7 @@ class Lookup
* @throws java.io.IOException If a connection error occurs. * @throws java.io.IOException If a connection error occurs.
*/ */
@SuppressWarnings("WeakerAccess, SameParameterValue") @SuppressWarnings("WeakerAccess, SameParameterValue")
public static String[] whois(String query, String host) public static String[] whois(final String query, final String host)
throws IOException throws IOException
{ {
final WhoisClient whois = new WhoisClient(); final WhoisClient whois = new WhoisClient();

View file

@ -1,35 +1,33 @@
/* /*
* Mobibot.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -38,6 +36,7 @@ import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.io.FeedException; import com.sun.syndication.io.FeedException;
import net.objecthunter.exp4j.Expression; import net.objecthunter.exp4j.Expression;
import net.objecthunter.exp4j.ExpressionBuilder; import net.objecthunter.exp4j.ExpressionBuilder;
import net.thauvin.erik.semver.Version;
import org.apache.commons.cli.*; import org.apache.commons.cli.*;
import org.apache.commons.logging.impl.Log4JLogger; import org.apache.commons.logging.impl.Log4JLogger;
import org.apache.log4j.Level; import org.apache.log4j.Level;
@ -60,6 +59,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
* @created Jan 31, 2004 * @created Jan 31, 2004
* @since 1.0 * @since 1.0
*/ */
@Version(properties = "version.properties", className = "ReleaseInfo")
public class Mobibot extends PircBot public class Mobibot extends PircBot
{ {
/** /**
@ -92,8 +92,8 @@ public class Mobibot extends PircBot
* The info strings. * The info strings.
*/ */
private static final String[] INFO_STRS = { private static final String[] INFO_STRS = {
ReleaseInfo.getProject() + " v" + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() ReleaseInfo.getProject() + " v" + ReleaseInfo.getVersion() + " by Erik C. Thauvin (erik@thauvin.net)",
+ " by Erik C. Thauvin (erik@thauvin.net)", "http://www.mobitopia.org/mobibot/" "http://www.mobitopia.org/mobibot/"
}; };
/** /**
@ -145,8 +145,7 @@ public class Mobibot extends PircBot
* The version strings. * The version strings.
*/ */
private static final String[] VERSION_STRS = { private static final String[] VERSION_STRS = {
"Version: " + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() + " (" + Utils.ISO_SDF "Version: " + ReleaseInfo.getVersion() + " (" + Utils.ISO_SDF.format(ReleaseInfo.getBuildDate()) + ')',
.format(ReleaseInfo.getBuildDate()) + ')',
"Platform: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ", " + System "Platform: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ", " + System
.getProperty("os.arch") + ", " + System.getProperty("user.country") + ')', .getProperty("os.arch") + ", " + System.getProperty("user.country") + ')',
"Runtime: " + System.getProperty("java.runtime.name") + " (build " + System "Runtime: " + System.getProperty("java.runtime.name") + " (build " + System
@ -320,7 +319,8 @@ public class Mobibot extends PircBot
* @param logsDir The logs directory. * @param logsDir The logs directory.
*/ */
@SuppressWarnings("WeakerAccess") @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.defaultConnectTimeout", String.valueOf(CONNECT_TIMEOUT));
System.getProperties().setProperty("sun.net.client.defaultReadTimeout", 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. * @param args The command line arguments.
*/ */
public static void main(String[] args) public static void main(final String[] args)
{ {
// Setup the command line options // Setup the command line options
final Options options = new Options(); final Options options = new Options();
@ -639,7 +639,7 @@ public class Mobibot extends PircBot
* *
* @param pwd The password. * @param pwd The password.
*/ */
private void setIdent(String pwd) private void setIdent(final String pwd)
{ {
ident = pwd; ident = pwd;
} }
@ -649,7 +649,7 @@ public class Mobibot extends PircBot
* *
* @param nick The nickname. * @param nick The nickname.
*/ */
private void setIdentNick(String nick) private void setIdentNick(final String nick)
{ {
identNick = nick; identNick = nick;
} }
@ -659,7 +659,7 @@ public class Mobibot extends PircBot
* *
* @param msg The message. * @param msg The message.
*/ */
private void setIdentMsg(String msg) private void setIdentMsg(final String msg)
{ {
identMsg = msg; identMsg = msg;
} }
@ -669,7 +669,7 @@ public class Mobibot extends PircBot
* *
* @param feedURL The feed URL. * @param feedURL The feed URL.
*/ */
private void setFeedURL(String feedURL) private void setFeedURL(final String feedURL)
{ {
this.feedURL = feedURL; this.feedURL = feedURL;
} }
@ -680,7 +680,7 @@ public class Mobibot extends PircBot
* @param username The del.icio.us user name. * @param username The del.icio.us user name.
* @param password The del.icio.us password. * @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); delicious = new DeliciousPoster(username, password, ircServer);
} }
@ -693,7 +693,8 @@ public class Mobibot extends PircBot
* @param token The Twitter token. * @param token The Twitter token.
* @param tokenSecret The Twitter token secret. * @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; twitterConsumerKey = consumerKey;
twitterConsumerSecret = consumerSecret; twitterConsumerSecret = consumerSecret;
@ -706,7 +707,7 @@ public class Mobibot extends PircBot
* *
* @param tags The tags. * @param tags The tags.
*/ */
private void setTags(String tags) private void setTags(final String tags)
{ {
defaultTags = tags; defaultTags = tags;
} }
@ -716,7 +717,7 @@ public class Mobibot extends PircBot
* *
* @param nicks The nicks to ignore * @param nicks The nicks to ignore
*/ */
private void setIgnoredNicks(String nicks) private void setIgnoredNicks(final String nicks)
{ {
if (Utils.isValidString(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 tellMaxDays The max number of days to hold messages for.
* @param tellMaxSize The maximum number of messages to hold * @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.tellMaxDays = tellMaxDays;
this.tellMaxSize = tellMaxSize; 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. * @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); EntriesMgr.saveEntries(this, entries, history, isDayBackup);
} }
@ -756,7 +757,7 @@ public class Mobibot extends PircBot
* *
* @param secs The number of seconds to sleep for. * @param secs The number of seconds to sleep for.
*/ */
private static void sleep(int secs) private static void sleep(final int secs)
{ {
try try
{ {
@ -816,7 +817,7 @@ public class Mobibot extends PircBot
* *
* @param action The action. * @param action The action.
*/ */
final void action(String action) final void action(final String action)
{ {
action(channel, action); action(channel, action);
} }
@ -827,7 +828,7 @@ public class Mobibot extends PircBot
* @param channel The channel. * @param channel The channel.
* @param action The action. * @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)) if (Utils.isValidString(channel) && Utils.isValidString(action))
{ {
@ -842,7 +843,7 @@ public class Mobibot extends PircBot
* @param args The command arguments. * @param args The command arguments.
* @param message The actual message. * @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)) 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. * @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)) if (Utils.isValidString(feedURL))
{ {
@ -893,7 +894,7 @@ public class Mobibot extends PircBot
* *
* @return The index or -1 if none. * @return The index or -1 if none.
*/ */
private int findDupEntry(String link) private int findDupEntry(final String link)
{ {
EntryLink entry; EntryLink entry;
@ -928,7 +929,7 @@ public class Mobibot extends PircBot
* *
* @param backLogsUrl The backlogs URL. * @param backLogsUrl The backlogs URL.
*/ */
private void setBacklogsUrl(String backLogsUrl) private void setBacklogsUrl(final String backLogsUrl)
{ {
this.backLogsUrl = backLogsUrl; this.backLogsUrl = backLogsUrl;
} }
@ -1027,7 +1028,7 @@ public class Mobibot extends PircBot
* *
* @param weblogUrl The weblog URL. * @param weblogUrl The weblog URL.
*/ */
private void setWeblogUrl(String weblogUrl) private void setWeblogUrl(final String weblogUrl)
{ {
this.weblogUrl = 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 sender The nick of the person who sent the private message.
* @param query The Google query to execute. * @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) if (query.length() > 0)
{ {
@ -1057,7 +1058,7 @@ public class Mobibot extends PircBot
* *
* @return The indented help string. * @return The indented help string.
*/ */
private String helpIndent(String help) private String helpIndent(final String help)
{ {
return helpIndent(help, true); return helpIndent(help, true);
} }
@ -1070,7 +1071,7 @@ public class Mobibot extends PircBot
* *
* @return The indented help string. * @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); 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 sender The nick of the person who sent the private message.
* @param topic The help topic, if any. * @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(); final String lcTopic = topic.toLowerCase();
@ -1336,7 +1337,7 @@ public class Mobibot extends PircBot
* @param sender The sender. * @param sender The sender.
* @param args The command arguments. * @param args The command arguments.
*/ */
private void ignoreResponse(String sender, String args) private void ignoreResponse(final String sender, final String args)
{ {
if (!isOp(sender)) if (!isOp(sender))
{ {
@ -1404,7 +1405,7 @@ public class Mobibot extends PircBot
* @param sender The nick of the person who sent the message. * @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. * @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) for (final String info : INFO_STRS)
{ {
@ -1434,7 +1435,7 @@ public class Mobibot extends PircBot
* *
* @return <code>true</code> if the nick should be ignored, <code>false</code> otherwise. * @return <code>true</code> if the nick should be ignored, <code>false</code> otherwise.
*/ */
private boolean isIgnoredNick(String nick) private boolean isIgnoredNick(final String nick)
{ {
return Utils.isValidString(nick) && ignoredNicks.contains(nick.toLowerCase()); 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. * @return true, if the sender is an Op.
*/ */
private boolean isOp(String sender) private boolean isOp(final String sender)
{ {
final User[] users = getUsers(channel); 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 sender The nick of the person who sent the message
* @param query The hostname or IP address. * @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)+")) if (query.matches("(\\S.)+(\\S)+"))
{ {
@ -1598,7 +1599,8 @@ public class Mobibot extends PircBot
} }
@Override @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()) if (logger.isDebugEnabled())
{ {
@ -2093,7 +2095,8 @@ public class Mobibot extends PircBot
} }
@Override @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()) if (logger.isDebugEnabled())
{ {
@ -2270,7 +2273,8 @@ public class Mobibot extends PircBot
} }
@Override @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)) if (target.equals(channel))
{ {
@ -2285,7 +2289,7 @@ public class Mobibot extends PircBot
* @param message The actual message sent. * @param message The actual message sent.
* @param isAction Set to true if the message is an action. * @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 ? " " : ": ") recap.add(Utils.UTC_SDF.format(Calendar.getInstance().getTime()) + " -> " + sender + (isAction ? " " : ": ")
+ message); + message);
@ -2297,13 +2301,13 @@ public class Mobibot extends PircBot
} }
@Override @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); tellSendMessages(sender);
} }
@Override @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); tellSendMessages(newNick);
} }
@ -2313,7 +2317,7 @@ public class Mobibot extends PircBot
* *
* @param nickname The user's nickname. * @param nickname The user's nickname.
*/ */
private void tellSendMessages(String nickname) private void tellSendMessages(final String nickname)
{ {
tellSendMessages(nickname, false); tellSendMessages(nickname, false);
} }
@ -2324,7 +2328,7 @@ public class Mobibot extends PircBot
* @param nickname The user's nickname. * @param nickname The user's nickname.
* @param isMessage The message flag. * @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()) if (!nickname.equals(getNick()) && isTellEnabled())
{ {
@ -2396,7 +2400,7 @@ public class Mobibot extends PircBot
* @param message The actual message. * @param message The actual message.
* @param isPrivate Set to true if the response should be a private message, otherwise a notice is sent. * @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)) 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 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. * @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) 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 sender The nick of the person who sent the message.
* @param message The actual 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); 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 sender The nick of the person who sent the message.
* @param symbol The stock symbol to lookup. * @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) if (symbol.length() > 0)
{ {
@ -2470,7 +2474,7 @@ public class Mobibot extends PircBot
* @param sender The sender's nick. * @param sender The sender's nick.
* @param cmds The commands string. * @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)) if (!Utils.isValidString(cmds))
{ {
@ -2653,7 +2657,7 @@ public class Mobibot extends PircBot
* @param sender The sender's nick. * @param sender The sender's nick.
* @param message The message. * @param message The message.
*/ */
private void twitterResponse(String sender, String message) private void twitterResponse(final String sender, final String message)
{ {
if (isTwitterEnabled()) if (isTwitterEnabled())
{ {
@ -2684,7 +2688,7 @@ public class Mobibot extends PircBot
* @param sender The nick of the person who sent the message. * @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. * @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 User[] users = getUsers(channel);
final String[] nicks = new String[users.length]; 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 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. * @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)) if (isOp(sender))
{ {
@ -2735,7 +2739,7 @@ public class Mobibot extends PircBot
* @param args The view command arguments. * @param args The view command arguments.
* @param isPrivate Set to true is the response should be send as a private message. * @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(); String lcArgs = args.toLowerCase();
@ -2838,7 +2842,7 @@ public class Mobibot extends PircBot
* @param id The station's ID. * @param id The station's ID.
* @param isPrivate Set to true is the response should be send as a private message. * @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(); new Thread(new Weather(this, sender, id, isPrivate)).start();
} }

View file

@ -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; }
}

View file

@ -1,35 +1,33 @@
/* /*
* StockQuote.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; 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 sender The nick of the person who sent the message.
* @param symbol The stock symbol. * @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.bot = bot;
this.sender = sender; this.sender = sender;

View file

@ -1,35 +1,33 @@
/* /*
* TellMessage.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -71,7 +69,7 @@ public class TellMessage implements Serializable
* @param recipient The recipient's nick. * @param recipient The recipient's nick.
* @param message The message. * @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.sender = sender;
this.recipient = recipient; this.recipient = recipient;
@ -149,7 +147,7 @@ public class TellMessage implements Serializable
* *
* @return <code>true</code> if the nickname matches. * @return <code>true</code> if the nickname matches.
*/ */
public boolean isMatch(String nick) public boolean isMatch(final String nick)
{ {
return (sender.equalsIgnoreCase(nick) || recipient.equalsIgnoreCase(nick)); return (sender.equalsIgnoreCase(nick) || recipient.equalsIgnoreCase(nick));
} }
@ -161,7 +159,7 @@ public class TellMessage implements Serializable
* *
* @return <code>true</code> if the id matches. * @return <code>true</code> if the id matches.
*/ */
public boolean isMatchId(String id) public boolean isMatchId(final String id)
{ {
return this.id.equals(id); return this.id.equals(id);
} }

View file

@ -1,35 +1,33 @@
/* /*
* TellMessagesMgr.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -48,7 +46,7 @@ import java.util.List;
* @created 2014-04-26 * @created 2014-04-26
* @since 1.0 * @since 1.0
*/ */
class TellMessagesMgr final class TellMessagesMgr
{ {
/** /**
* Disables the default constructor. * Disables the default constructor.
@ -69,7 +67,7 @@ class TellMessagesMgr
* *
* @return <code>True</code> if the queue was cleaned. * @return <code>True</code> if the queue was cleaned.
*/ */
public static boolean cleanTellMessages(List<TellMessage> tellMessages, int tellMaxDays) public static boolean cleanTellMessages(final List<TellMessage> tellMessages, final int tellMaxDays)
{ {
final Calendar maxDate = Calendar.getInstance(); final Calendar maxDate = Calendar.getInstance();
final Date today = new Date(); final Date today = new Date();
@ -99,7 +97,7 @@ class TellMessagesMgr
* @return The {@link net.thauvin.erik.mobibot.TellMessage} array. * @return The {@link net.thauvin.erik.mobibot.TellMessage} array.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static List<TellMessage> load(String file, Log4JLogger logger) public static List<TellMessage> load(final String file, final Log4JLogger logger)
{ {
try try
{ {
@ -142,7 +140,7 @@ class TellMessagesMgr
* @param messages The {@link net.thauvin.erik.mobibot.TellMessage} array. * @param messages The {@link net.thauvin.erik.mobibot.TellMessage} array.
* @param logger The logger. * @param logger The logger.
*/ */
public static void save(String file, List<TellMessage> messages, Log4JLogger logger) public static void save(final String file, final List<TellMessage> messages, final Log4JLogger logger)
{ {
try try
{ {

View file

@ -1,35 +1,33 @@
/* /*
* Twitter.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -92,8 +90,8 @@ class Twitter implements Runnable
* @param accessTokenSecret The Twitter access token secret. * @param accessTokenSecret The Twitter access token secret.
* @param message The Twitter message. * @param message The Twitter message.
*/ */
public Twitter(Mobibot bot, String sender, String consumerKey, String consumerSecret, String accessToken, public Twitter(final Mobibot bot, final String sender, final String consumerKey, final String consumerSecret, final String accessToken,
String accessTokenSecret, String message) final String accessTokenSecret, final String message)
{ {
this.bot = bot; this.bot = bot;
this.consumerKey = consumerKey; this.consumerKey = consumerKey;

View file

@ -1,35 +1,33 @@
/* /*
* Utils.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;

View file

@ -1,35 +1,33 @@
/* /*
* War.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -42,7 +40,7 @@ import java.util.Random;
* @created 2014-04-28 * @created 2014-04-28
* @since 1.0 * @since 1.0
*/ */
class War final class War
{ {
/** /**
* The deck of card for the {@link net.thauvin.erik.mobibot.Commands#WAR_CMD war} command. * 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 bot The bot's instance.
* @param sender The sender's nickname. * @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(); final Random r = new Random();

View file

@ -1,35 +1,33 @@
/* /*
* Weather.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -87,7 +85,7 @@ class Weather implements Runnable
* @param station The station ID. * @param station The station ID.
* @param isPrivate Set to true is the response should be send as a private message. * @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.bot = bot;
this.sender = sender; this.sender = sender;

View file

@ -1,35 +1,33 @@
/* /*
* WorldTime.java * 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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are met:
* met:
* *
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice, this
* this list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* Neither the name of the author nor the names of its contributors may be * 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 * used to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
@ -147,7 +145,7 @@ class WorldTime
* @param args The time command arguments. * @param args The time command arguments.
* @param isPrivate Set to true is the response should be send as a private message. * @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; boolean isInvalidTz = false;
final String tz = (COUNTRIES_MAP.get((args.substring(args.indexOf(' ') + 1).trim().toUpperCase()))); final String tz = (COUNTRIES_MAP.get((args.substring(args.indexOf(' ') + 1).trim().toUpperCase())));

8
version.properties Normal file
View file

@ -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