Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java-matter-controller] Remove un-used PersistentStorage implementation #23865

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions examples/java-matter-controller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ java_binary("java-matter-controller") {
"java/src/com/matter/controller/commands/pairing/PairingModeType.java",
"java/src/com/matter/controller/commands/pairing/PairingNetworkType.java",
"java/src/com/matter/controller/commands/pairing/UnpairCommand.java",
"java/src/com/matter/controller/config/PersistentStorage.java",
"java/src/com/matter/controller/config/PersistentStorageOpCertStore.java",
"java/src/com/matter/controller/config/PersistentStorageOperationalKeystore.java",
]

javac_flags = [ "-Xlint:deprecation" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,12 @@
package com.matter.controller.commands.common;

import chip.devicecontroller.ChipDeviceController;
import com.matter.controller.config.PersistentStorage;
import com.matter.controller.config.PersistentStorageOpCertStore;
import com.matter.controller.config.PersistentStorageOperationalKeystore;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;

public abstract class MatterCommand extends Command {
private final ChipDeviceController mChipDeviceController;
private final PersistentStorage mDefaultStorage = new PersistentStorage();
private final PersistentStorage mCommissionerStorage = new PersistentStorage();
private final PersistentStorageOperationalKeystore mOperationalKeystore =
new PersistentStorageOperationalKeystore();
private final PersistentStorageOpCertStore mOpCertStore = new PersistentStorageOpCertStore();

private final Optional<CredentialsIssuer> mCredIssuerCmds;
private final StringBuffer mCommissionerName = new StringBuffer();
private final StringBuffer mPaaTrustStorePath = new StringBuffer();
Expand Down Expand Up @@ -104,24 +95,11 @@ public ChipDeviceController currentCommissioner() {
/////////// Command Interface /////////
@Override
public void run() throws Exception {
// TODO: setup chip storage from Java, currently it is using example one from chip-tool
// maybeSetUpStack();
runCommand();
// maybeTearDownStack();
}

protected abstract void runCommand();

private void maybeSetUpStack() throws Exception {
mDefaultStorage.init();
mOperationalKeystore.init(mDefaultStorage);
mOpCertStore.init(mDefaultStorage);
}

private void maybeTearDownStack() {
// ToDo:We need to call DeviceController::Shutdown()
}

public void setTestResult(String result) {
mTestResult = Optional.of(result);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.