diff --git a/convex-benchmarks/pom.xml b/convex-benchmarks/pom.xml
index 677b8e78b..50bc9b7f8 100644
--- a/convex-benchmarks/pom.xml
+++ b/convex-benchmarks/pom.xml
@@ -4,7 +4,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
4.0.0
diff --git a/convex-cli/pom.xml b/convex-cli/pom.xml
index 51171f128..781438381 100644
--- a/convex-cli/pom.xml
+++ b/convex-cli/pom.xml
@@ -2,7 +2,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
4.0.0
diff --git a/convex-cli/src/main/java/convex/cli/Main.java b/convex-cli/src/main/java/convex/cli/Main.java
index 075c4b621..2a8ceef61 100644
--- a/convex-cli/src/main/java/convex/cli/Main.java
+++ b/convex-cli/src/main/java/convex/cli/Main.java
@@ -107,16 +107,6 @@ public class Main extends ACommand {
description = "Specify verbosity level. Use -v0 to suppress user output. Default: ${DEFAULT-VALUE}")
private Integer verbose;
- @Option(names = { "-V", "--version" },
- versionHelp = true,
- description = "Display version info")
- boolean versionInfoRequested;
-
- @Option(names = { "-h", "--help" },
- usageHelp = true,
- description = "Display help for this command")
- boolean usageHelpRequested;
-
public Main() {
commandLine = commandLine.setExecutionExceptionHandler(new Main.ExceptionHandler());
}
@@ -257,13 +247,13 @@ public char[] getStorePassword() {
/**
* Keys the password for the current key
*
- * @return
+ * @return password
*/
public char[] getKeyPassword() {
char[] keypass = null;
- if (this.keystorePassword != null) {
- keypass = this.keystorePassword.toCharArray();
+ if (this.keyPassword != null) {
+ keypass = this.keyPassword.toCharArray();
} else {
if (!nonInteractive) {
keypass = readPassword("Private Key Encryption Password: ");
@@ -274,7 +264,7 @@ public char[] getKeyPassword() {
keypass = new char[0];
}
- this.keystorePassword=new String(keypass);
+ this.keyPassword=new String(keypass);
}
if (keypass.length == 0) {
paranoia("Cannot use an empty private key password");
@@ -312,7 +302,6 @@ public KeyStore getKeystore() {
/**
* Loads the currently configured key Store
*
- * @param isCreate Flag to indicate if keystore should be created if absent
* @return KeyStore instance, or null if does not exist
*/
public KeyStore loadKeyStore() {
@@ -381,11 +370,11 @@ public AKeyPair loadKeyFromStore(String publicKey) {
String alias = aliases.nextElement();
if (alias.indexOf(publicKey) == 0) {
log.trace("found keypair " + alias);
- keyPair = PFXTools.getKeyPair(keyStore, alias, storePassword);
+ keyPair = PFXTools.getKeyPair(keyStore, alias, getKeyPassword());
break;
}
}
- } catch (Throwable t) {
+ } catch (Exception t) {
throw new CLIError("Cannot load key store", t);
}
diff --git a/convex-cli/src/test/java/convex/cli/key/KeyExportTest.java b/convex-cli/src/test/java/convex/cli/key/KeyExportTest.java
index e0ecfaaf7..d9273fe29 100644
--- a/convex-cli/src/test/java/convex/cli/key/KeyExportTest.java
+++ b/convex-cli/src/test/java/convex/cli/key/KeyExportTest.java
@@ -69,6 +69,7 @@ public void testKeyGenerateAndExport() {
"--export-password", new String(EXPORT_PASSWORD)
);
String s=tester.getOutput();
+ assertEquals("",tester.getError());
assertEquals(ExitCodes.SUCCESS,tester.getResult());
AKeyPair kp=AKeyPair.create(PEMTools.decryptPrivateKeyFromPEM(s, EXPORT_PASSWORD));
assertEquals(ak,kp.getAccountKey());
diff --git a/convex-cli/src/test/java/convex/cli/key/KeyImportTest.java b/convex-cli/src/test/java/convex/cli/key/KeyImportTest.java
index 36e6f6c48..8afbe1aac 100644
--- a/convex-cli/src/test/java/convex/cli/key/KeyImportTest.java
+++ b/convex-cli/src/test/java/convex/cli/key/KeyImportTest.java
@@ -20,6 +20,8 @@ public class KeyImportTest {
private static final char[] KEYSTORE_PASSWORD = "testPassword".toCharArray();
private static final char[] IMPORT_PASSWORD = "testImportPassword".toCharArray();
+ private static final String KEY_PASSWORD="testPass";
+
private static final File KEYSTORE_FILE;
private static final String KEYSTORE_FILENAME;
static {
@@ -68,7 +70,8 @@ public void testKeyImportSeed() {
"--keystore-password", new String(KEYSTORE_PASSWORD),
"--keystore", KEYSTORE_FILENAME,
"--text", keyPair.getSeed().toString(),
- "--import-password", new String("")
+ "--password", KEY_PASSWORD,
+ "--import-password", new String("") // BIP39 password
);
assertEquals(ExitCodes.SUCCESS,tester.getResult());
@@ -77,6 +80,7 @@ public void testKeyImportSeed() {
CLTester t2=CLTester.run(
"key" ,
"list",
+ "--password",KEY_PASSWORD,
"--keystore-password", new String(KEYSTORE_PASSWORD),
"--keystore", KEYSTORE_FILENAME);
@@ -97,6 +101,7 @@ public void testKeyImportBIP39() {
"bip39",
"--keystore-password", new String(KEYSTORE_PASSWORD),
"--keystore", KEYSTORE_FILENAME,
+ "--password",KEY_PASSWORD,
"--text", "elder mail trick garage hour enjoy attack fringe problem motion poem security caught false penalty",
"--import-password", new String("")
);
@@ -107,6 +112,7 @@ public void testKeyImportBIP39() {
CLTester t2=CLTester.run(
"key" ,
"list",
+ "--password",KEY_PASSWORD,
"--keystore-password", new String(KEYSTORE_PASSWORD),
"--keystore", KEYSTORE_FILENAME);
diff --git a/convex-core/pom.xml b/convex-core/pom.xml
index f59fdb93c..2aa365514 100644
--- a/convex-core/pom.xml
+++ b/convex-core/pom.xml
@@ -4,7 +4,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
diff --git a/convex-core/src/main/java/convex/core/crypto/PEMTools.java b/convex-core/src/main/java/convex/core/crypto/PEMTools.java
index 7fc3642da..c8a1b56b2 100644
--- a/convex-core/src/main/java/convex/core/crypto/PEMTools.java
+++ b/convex-core/src/main/java/convex/core/crypto/PEMTools.java
@@ -114,10 +114,9 @@ public static String encryptPrivateKeyToPEM(PrivateKey privateKey, char[] passwo
public static PrivateKey decryptPrivateKeyFromPEM(String pemText, char[] password) throws Error {
PrivateKey privateKey = null;
StringReader stringReader = new StringReader(pemText);
- PEMParser pemParser = new PEMParser(stringReader);
PemObject pemObject = null;
JcaPEMKeyConverter converter = new JcaPEMKeyConverter();
- try {
+ try (PEMParser pemParser = new PEMParser(stringReader)) {
pemObject = pemParser.readPemObject();
while (pemObject != null) {
if (pemObject.getType().equals("ENCRYPTED PRIVATE KEY")) {
diff --git a/convex-gui/pom.xml b/convex-gui/pom.xml
index 738f9b400..ccddf6987 100644
--- a/convex-gui/pom.xml
+++ b/convex-gui/pom.xml
@@ -4,7 +4,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
4.0.0
diff --git a/convex-gui/src/main/java/convex/gui/client/ConvexClient.java b/convex-gui/src/main/java/convex/gui/client/ConvexClient.java
index 9948f6e61..a83038e74 100644
--- a/convex-gui/src/main/java/convex/gui/client/ConvexClient.java
+++ b/convex-gui/src/main/java/convex/gui/client/ConvexClient.java
@@ -36,8 +36,8 @@ public class ConvexClient extends AbstractGUI {
/**
* Launch the application.
* @param args Command line argument
- * @throws TimeoutException
- * @throws IOException
+ * @throws TimeoutException In case of timeout
+ * @throws IOException In case of connection error
*/
public static void main(String[] args) throws IOException, TimeoutException {
log.info("Starting Convex Client");
diff --git a/convex-gui/src/main/java/convex/gui/peer/PeerGUI.java b/convex-gui/src/main/java/convex/gui/peer/PeerGUI.java
index c6f796a16..ec2b4c435 100644
--- a/convex-gui/src/main/java/convex/gui/peer/PeerGUI.java
+++ b/convex-gui/src/main/java/convex/gui/peer/PeerGUI.java
@@ -138,7 +138,7 @@ public void windowClosing(WindowEvent winEvt) {
/**
* Create the application.
* @param genesis Genesis key pair
- * @param peerNum Number of peers to initialise in genesis
+ * @param peerCount number of peers to initialise in genesis
*/
public PeerGUI(int peerCount, AKeyPair genesis) {
super ("Peer Manager");
diff --git a/convex-gui/src/main/java/convex/gui/tools/HackerTools.java b/convex-gui/src/main/java/convex/gui/tools/HackerTools.java
index ffb9401c0..07dc8b0f1 100644
--- a/convex-gui/src/main/java/convex/gui/tools/HackerTools.java
+++ b/convex-gui/src/main/java/convex/gui/tools/HackerTools.java
@@ -3,7 +3,6 @@
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;
-import java.io.IOException;
import java.util.concurrent.TimeoutException;
import javax.swing.JFrame;
@@ -37,10 +36,9 @@ public class HackerTools extends AbstractGUI {
/**
* Launch the application.
* @param args Command line argument
- * @throws TimeoutException
- * @throws IOException
+ * @throws TimeoutException In case of timeout
*/
- public static void main(String[] args) throws IOException, TimeoutException {
+ public static void main(String[] args) throws TimeoutException {
log.info("Running Convex HackerTools");
clientMode=true;
@@ -61,7 +59,6 @@ public static void main(String[] args) throws IOException, TimeoutException {
/**
* Create the application.
- * @param convex Convex client instance
*/
public HackerTools() {
super ("Hacker Tools");
diff --git a/convex-gui/src/main/java/convex/gui/utils/Toolkit.java b/convex-gui/src/main/java/convex/gui/utils/Toolkit.java
index 40db9d8ff..ee0981077 100644
--- a/convex-gui/src/main/java/convex/gui/utils/Toolkit.java
+++ b/convex-gui/src/main/java/convex/gui/utils/Toolkit.java
@@ -256,7 +256,7 @@ public static void showMainFrame(JComponent comp) {
/**
* Relinquish focus from a component
- * @param c
+ * @param c Component to remove focus from
*/
public static void relinquishFocus(Component c) {
if (c.isFocusable()) {
@@ -290,7 +290,7 @@ public void actionPerformed(ActionEvent e) {
/**
* Adds a popup menu to a component, including necessary mouse listeners
- * @param jPopupMenu
+ * @param popupMenu Op up menu component
*/
public static void addPopupMenu(JComponent comp,javax.swing.JPopupMenu popupMenu) {
comp.addMouseListener(new MouseAdapter () {
diff --git a/convex-gui/src/main/java/convex/gui/wallet/WalletApp.java b/convex-gui/src/main/java/convex/gui/wallet/WalletApp.java
index 7fca86291..9c331cad0 100644
--- a/convex-gui/src/main/java/convex/gui/wallet/WalletApp.java
+++ b/convex-gui/src/main/java/convex/gui/wallet/WalletApp.java
@@ -91,7 +91,7 @@ public String getTitle() {
/**
* Launch the application.
* @param args Command line args
- * @throws InterruptedException
+ * @throws InterruptedException In case of interrupt
*/
public static void main(String[] args) throws InterruptedException {
// call to set up Look and Feel
diff --git a/convex-java/pom.xml b/convex-java/pom.xml
index 4d0d96217..1a12d245d 100644
--- a/convex-java/pom.xml
+++ b/convex-java/pom.xml
@@ -5,7 +5,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
Convex Java Client Library
diff --git a/convex-observer/.gitignore b/convex-observer/.gitignore
new file mode 100644
index 000000000..a17686e78
--- /dev/null
+++ b/convex-observer/.gitignore
@@ -0,0 +1 @@
+/pom.xml.versionsBackup
diff --git a/convex-observer/pom.xml b/convex-observer/pom.xml
index 705981408..8788d2ca6 100644
--- a/convex-observer/pom.xml
+++ b/convex-observer/pom.xml
@@ -8,7 +8,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
Convex Observer
@@ -49,7 +49,7 @@
world.convex
convex-java
- 0.7.13
+ 0.7.14-SNAPSHOT
\ No newline at end of file
diff --git a/convex-peer/pom.xml b/convex-peer/pom.xml
index 696286b56..2ce420238 100644
--- a/convex-peer/pom.xml
+++ b/convex-peer/pom.xml
@@ -4,7 +4,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
4.0.0
diff --git a/convex-peer/src/main/java/convex/api/Convex.java b/convex-peer/src/main/java/convex/api/Convex.java
index 3a4ff04fd..2acca41f3 100644
--- a/convex-peer/src/main/java/convex/api/Convex.java
+++ b/convex-peer/src/main/java/convex/api/Convex.java
@@ -223,7 +223,7 @@ public void setNextSequence(long nextSequence) {
/**
* Sets a handler for messages that are received but not otherwise processed (transaction/query results will
* be relayed instead to the appropriate handler )
- * @param handler
+ * @param handler Handler for received messaged
*/
public void setHandler(Consumer handler) {
this.delegatedHandler = handler;
@@ -237,8 +237,8 @@ public void setHandler(Consumer handler) {
* The next valid sequence number will be one higher than the result.
*
* @return Sequence number as a Long value (zero or positive)
- * @throws TimeoutException
- * @throws IOException
+ * @throws IOException If an IO error occurs
+ * @throws TimeoutException If the request times out
*/
public long getSequence() throws IOException, TimeoutException {
if (sequence == null) {
@@ -265,10 +265,10 @@ public long getSequence(Address addr) throws TimeoutException, IOException {
/**
* Look up the sequence number for an account
- * @param origin
- * @return
- * @throws TimeoutException
- * @throws IOException
+ * @param origin Account for which to check sequence
+ * @return Sequence number of account
+ * @throws TimeoutException if query times out
+ * @throws IOException in case of IO error
*/
public long lookupSequence(Address origin) throws IOException, TimeoutException {
AOp code= Special.forSymbol(Symbols.STAR_SEQUENCE);
@@ -377,7 +377,7 @@ private synchronized long getNextSequence(ATransaction t) throws IOException, Ti
* @param transaction Transaction to execute
* @return A Future for the result of the transaction
* @throws IOException If an IO Exception occurs (most likely the connection is broken)
- * @throws TimeoutException
+ * @throws TimeoutException In case of timeout
*/
public final synchronized CompletableFuture transact(ATransaction transaction) throws IOException, TimeoutException {
SignedData signed = prepareTransaction(transaction);
@@ -394,14 +394,13 @@ public final synchronized CompletableFuture transact(ATransaction transa
* @param transaction Transaction to prepare
* @return Signed transaction ready to submit
* @throws IOException If an IO Exception occurs (most likely the connection is broken)
- * @throws TimeoutException
+ * @throws TimeoutException In case of timeout
*/
public SignedData prepareTransaction(ATransaction transaction) throws TimeoutException, IOException {
Address origin=transaction.getOrigin();
if (origin == null) {
origin=address;
transaction = transaction.withOrigin(origin);
-
}
final long originalSeq=transaction.getSequence(); // zero or negative means autosequence
@@ -451,7 +450,7 @@ public SignedData prepareTransaction(ATransaction transaction) thr
* @param code Code to execute
* @return A Future for the result of the transaction
* @throws IOException If the connection is broken, or the send buffer is full
- * @throws TimeoutException
+ * @throws TimeoutException In case of timeout
*/
public synchronized CompletableFuture transact(String code) throws IOException, TimeoutException {
return transact((ACell)Reader.read(code));
@@ -463,7 +462,7 @@ public synchronized CompletableFuture transact(String code) throws IOExc
* @param code Code to execute
* @return A Future for the result of the transaction
* @throws IOException If the connection is broken, or the send buffer is full
- * @throws TimeoutException
+ * @throws TimeoutException In case of timeout
*/
public synchronized CompletableFuture transact(ACell code) throws IOException, TimeoutException {
ATransaction trans = Invoke.create(getAddress(), ATransaction.UNKNOWN_SEQUENCE, code);
@@ -515,7 +514,7 @@ public synchronized Result transactSync(String code) throws IOException, Timeout
* @param amount Amount of Convex Coins to transfer
* @return A Future for the result of the transaction
* @throws IOException If the connection is broken, or the send buffer is full
- * @throws TimeoutException
+ * @throws TimeoutException In case of timeout
*/
public CompletableFuture transfer(Address target, long amount) throws IOException, TimeoutException {
ATransaction trans = Transfer.create(getAddress(), ATransaction.UNKNOWN_SEQUENCE, target, amount);
diff --git a/convex-peer/src/main/java/convex/net/NIOServer.java b/convex-peer/src/main/java/convex/net/NIOServer.java
index f95e37994..9b7f663c1 100644
--- a/convex-peer/src/main/java/convex/net/NIOServer.java
+++ b/convex-peer/src/main/java/convex/net/NIOServer.java
@@ -72,7 +72,7 @@ public static NIOServer create(Server server) {
*
* @param bindAddress Address to bind to, or null to bind to all addresses (unspecified)
* @param port Port to use. If 0 or null, a default port will be used, with fallback to a random port
- * @throws IOException
+ * @throws IOException in case of IO problem
*/
public void launch(String bindAddress, Integer port) throws IOException {
if (port == null) {
diff --git a/convex-peer/src/main/java/convex/peer/ConnectionManager.java b/convex-peer/src/main/java/convex/peer/ConnectionManager.java
index 4dce8d5d4..09687f24b 100644
--- a/convex-peer/src/main/java/convex/peer/ConnectionManager.java
+++ b/convex-peer/src/main/java/convex/peer/ConnectionManager.java
@@ -653,11 +653,11 @@ public void alertBadMessage(Message m, String reason) {
/**
* Called to signal missing data in a Belief / Order
- * @param m
- * @param e
- * @param key
+ * @param m Message which caused alert
+ * @param e Missing data exception encountered
+ * @param peerKey Peer key which triggered missing data
*/
- public void alertMissing(Message m, MissingDataException e, AccountKey key) {
+ public void alertMissing(Message m, MissingDataException e, AccountKey peerKey) {
if (log.isDebugEnabled()) {
String message= "Missing data "+e.getMissingHash();
log.debug(message);
diff --git a/convex-peer/src/main/java/convex/peer/Server.java b/convex-peer/src/main/java/convex/peer/Server.java
index 6fa452cd6..4b19a028e 100644
--- a/convex-peer/src/main/java/convex/peer/Server.java
+++ b/convex-peer/src/main/java/convex/peer/Server.java
@@ -780,7 +780,7 @@ public void setHostname(String string) {
/**
* Checks is the server is Live, i.e. currently syncing successfully with network
- * @return
+ * @return True if live, false otherwise
*/
public boolean isLive() {
return isLive;
@@ -788,7 +788,7 @@ public boolean isLive() {
/**
* Checks if the Server threads are running
- * @return
+ * @return True if running, false otherwise
*/
public boolean isRunning() {
return isRunning;
diff --git a/convex-restapi/pom.xml b/convex-restapi/pom.xml
index 3e1a9c76b..18413fd63 100644
--- a/convex-restapi/pom.xml
+++ b/convex-restapi/pom.xml
@@ -4,7 +4,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
4.0.0
@@ -16,7 +16,7 @@
1.1.1
- 6.1.3
+ 6.1.6
diff --git a/convex-sodium/pom.xml b/convex-sodium/pom.xml
index acc929c71..9ac6dbe33 100644
--- a/convex-sodium/pom.xml
+++ b/convex-sodium/pom.xml
@@ -3,7 +3,7 @@
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
convex-sodium
Sodium integration for Convex
diff --git a/pom.xml b/pom.xml
index 54a858e80..1764d5063 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
world.convex
convex
- 0.7.13
+ 0.7.14-SNAPSHOT
pom
Convex Parent