-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply kotlin plugin and convert one unused class to kotlin
just to check that everything works and to show how much simpler kotlin code looks.
- Loading branch information
1 parent
26cbfe6
commit 319eee9
Showing
5 changed files
with
48 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 0 additions & 88 deletions
88
p2p/src/test/java/bisq/network/p2p/storage/mocks/MockData.java
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
p2p/src/test/java/bisq/network/p2p/storage/mocks/MockData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.network.p2p.storage.mocks | ||
|
||
import bisq.network.p2p.storage.payload.ExpirablePayload | ||
import bisq.network.p2p.storage.payload.ProtectedStoragePayload | ||
|
||
import org.apache.commons.lang3.NotImplementedException | ||
|
||
import java.security.PublicKey | ||
|
||
data class MockData(val msg: String?, val publicKey: PublicKey) : ProtectedStoragePayload, ExpirablePayload { | ||
var ttl: Long = 0 | ||
override fun getOwnerPubKey(): PublicKey = publicKey | ||
|
||
|
||
override fun getExtraDataMap(): Map<String, String>? = null | ||
|
||
override fun getTTL(): Long = ttl | ||
|
||
override fun toProtoMessage(): protobuf.ProtectedMailboxStorageEntry { | ||
throw NotImplementedException("toProtoMessage not impl.") | ||
} | ||
} |