You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/01/15 11:50:23 UTC
[tomcat] branch master updated: Remove deprecated main method
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 7262215 Remove deprecated main method
7262215 is described below
commit 72622151e442cfe719c422d2bf868a204388f98b
Author: remm <re...@apache.org>
AuthorDate: Wed Jan 15 12:50:10 2020 +0100
Remove deprecated main method
---
.../catalina/ha/deploy/FileMessageFactory.java | 32 ----------------------
1 file changed, 32 deletions(-)
diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
index 88b34f0..218ef0e 100644
--- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
+++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
@@ -342,38 +342,6 @@ public class FileMessageFactory {
}
}
- /**
- * Example usage.
- *
- * @param args
- * String[], args[0] - read from filename, args[1] write to
- * filename
- * @throws Exception An error occurred
- * @deprecated
- */
- @Deprecated
- public static void main(String[] args) throws Exception {
- System.out.println("Usage: FileMessageFactory fileToBeRead fileToBeWritten");
- System.out.println("Usage: This will make a copy of the file on the local file system");
- FileMessageFactory read = getInstance(new File(args[0]), false);
- FileMessageFactory write = getInstance(new File(args[1]), true);
- FileMessage msg = new FileMessage(null, args[0], args[0]);
- msg = read.readMessage(msg);
- if (msg == null) {
- System.out.println("Empty input file : " + args[0]);
- return;
- }
- System.out.println("Expecting to write " + msg.getTotalNrOfMsgs()
- + " messages.");
- int cnt = 0;
- while (msg != null) {
- write.writeMessage(msg);
- cnt++;
- msg = read.readMessage(msg);
- }//while
- System.out.println("Actually wrote " + cnt + " messages.");
- }///main
-
public File getFile() {
return file;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org