remove findbug
This commit is contained in:
parent
68588e6f7d
commit
7506c7e2ab
6 changed files with 16 additions and 22 deletions
|
@ -216,9 +216,6 @@ android {
|
||||||
|
|
||||||
useLibrary "org.apache.http.legacy"
|
useLibrary "org.apache.http.legacy"
|
||||||
|
|
||||||
configurations.all {
|
|
||||||
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
@ -257,7 +254,6 @@ dependencies {
|
||||||
testImplementation "joda-time:joda-time:$jodatime_version"
|
testImplementation "joda-time:joda-time:$jodatime_version"
|
||||||
testImplementation('com.google.truth:truth:1.1.2') {
|
testImplementation('com.google.truth:truth:1.1.2') {
|
||||||
exclude group: "com.google.guava", module: "guava"
|
exclude group: "com.google.guava", module: "guava"
|
||||||
exclude group: "com.google.code.findbugs", module: "jsr305"
|
|
||||||
}
|
}
|
||||||
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
||||||
testImplementation "org.hamcrest:hamcrest-all:1.3"
|
testImplementation "org.hamcrest:hamcrest-all:1.3"
|
||||||
|
@ -265,7 +261,6 @@ dependencies {
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
|
||||||
androidTestImplementation "androidx.test.ext:junit:$androidx_junit"
|
androidTestImplementation "androidx.test.ext:junit:$androidx_junit"
|
||||||
androidTestImplementation "androidx.test:rules:$androidx_rules"
|
androidTestImplementation "androidx.test:rules:$androidx_rules"
|
||||||
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.2'
|
|
||||||
|
|
||||||
/* Dagger2 - We are going to use dagger.android which includes
|
/* Dagger2 - We are going to use dagger.android which includes
|
||||||
* support for Activity and fragment injection so we need to include
|
* support for Activity and fragment injection so we need to include
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.aps.openAPSAMA;
|
package info.nightscout.androidaps.plugins.aps.openAPSAMA;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -16,7 +18,6 @@ import java.io.IOException;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.general.openhumans.OpenHumansUploader;
|
import info.nightscout.androidaps.plugins.general.openhumans.OpenHumansUploader;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.aps.openAPSSMB;
|
package info.nightscout.androidaps.plugins.aps.openAPSSMB;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
@ -16,7 +18,6 @@ import java.io.IOException;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import dagger.android.HasAndroidInjector;
|
import dagger.android.HasAndroidInjector;
|
||||||
|
|
|
@ -104,7 +104,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
|
||||||
`when`(SmsManager.getDefault()).thenReturn(smsManager)
|
`when`(SmsManager.getDefault()).thenReturn(smsManager)
|
||||||
`when`(sp.getString(R.string.key_smscommunicator_allowednumbers, "")).thenReturn("1234;5678")
|
`when`(sp.getString(R.string.key_smscommunicator_allowednumbers, "")).thenReturn("1234;5678")
|
||||||
|
|
||||||
smsCommunicatorPlugin = SmsCommunicatorPlugin(injector, aapsLogger, resourceHelper, aapsSchedulers, sp, constraintChecker, rxBus, profileFunction, fabricPrivacy, activePlugin, commandQueue, loopPlugin, iobCobCalculatorPlugin, xdripCalibrations, otp, Config(), DateUtil(context, resourceHelper))
|
smsCommunicatorPlugin = SmsCommunicatorPlugin(injector, aapsLogger, resourceHelper, aapsSchedulers, sp, constraintChecker, rxBus, profileFunction, fabricPrivacy, activePlugin, commandQueue, loopPlugin, iobCobCalculatorPlugin, xdripCalibrations, otp, Config(), DateUtil(context))
|
||||||
smsCommunicatorPlugin.setPluginEnabled(PluginType.GENERAL, true)
|
smsCommunicatorPlugin.setPluginEnabled(PluginType.GENERAL, true)
|
||||||
Mockito.doAnswer { invocation: InvocationOnMock ->
|
Mockito.doAnswer { invocation: InvocationOnMock ->
|
||||||
val callback = invocation.getArgument<Callback>(1)
|
val callback = invocation.getArgument<Callback>(1)
|
||||||
|
|
|
@ -48,22 +48,22 @@ class DateUtilTest : TestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun timeStringTest() {
|
@Test fun timeStringTest() {
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).timeString(Date(1513902750000L)).contains("32"))
|
Assert.assertTrue(DateUtil(context).timeString(Date(1513902750000L)).contains("32"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).timeString(1513902750000L).contains("32"))
|
Assert.assertTrue(DateUtil(context).timeString(1513902750000L).contains("32"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun dateAndTimeStringTest() {
|
@Test fun dateAndTimeStringTest() {
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(1513902750000L).contains("22"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeString(1513902750000L).contains("22"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(1513902750000L).contains("32"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeString(1513902750000L).contains("32"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(Date(1513902750000L)).contains("22"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeString(Date(1513902750000L)).contains("22"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeString(Date(1513902750000L)).contains("32"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeString(Date(1513902750000L)).contains("32"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun dateAndTimeRangeStringTest() {
|
@Test fun dateAndTimeRangeStringTest() {
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("22"))
|
||||||
Assert.assertTrue(DateUtil(context, resourceHelper).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32"))
|
Assert.assertTrue(DateUtil(context).dateAndTimeRangeString(1513902750000L, 1513902750000L).contains("32"))
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -98,10 +98,7 @@ dependencies {
|
||||||
exclude group: "org.json", module: "json"
|
exclude group: "org.json", module: "json"
|
||||||
}
|
}
|
||||||
|
|
||||||
api('com.google.guava:guava:30.0-jre') {
|
api 'com.google.guava:guava:30.0-jre'
|
||||||
exclude group: "com.google.code.findbugs", module: "jsr305"
|
|
||||||
}
|
|
||||||
api 'com.google.code.findbugs:jsr305:3.0.2'
|
|
||||||
|
|
||||||
api 'org.mozilla:rhino:1.7.13'
|
api 'org.mozilla:rhino:1.7.13'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue