Skip to content

Commit accc172

Browse files
authored
Merge pull request #507 from cryptomator/refactoring/code-style
Reformatted the project
2 parents 12311bf + 37cfd21 commit accc172

File tree

105 files changed

+519
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+519
-481
lines changed

.idea/codeStyles/Project.xml

Lines changed: 36 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def liteFlavor() {
6363
}
6464

6565
def getApiKeyLocal(key) {
66-
if(!rootProject.file("local.properties").exists()) {
66+
if (!rootProject.file("local.properties").exists()) {
6767
return ""
6868
}
6969
def localPropertyList = new Properties()

buildsystem/dependencies.gradle

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -116,69 +116,69 @@ ext {
116116
jsonWebTokenApiVersion = '0.11.5'
117117

118118
dependencies = [
119-
android : "com.google.android:android:${androidVersion}",
120-
androidAnnotations : "androidx.annotation:annotation:${androidSupportAnnotationsVersion}",
121-
appcompat : "androidx.appcompat:appcompat:${androidSupportAppcompatVersion}",
122-
androidxBiometric : "androidx.biometric:biometric:${androidxBiometricVersion}",
123-
androidxCore : "androidx.core:core-ktx:${androidxCoreVersion}",
124-
androidxFragment : "androidx.fragment:fragment-ktx:${androidxFragmentVersion}",
125-
androidxViewpager : "androidx.viewpager:viewpager:${androidxViewpagerVersion}",
126-
androidxSwiperefresh : "androidx.swiperefreshlayout:swiperefreshlayout:${androidxSwiperefreshVersion}",
127-
androidxPreference : "androidx.preference:preference:${androidxPreferenceVersion}",
128-
documentFile : "androidx.documentfile:documentfile:${androidxDocumentfileVersion}",
129-
recyclerView : "androidx.recyclerview:recyclerview:${androidxRecyclerViewVersion}",
130-
androidxSplashscreen : "androidx.core:core-splashscreen:${androidxSplashscreenVersion}",
131-
androidxTestCore : "androidx.test:core:${androidxTestCoreVersion}",
132-
androidxTestJunitKtln : "androidx.test.ext:junit-ktx:${androidxTestJunitKtlnVersion}",
133-
commonsCodec : "commons-codec:commons-codec:${commonsCodecVersion}",
134-
cryptolib : "org.cryptomator:cryptolib:${cryptolibVersion}",
135-
dagger : "com.google.dagger:dagger:${daggerVersion}",
136-
daggerCompiler : "com.google.dagger:dagger-compiler:${daggerVersion}",
137-
design : "com.google.android.material:material:${androidMaterialDesignVersion}",
138-
coreDesugaring : "com.android.tools:desugar_jdk_libs:${coreDesugaringVersion}",
139-
dropbox : "com.dropbox.core:dropbox-core-sdk:${dropboxVersion}",
140-
espresso : "androidx.test.espresso:espresso-core:${espressoVersion}",
141-
googleApiClientAndroid: "com.google.api-client:google-api-client-android:${googleClientVersion}",
142-
googleApiServicesDrive: "com.google.apis:google-api-services-drive:${googleApiServicesVersion}",
143-
googlePlayServicesAuth: "com.google.android.gms:play-services-auth:${googlePlayServicesVersion}",
119+
android : "com.google.android:android:${androidVersion}",
120+
androidAnnotations : "androidx.annotation:annotation:${androidSupportAnnotationsVersion}",
121+
appcompat : "androidx.appcompat:appcompat:${androidSupportAppcompatVersion}",
122+
androidxBiometric : "androidx.biometric:biometric:${androidxBiometricVersion}",
123+
androidxCore : "androidx.core:core-ktx:${androidxCoreVersion}",
124+
androidxFragment : "androidx.fragment:fragment-ktx:${androidxFragmentVersion}",
125+
androidxViewpager : "androidx.viewpager:viewpager:${androidxViewpagerVersion}",
126+
androidxSwiperefresh : "androidx.swiperefreshlayout:swiperefreshlayout:${androidxSwiperefreshVersion}",
127+
androidxPreference : "androidx.preference:preference:${androidxPreferenceVersion}",
128+
documentFile : "androidx.documentfile:documentfile:${androidxDocumentfileVersion}",
129+
recyclerView : "androidx.recyclerview:recyclerview:${androidxRecyclerViewVersion}",
130+
androidxSplashscreen : "androidx.core:core-splashscreen:${androidxSplashscreenVersion}",
131+
androidxTestCore : "androidx.test:core:${androidxTestCoreVersion}",
132+
androidxTestJunitKtln : "androidx.test.ext:junit-ktx:${androidxTestJunitKtlnVersion}",
133+
commonsCodec : "commons-codec:commons-codec:${commonsCodecVersion}",
134+
cryptolib : "org.cryptomator:cryptolib:${cryptolibVersion}",
135+
dagger : "com.google.dagger:dagger:${daggerVersion}",
136+
daggerCompiler : "com.google.dagger:dagger-compiler:${daggerVersion}",
137+
design : "com.google.android.material:material:${androidMaterialDesignVersion}",
138+
coreDesugaring : "com.android.tools:desugar_jdk_libs:${coreDesugaringVersion}",
139+
dropbox : "com.dropbox.core:dropbox-core-sdk:${dropboxVersion}",
140+
espresso : "androidx.test.espresso:espresso-core:${espressoVersion}",
141+
googleApiClientAndroid : "com.google.api-client:google-api-client-android:${googleClientVersion}",
142+
googleApiServicesDrive : "com.google.apis:google-api-services-drive:${googleApiServicesVersion}",
143+
googlePlayServicesAuth : "com.google.android.gms:play-services-auth:${googlePlayServicesVersion}",
144144
trackingFreeGoogleCLient : files("lib/google-http-client-${trackingFreeGoogleCLientVersion}.jar"),
145145
trackingFreeGoogleAndroidCLient: files("lib/google-http-client-android-${trackingFreeGoogleCLientVersion}.jar"),
146-
greenDao : "org.greenrobot:greendao:${greenDaoVersion}",
147-
gson : "com.google.code.gson:gson:${gsonVersion}",
148-
hamcrest : "org.hamcrest:hamcrest-all:${hamcrestVersion}",
149-
javaxAnnotation : "javax.annotation:jsr250-api:${javaxAnnotationVersion}",
150-
junit : "org.junit.jupiter:junit-jupiter:${jUnitVersion}",
151-
junitApi : "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}",
152-
junitEngine : "org.junit.jupiter:junit-jupiter-engine:${jUnitVersion}",
153-
junitParams : "org.junit.jupiter:junit-jupiter-params:${jUnitVersion}",
154-
junit4Engine : "org.junit.vintage:junit-vintage-engine:${jUnitVersion}",
155-
minIo : "io.minio:minio:${minIoVersion}",
156-
mockito : "org.mockito:mockito-core:${mockitoVersion}",
157-
mockitoInline : "org.mockito:mockito-inline:${mockitoVersion}",
158-
mockitoKotlin : "org.mockito.kotlin:mockito-kotlin:${mockitoKotlinVersion}",
159-
msgraph : "com.microsoft.graph:microsoft-graph:${msgraphVersion}",
160-
msgraphAuth : "com.microsoft.identity.client:msal:${msgraphAuthVersion}",
161-
multidex : "androidx.multidex:multidex:${multidexVersion}",
162-
okHttp : "com.squareup.okhttp3:okhttp:${okHttpVersion}",
163-
okHttpDigest : "io.github.rburgst:okhttp-digest:${okHttpDigestVersion}",
164-
recyclerViewFastScroll: "com.simplecityapps:recyclerview-fastscroll:${recyclerViewFastScrollVersion}",
165-
rxJava : "io.reactivex.rxjava2:rxjava:${rxJavaVersion}",
166-
rxAndroid : "io.reactivex.rxjava2:rxandroid:${rxAndroidVersion}",
167-
rxBinding : "com.jakewharton.rxbinding2:rxbinding:${rxBindingVersion}",
168-
stax : "stax:stax:${staxVersion}",
169-
testingSupportLib : "com.android.support.test:testing-support-lib:${testingSupportLibVersion}",
170-
timber : "com.jakewharton.timber:timber:${timberVersion}",
171-
velocity : "org.apache.velocity:velocity-engine-core:${velocityVersion}",
172-
runner : "androidx.test:runner:${runnerVersion}",
173-
rules : "androidx.test:rules:${rulesVersion}",
174-
contribution : "androidx.test.espresso:espresso-contrib:${contributionVersion}",
175-
uiAutomator : "androidx.test.uiautomator:uiautomator:${uiautomatorVersion}",
176-
zxcvbn : "com.nulab-inc:zxcvbn:${zxcvbnVersion}",
177-
scaleImageView : "com.davemorrissey.labs:subsampling-scale-image-view:${scaleImageViewVersion}",
178-
lruFileCache : "com.github.solkin:disk-lru-cache:${lruFileCacheVersion}",
179-
jsonWebTokenApi : "io.jsonwebtoken:jjwt-api:${jsonWebTokenApiVersion}",
180-
jsonWebTokenImpl : "io.jsonwebtoken:jjwt-impl:${jsonWebTokenApiVersion}",
181-
jsonWebTokenJson : "io.jsonwebtoken:jjwt-orgjson:${jsonWebTokenApiVersion}"
146+
greenDao : "org.greenrobot:greendao:${greenDaoVersion}",
147+
gson : "com.google.code.gson:gson:${gsonVersion}",
148+
hamcrest : "org.hamcrest:hamcrest-all:${hamcrestVersion}",
149+
javaxAnnotation : "javax.annotation:jsr250-api:${javaxAnnotationVersion}",
150+
junit : "org.junit.jupiter:junit-jupiter:${jUnitVersion}",
151+
junitApi : "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}",
152+
junitEngine : "org.junit.jupiter:junit-jupiter-engine:${jUnitVersion}",
153+
junitParams : "org.junit.jupiter:junit-jupiter-params:${jUnitVersion}",
154+
junit4Engine : "org.junit.vintage:junit-vintage-engine:${jUnitVersion}",
155+
minIo : "io.minio:minio:${minIoVersion}",
156+
mockito : "org.mockito:mockito-core:${mockitoVersion}",
157+
mockitoInline : "org.mockito:mockito-inline:${mockitoVersion}",
158+
mockitoKotlin : "org.mockito.kotlin:mockito-kotlin:${mockitoKotlinVersion}",
159+
msgraph : "com.microsoft.graph:microsoft-graph:${msgraphVersion}",
160+
msgraphAuth : "com.microsoft.identity.client:msal:${msgraphAuthVersion}",
161+
multidex : "androidx.multidex:multidex:${multidexVersion}",
162+
okHttp : "com.squareup.okhttp3:okhttp:${okHttpVersion}",
163+
okHttpDigest : "io.github.rburgst:okhttp-digest:${okHttpDigestVersion}",
164+
recyclerViewFastScroll : "com.simplecityapps:recyclerview-fastscroll:${recyclerViewFastScrollVersion}",
165+
rxJava : "io.reactivex.rxjava2:rxjava:${rxJavaVersion}",
166+
rxAndroid : "io.reactivex.rxjava2:rxandroid:${rxAndroidVersion}",
167+
rxBinding : "com.jakewharton.rxbinding2:rxbinding:${rxBindingVersion}",
168+
stax : "stax:stax:${staxVersion}",
169+
testingSupportLib : "com.android.support.test:testing-support-lib:${testingSupportLibVersion}",
170+
timber : "com.jakewharton.timber:timber:${timberVersion}",
171+
velocity : "org.apache.velocity:velocity-engine-core:${velocityVersion}",
172+
runner : "androidx.test:runner:${runnerVersion}",
173+
rules : "androidx.test:rules:${rulesVersion}",
174+
contribution : "androidx.test.espresso:espresso-contrib:${contributionVersion}",
175+
uiAutomator : "androidx.test.uiautomator:uiautomator:${uiautomatorVersion}",
176+
zxcvbn : "com.nulab-inc:zxcvbn:${zxcvbnVersion}",
177+
scaleImageView : "com.davemorrissey.labs:subsampling-scale-image-view:${scaleImageViewVersion}",
178+
lruFileCache : "com.github.solkin:disk-lru-cache:${lruFileCacheVersion}",
179+
jsonWebTokenApi : "io.jsonwebtoken:jjwt-api:${jsonWebTokenApiVersion}",
180+
jsonWebTokenImpl : "io.jsonwebtoken:jjwt-impl:${jsonWebTokenApiVersion}",
181+
jsonWebTokenJson : "io.jsonwebtoken:jjwt-orgjson:${jsonWebTokenApiVersion}"
182182
]
183183

184184
}

data/src/apiKey/java/org/cryptomator/data/cloud/dropbox/DropboxCloudContentRepository.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import java.io.File
2828
import java.io.IOException
2929
import java.io.OutputStream
3030

31-
internal class DropboxCloudContentRepository(private val cloud: DropboxCloud, context: Context) : InterceptingCloudContentRepository<DropboxCloud, DropboxNode, DropboxFolder, DropboxFile>(Intercepted(cloud, context)){
31+
internal class DropboxCloudContentRepository(private val cloud: DropboxCloud, context: Context) : InterceptingCloudContentRepository<DropboxCloud, DropboxNode, DropboxFolder, DropboxFile>(Intercepted(cloud, context)) {
3232

3333
@Throws(BackendException::class)
3434
override fun throwWrappedIfRequired(e: Exception) {
@@ -164,13 +164,12 @@ internal class DropboxCloudContentRepository(private val cloud: DropboxCloud, co
164164
}
165165
}
166166

167-
private fun mapToNoSuchCloudFileExceptionIfMatches(e: Exception, file: DropboxFile) : NoSuchCloudFileException? {
167+
private fun mapToNoSuchCloudFileExceptionIfMatches(e: Exception, file: DropboxFile): NoSuchCloudFileException? {
168168
if (ExceptionUtil.contains(e, GetMetadataErrorException::class.java)) {
169169
if (ExceptionUtil.extract(e, GetMetadataErrorException::class.java).get().errorValue.pathValue.isNotFound) {
170170
return NoSuchCloudFileException(file.name)
171171
}
172-
}
173-
else if (ExceptionUtil.contains(e, DownloadErrorException::class.java)) {
172+
} else if (ExceptionUtil.contains(e, DownloadErrorException::class.java)) {
174173
if (ExceptionUtil.extract(e, DownloadErrorException::class.java).get().errorValue.pathValue.isNotFound) {
175174
return NoSuchCloudFileException(file.name)
176175
}

data/src/apiKey/java/org/cryptomator/data/cloud/dropbox/DropboxCloudContentRepositoryFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.cryptomator.data.cloud.dropbox;
22

3-
import static org.cryptomator.domain.CloudType.DROPBOX;
4-
53
import android.content.Context;
64

75
import org.cryptomator.data.repository.CloudContentRepositoryFactory;
@@ -12,6 +10,8 @@
1210
import javax.inject.Inject;
1311
import javax.inject.Singleton;
1412

13+
import static org.cryptomator.domain.CloudType.DROPBOX;
14+
1515
@Singleton
1616
public class DropboxCloudContentRepositoryFactory implements CloudContentRepositoryFactory {
1717

data/src/apiKey/java/org/cryptomator/data/cloud/onedrive/OnedriveCloudContentRepository.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import java.io.OutputStream
2424
import java.net.SocketTimeoutException
2525
import okhttp3.Request
2626

27-
internal class OnedriveCloudContentRepository(private val cloud: OnedriveCloud, graphServiceClient: GraphServiceClient<Request>, context: Context)
28-
: InterceptingCloudContentRepository<OnedriveCloud, OnedriveNode, OnedriveFolder, OnedriveFile>(Intercepted(cloud, graphServiceClient, context)) {
27+
internal class OnedriveCloudContentRepository(private val cloud: OnedriveCloud, graphServiceClient: GraphServiceClient<Request>, context: Context) :
28+
InterceptingCloudContentRepository<OnedriveCloud, OnedriveNode, OnedriveFolder, OnedriveFile>(Intercepted(cloud, graphServiceClient, context)) {
2929

3030
@Throws(BackendException::class)
3131
override fun throwWrappedIfRequired(e: Exception) {

data/src/apiKey/java/org/cryptomator/data/cloud/onedrive/OnedriveCloudContentRepositoryFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.cryptomator.data.cloud.onedrive;
22

3-
import static org.cryptomator.domain.CloudType.ONEDRIVE;
4-
53
import android.content.Context;
64

75
import org.cryptomator.data.repository.CloudContentRepositoryFactory;
@@ -12,6 +10,8 @@
1210
import javax.inject.Inject;
1311
import javax.inject.Singleton;
1412

13+
import static org.cryptomator.domain.CloudType.ONEDRIVE;
14+
1515
@Singleton
1616
public class OnedriveCloudContentRepositoryFactory implements CloudContentRepositoryFactory {
1717

data/src/apiKey/java/org/cryptomator/data/cloud/onedrive/OnedriveNode.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ interface OnedriveNode : CloudNode {
88
override val name: String
99
override val path: String
1010
override val parent: OnedriveFolder?
11-
11+
1212
}

data/src/apiKey/java/org/cryptomator/data/cloud/pcloud/PCloudApiError.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.cryptomator.data.cloud.pcloud
22

3-
import java.util.HashSet
4-
53
object PCloudApiError {
64

75
@JvmField
@@ -14,6 +12,7 @@ object PCloudApiError {
1412
PCloudApiErrorCodes.INVALID_FILE_OR_FOLDER_NAME.value //
1513
)
1614
)
15+
1716
@JvmField
1817
val ignoreMoveSet = HashSet( //
1918
listOf( //

data/src/apiKey/java/org/cryptomator/data/cloud/pcloud/PCloudContentRepository.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import java.io.File
1919
import java.io.IOException
2020
import java.io.OutputStream
2121

22-
internal class PCloudContentRepository(private val cloud: PCloud, client: ApiClient, context: Context) : InterceptingCloudContentRepository<PCloud, PCloudNode, PCloudFolder, PCloudFile>(Intercepted(cloud, client, context)) {
22+
internal class PCloudContentRepository(private val cloud: PCloud, client: ApiClient, context: Context) :
23+
InterceptingCloudContentRepository<PCloud, PCloudNode, PCloudFolder, PCloudFile>(Intercepted(cloud, client, context)) {
2324

2425
@Throws(BackendException::class)
2526
override fun throwWrappedIfRequired(e: Exception) {

0 commit comments

Comments
 (0)