diff --git a/build.properties b/build.properties
index 65f691264..91cca9971 100644
--- a/build.properties
+++ b/build.properties
@@ -4,7 +4,6 @@ javacTarget=1.8
# Release Configuration
releaseVersion=1.925
-releaseNr=9749
releaseFileParentDir=yacy
privateKeyFile=private.key
diff --git a/build.xml b/build.xml
index c42d3935c..52b1e3572 100644
--- a/build.xml
+++ b/build.xml
@@ -90,28 +90,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -120,13 +119,23 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -518,8 +527,8 @@
-
+
@@ -535,7 +544,7 @@
-
+
diff --git a/defaults/yacyBuild.properties.template b/defaults/yacyBuild.properties.template
index 10eaa3f6e..5b0e09234 100644
--- a/defaults/yacyBuild.properties.template
+++ b/defaults/yacyBuild.properties.template
@@ -1,3 +1,7 @@
-SVNRevision = @REPL_REVISION_NR@
Version = @REPL_VERSION@
-RepositoryVersion = @REPL_REPVER@
\ No newline at end of file
+RepositoryVersionDate = @REPL_REPVERDATE@
+RepositoryVersionTime = @REPL_REPVERTIME@
+RepositoryVersionHash = @REPL_REPVERHASH@
+ReleaseStub = @REPL_RELEASESTUB@
+dstamp = @REPL_DSTAMP@
+tstamp = @REPL_TSTAMP@
\ No newline at end of file
diff --git a/htroot/api/version.xml b/htroot/api/version.xml
index b0585f62c..ab78a3ebb 100644
--- a/htroot/api/version.xml
+++ b/htroot/api/version.xml
@@ -1,6 +1,9 @@
- #[versionstring]#
- #[svnRev]#
- 19700101
+ #[versionstring]#
+ #[buildDate]#
+ #[buildTime]#
+ #[buildDateTime]#
+ #[buildDateTime]#
+ #[buildVersion]#
diff --git a/source/net/yacy/htroot/ConfigUpdate_p.java b/source/net/yacy/htroot/ConfigUpdate_p.java
index 506d9e7f0..867432f18 100644
--- a/source/net/yacy/htroot/ConfigUpdate_p.java
+++ b/source/net/yacy/htroot/ConfigUpdate_p.java
@@ -78,26 +78,26 @@ public class ConfigUpdate_p {
final String release = post.get("releasedownload", "");
if (!release.isEmpty()) {
try {
- yacyRelease versionToDownload = new yacyRelease(new DigestURL(release));
+ yacyRelease versionToDownload = new yacyRelease(new DigestURL(release));
- // replace this version with version which contains public key
- final yacyRelease.DevAndMainVersions allReleases = yacyRelease.allReleases(false, false);
- final Set mostReleases = versionToDownload.isMainRelease() ? allReleases.main : allReleases.dev;
- for (final yacyRelease rel : mostReleases) {
- if (rel.equals(versionToDownload)) {
- versionToDownload = rel;
- break;
- }
- }
- final File downloadedRelease = versionToDownload.downloadRelease();
- if(downloadedRelease == null) {
- prop.put("candeploy_downloadError", "1");
- prop.putHTML("candeploy_downloadError_releasedownload", release);
- }
+ // replace this version with version which contains public key
+ final yacyRelease.DevAndMainVersions allReleases = yacyRelease.allReleases(false, false);
+ final Set mostReleases = versionToDownload.isMainRelease() ? allReleases.main : allReleases.dev;
+ for (final yacyRelease rel : mostReleases) {
+ if (rel.equals(versionToDownload)) {
+ versionToDownload = rel;
+ break;
+ }
+ }
+ final File downloadedRelease = versionToDownload.downloadRelease();
+ if(downloadedRelease == null) {
+ prop.put("candeploy_downloadError", "1");
+ prop.putHTML("candeploy_downloadError_releasedownload", release);
+ }
} catch (final IOException e) {
- ConcurrentLog.logException(e);
- prop.put("candeploy_downloadError", "1");
- prop.putHTML("candeploy_downloadError_releasedownload", release);
+ ConcurrentLog.logException(e);
+ prop.put("candeploy_downloadError", "1");
+ prop.putHTML("candeploy_downloadError_releasedownload", release);
}
}
}
@@ -112,8 +112,8 @@ public class ConfigUpdate_p {
try {
// only delete files from RELEASE directory
if (FileUtils.isInDirectory(new File(sb.releasePath, release), sb.releasePath)) {
- FileUtils.deletedelete(new File(sb.releasePath, release));
- FileUtils.deletedelete(new File(sb.releasePath, release + ".sig"));
+ FileUtils.deletedelete(new File(sb.releasePath, release));
+ FileUtils.deletedelete(new File(sb.releasePath, release + ".sig"));
} else {
sb.getLog().severe("AUTO-UPDATE: could not delete " + release + ": file not in release directory.");
}
@@ -141,9 +141,9 @@ public class ConfigUpdate_p {
prop.put("candeploy_autoUpdate", "4");
} else {
if(yacyRelease.deployRelease(downloaded)) {
- sb.terminate(10, "manual release update to " + downloaded.getName());
- sb.getLog().info("AUTO-UPDATE: deploy and restart initiated");
- prop.put("candeploy_autoUpdate", "1");
+ sb.terminate(10, "manual release update to " + downloaded.getName());
+ sb.getLog().info("AUTO-UPDATE: deploy and restart initiated");
+ prop.put("candeploy_autoUpdate", "1");
} else {
sb.getLog().info("AUTO-UPDATE: omitting update because an error occurred while trying to deploy the release..");
prop.put("candeploy_autoUpdate", "5");
@@ -163,7 +163,7 @@ public class ConfigUpdate_p {
}
// version information
- final String versionstring = yacyBuildProperties.getVersion() + "/" + yacyBuildProperties.getSVNRevision();
+ final String versionstring = yacyBuildProperties.getReleaseStub();
prop.putHTML("candeploy_versionpp", versionstring);
final boolean devenvironment = new File(sb.getAppPath(), ".git").exists();
float thisVersion = Float.parseFloat(yacyBuildProperties.getVersion());
@@ -180,14 +180,14 @@ public class ConfigUpdate_p {
prop.put("candeploy_deployenabled", (downloadedFilesNum == 0) ? "0" : ((devenvironment) ? "1" : "2")); // prevent that a developer-version is over-deployed
- final NavigableSet downloadedReleases = new TreeSet();
+ final NavigableSet downloadedReleases = new TreeSet<>();
for (final File downloaded : downloadedFiles) {
try {
final yacyRelease release = new yacyRelease(downloaded);
downloadedReleases.add(release);
} catch (final RuntimeException e) {
// not a valid release
- // can be also a restart- or deploy-file
+ // can be also a restart- or deploy-file
final File invalid = downloaded;
if (!(invalid.getName().endsWith(".bat") || invalid.getName().endsWith(".sh") || invalid.getName().endsWith(".sig"))) { // Windows & Linux don't like deleted scripts while execution!
invalid.deleteOnExit();
@@ -216,7 +216,7 @@ public class ConfigUpdate_p {
final yacyRelease.DevAndMainVersions releasess = yacyRelease.allReleases(false, false);
relcount = 0;
- final ArrayList rlist = new ArrayList();
+ final ArrayList rlist = new ArrayList<>();
final Set remoteDevReleases = releasess.dev;
remoteDevReleases.removeAll(downloadedReleases);
for (final yacyRelease release : remoteDevReleases) {
diff --git a/source/net/yacy/htroot/Status.java b/source/net/yacy/htroot/Status.java
index dede1e48e..ba394466f 100644
--- a/source/net/yacy/htroot/Status.java
+++ b/source/net/yacy/htroot/Status.java
@@ -58,9 +58,9 @@ public class Status
private static final String PEERSTATUS = "peerStatus";
public static serverObjects respond(
- final RequestHeader header,
- final serverObjects post,
- final serverSwitch env) {
+ final RequestHeader header,
+ final serverObjects post,
+ final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final Switchboard sb = (Switchboard) env;
@@ -77,7 +77,7 @@ public class Status
if ( post != null && !post.isEmpty() ) {
if ( sb.adminAuthenticated(header) < 2 ) {
- prop.authenticationRequired();
+ prop.authenticationRequired();
return prop;
}
boolean redirect = false;
@@ -133,7 +133,7 @@ public class Status
// password protection
if ( (sb.getConfig(SwitchboardConstants.ADMIN_ACCOUNT_B64MD5, "").isEmpty())
- && (!sb.getConfigBool(SwitchboardConstants.ADMIN_ACCOUNT_FOR_LOCALHOST, false)) ) {
+ && (!sb.getConfigBool(SwitchboardConstants.ADMIN_ACCOUNT_FOR_LOCALHOST, false)) ) {
prop.put("protection", "0"); // not protected
prop.put("urgentSetPassword", "1");
} else {
@@ -143,8 +143,8 @@ public class Status
if ( sb.getConfigBool(SwitchboardConstants.ADMIN_ACCOUNT_FOR_LOCALHOST, false) ) {
prop.put("unrestrictedLocalAccess", 1);
if(sb.getConfig(SwitchboardConstants.SERVER_SERVLETS_CALLED, "").indexOf("ConfigAccounts_p.html", 0) < 0) {
- /* Encourage checking accounts config page to be sure that unrestricted local access is desired */
- prop.put("warningUnrestrictedLocalAccess", true);
+ /* Encourage checking accounts config page to be sure that unrestricted local access is desired */
+ prop.put("warningUnrestrictedLocalAccess", true);
}
}
@@ -157,7 +157,7 @@ public class Status
}
if ( !sb.observer.getMemoryAvailable() ) {
final String minFree =
- Formatter.bytesToString(sb.observer.getMinFreeMemory() * 1024L * 1024L);
+ Formatter.bytesToString(sb.observer.getMinFreeMemory() * 1024L * 1024L);
prop.put("warningMemoryLow", "1");
prop.put("warningMemoryLow_minSpace", minFree);
}
@@ -166,7 +166,7 @@ public class Status
// version information
//final String versionstring = yacyVersion.combined2prettyVersion(sb.getConfig("version","0.1"));
- final String versionstring = yacyBuildProperties.getVersion() + "/" + yacyBuildProperties.getSVNRevision();
+ final String versionstring = yacyBuildProperties.getReleaseStub();
prop.put("versionpp", versionstring);
prop.put("java.version", System.getProperty("java.version"));
@@ -239,18 +239,18 @@ public class Status
}
}
final String peerStatus =
- ((sb.peers.mySeed() == null) ? Seed.PEERTYPE_VIRGIN : sb.peers.mySeed().get(
- Seed.PEERTYPE,
- Seed.PEERTYPE_VIRGIN));
+ ((sb.peers.mySeed() == null) ? Seed.PEERTYPE_VIRGIN : sb.peers.mySeed().get(
+ Seed.PEERTYPE,
+ Seed.PEERTYPE_VIRGIN));
if ( Seed.PEERTYPE_VIRGIN.equals(peerStatus)
- && "freeworld".equals(sb.getConfig(SwitchboardConstants.NETWORK_NAME, ""))
- && !SwitchboardConstants.CLUSTER_MODE_PRIVATE_PEER.equals(sb.getConfig(SwitchboardConstants.CLUSTER_MODE, ""))) {
+ && "freeworld".equals(sb.getConfig(SwitchboardConstants.NETWORK_NAME, ""))
+ && !SwitchboardConstants.CLUSTER_MODE_PRIVATE_PEER.equals(sb.getConfig(SwitchboardConstants.CLUSTER_MODE, ""))) {
prop.put(PEERSTATUS, "0");
prop.put("urgentStatusVirgin", "1");
} else if ( Seed.PEERTYPE_JUNIOR.equals(peerStatus)
- && "freeworld".equals(sb.getConfig(SwitchboardConstants.NETWORK_NAME, ""))
- && !SwitchboardConstants.CLUSTER_MODE_PRIVATE_PEER.equals(sb.getConfig(SwitchboardConstants.CLUSTER_MODE, ""))) {
+ && "freeworld".equals(sb.getConfig(SwitchboardConstants.NETWORK_NAME, ""))
+ && !SwitchboardConstants.CLUSTER_MODE_PRIVATE_PEER.equals(sb.getConfig(SwitchboardConstants.CLUSTER_MODE, ""))) {
prop.put(PEERSTATUS, "1");
prop.put("warningStatusJunior", "1");
} else if ( Seed.PEERTYPE_SENIOR.equals(peerStatus) ) {
@@ -266,9 +266,9 @@ public class Status
final String seedUploadMethod = sb.getConfig("seedUploadMethod", "");
if ( !"none".equalsIgnoreCase(seedUploadMethod)
- || ("".equals(seedUploadMethod) && (sb.getConfig("seedFTPPassword", "").length() > 0 || sb
- .getConfig("seedFilePath", "")
- .length() > 0)) ) {
+ || ("".equals(seedUploadMethod) && (sb.getConfig("seedFTPPassword", "").length() > 0 || sb
+ .getConfig("seedFilePath", "")
+ .length() > 0)) ) {
if ( "".equals(seedUploadMethod) ) {
if ( sb.getConfig("seedFTPPassword", "").length() > 0 ) {
sb.setConfig("seedUploadMethod", "Ftp");
@@ -289,8 +289,8 @@ public class Status
prop.putHTML("seedServer_seedFile", sb.getConfig("seedFilePath", ""));
}
prop.put(
- "seedServer_lastUpload",
- PeerActions.formatInterval(System.currentTimeMillis() - sb.peers.lastSeedUpload_timeStamp));
+ "seedServer_lastUpload",
+ PeerActions.formatInterval(System.currentTimeMillis() - sb.peers.lastSeedUpload_timeStamp));
} else {
prop.put(SEEDSERVER, "0"); // disabled
}
@@ -347,18 +347,18 @@ public class Status
prop.put("loaderQueuePercent", (loaderPercent > 100) ? 100 : loaderPercent);
prop.putNum("localCrawlQueueSize", sb
- .getThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL)
- .getJobCount());
+ .getThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL)
+ .getJobCount());
prop.put("localCrawlPaused", sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL)
- ? "1"
- : "0");
+ ? "1"
+ : "0");
prop.putNum(
- "remoteTriggeredCrawlQueueSize",
- sb.getThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL) != null ? sb.getThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount() : 0);
+ "remoteTriggeredCrawlQueueSize",
+ sb.getThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL) != null ? sb.getThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount() : 0);
prop.put(
- "remoteTriggeredCrawlPaused",
- sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL) ? "1" : "0");
+ "remoteTriggeredCrawlPaused",
+ sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL) ? "1" : "0");
prop.putNum("stackCrawlQueueSize", sb.crawlStacker.size());
diff --git a/source/net/yacy/htroot/api/version.java b/source/net/yacy/htroot/api/version.java
index dd7833db5..04bee4e64 100644
--- a/source/net/yacy/htroot/api/version.java
+++ b/source/net/yacy/htroot/api/version.java
@@ -12,9 +12,12 @@ public class version {
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, @SuppressWarnings("unused") final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
-
- prop.put("versionstring", yacyBuildProperties.getLongVersion());
- prop.put("svnRev", yacyBuildProperties.getSVNRevision());
+ prop.put("versionstring", yacyBuildProperties.getReleaseStub());
+ prop.put("buildDate", yacyBuildProperties.getRepositoryVersionDate());
+ prop.put("buildTime", yacyBuildProperties.getRepositoryVersionTime());
+ prop.put("buildDateTime", yacyBuildProperties.getRepositoryVersionDate() + yacyBuildProperties.getRepositoryVersionTime());
+ prop.put("buildHash", yacyBuildProperties.getRepositoryVersionHash());
+ prop.put("buildVersion", yacyBuildProperties.getVersion());
// return rewrite properties
return prop;
diff --git a/source/net/yacy/kelondro/logging/ThreadDump.java b/source/net/yacy/kelondro/logging/ThreadDump.java
index 9f1f24eaa..6233e0b21 100644
--- a/source/net/yacy/kelondro/logging/ThreadDump.java
+++ b/source/net/yacy/kelondro/logging/ThreadDump.java
@@ -57,8 +57,8 @@ public class ThreadDump extends HashMap> imp
private static final Pattern multiDumpFilterPattern = Pattern.compile(multiDumpFilter);
public static class StackTrace {
- private String text;
- private Thread.State state;
+ private final String text;
+ private final Thread.State state;
public StackTrace(final String text, final Thread.State state) {
this.state = state;
this.text = text;
@@ -81,7 +81,7 @@ public class ThreadDump extends HashMap> imp
}
public static class Lock {
- private String id;
+ private final String id;
public Lock(final String name) {
this.id = name;
}
@@ -122,7 +122,7 @@ public class ThreadDump extends HashMap> imp
/**
* Try to get the thread dump from a yacy.log file which is available when YaCy is started with
- * startYACY.sh -l
+ * startYACY.sh -l
* @param logFile the log file to read
* @throws IOException when a read/write error occurred
*/
@@ -145,10 +145,10 @@ public class ThreadDump extends HashMap> imp
if (sizeAfter <= sizeBefore) return;
try(final RandomAccessFile raf = new RandomAccessFile(logFile, "r");) {
- raf.seek(sizeBefore);
- final byte[] b = new byte[(int) (sizeAfter - sizeBefore)];
- raf.readFully(b);
-
+ raf.seek(sizeBefore);
+ final byte[] b = new byte[(int) (sizeAfter - sizeBefore)];
+ raf.readFully(b);
+
// import the thread dump;
importText(new ByteArrayInputStream(b));
}
@@ -179,7 +179,7 @@ public class ThreadDump extends HashMap> imp
String line;
String thread = null;
int p;
- List list = new ArrayList();
+ List list = new ArrayList<>();
Thread.State state = null;
Thread.State state0;
while ((line = br.readLine()) != null) {
@@ -189,7 +189,7 @@ public class ThreadDump extends HashMap> imp
if (thread != null) {
put(new ThreadDump.StackTrace(thread, state), list);
}
- list = new ArrayList();
+ list = new ArrayList<>();
thread = null;
state = null;
continue;
@@ -262,7 +262,7 @@ public class ThreadDump extends HashMap> imp
final String threaddump = sb.toString();
@SuppressWarnings("unlikely-arg-type")
List threads = get(threaddump);
- if (threads == null) threads = new ArrayList();
+ if (threads == null) threads = new ArrayList<>();
Thread.State state = null;
for (final String t: threads) {
final int p = t.indexOf(statestatement);
@@ -303,8 +303,8 @@ public class ThreadDump extends HashMap> imp
for (int i = size() + 10; i > 0; i--) {
for (final Map.Entry entry: locks.entrySet()) {
if (entry.getValue().intValue() == i) {
- bufferappend(buffer, plain, "holds lock for " + i + " threads:");
- final List list = get(entry.getKey());
+ bufferappend(buffer, plain, "holds lock for " + i + " threads:");
+ final List list = get(entry.getKey());
if (list == null) continue;
bufferappend(buffer, plain, "Thread= " + entry.getKey());
for (final String s: list) bufferappend(buffer, plain, " " + (plain ? s : s.replaceAll("<", "<").replaceAll(">", ">")));
@@ -323,7 +323,7 @@ public class ThreadDump extends HashMap> imp
final boolean plain) {
// collect single dumps
- final Map dumps = new HashMap();
+ final Map dumps = new HashMap<>();
ThreadDump x;
for (final Map trace: stackTraces) {
x = new ThreadDump(rootPath, trace, plain, Thread.State.RUNNABLE);
@@ -384,7 +384,7 @@ public class ThreadDump extends HashMap> imp
public List>> freerun() {
- final List>> runner = new ArrayList>>();
+ final List>> runner = new ArrayList<>();
runf: for (final Map.Entry> entry: entrySet()) {
// check if the thread is locked or holds a lock
if (entry.getKey().state != Thread.State.RUNNABLE) continue runf;
@@ -402,7 +402,7 @@ public class ThreadDump extends HashMap> imp
*/
public Map locks() {
int p;
- final Map locks = new HashMap();
+ final Map locks = new HashMap<>();
for (final Map.Entry> entry: entrySet()) {
for (final String s: entry.getValue()) {
if ((p = s.indexOf("locked <",0)) > 0) {
@@ -433,7 +433,7 @@ public class ThreadDump extends HashMap> imp
public Map countLocks() {
final Map locks = locks();
- final Map count = new HashMap();
+ final Map count = new HashMap<>();
for (final Map.Entry entry: locks.entrySet()) {
// look where the lock has an effect
int c = 0;
@@ -461,8 +461,8 @@ public class ThreadDump extends HashMap> imp
if (sleep > 0) try {Thread.sleep(sleep);} catch (final InterruptedException e) {}
// Thread dump
final Date dt = new Date();
- final String versionstring = yacyBuildProperties.getVersion() + "/" + yacyBuildProperties.getSVNRevision();
- Runtime runtime = Runtime.getRuntime();
+ final String versionstring = yacyBuildProperties.getReleaseStub();
+ final Runtime runtime = Runtime.getRuntime();
ThreadDump.bufferappend(buffer, plain, "************* Start Thread Dump " + dt + " *******************");
ThreadDump.bufferappend(buffer, plain, " ");
@@ -473,9 +473,9 @@ public class ThreadDump extends HashMap> imp
ThreadDump.bufferappend(buffer, plain, " ");
ThreadDump.bufferappend(buffer, plain, " ");
- File appPath = sb.getAppPath();
+ final File appPath = sb.getAppPath();
if (multiple) {
- final ArrayList