Skip to content

Commit 9a2dec8

Browse files
committed
Some random changes.
1 parent 6849903 commit 9a2dec8

5 files changed

Lines changed: 6 additions & 175 deletions

File tree

client-java/controller/src/main/java/org/evomaster/client/java/controller/mongo/utils/BsonHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public static Object getValue(Object document, String fieldName) {
3131
}
3232
}
3333

34+
@SuppressWarnings("unchecked")
3435
public static Set<String> keySet(Object document) {
3536
try {
3637
return (Set<String>) document.getClass().getMethod("keySet").invoke(document);
@@ -47,6 +48,7 @@ public static Boolean documentContainsField(Object document, String field) {
4748
}
4849
}
4950

51+
@SuppressWarnings("unchecked")
5052
public static Set<String> documentKeys(Object document) {
5153
try {
5254
return (Set<String>) document.getClass().getMethod("keySet").invoke(document);
@@ -67,7 +69,7 @@ public static String getType(Object bsonType) {
6769
Object bsonTypeClassMap = bsonTypeClassMapClass.getDeclaredConstructor().newInstance();
6870
Method get = bsonTypeClassMapClass.getMethod("get", bsonTypeClass);
6971
Object type = get.invoke(bsonTypeClassMap, bsonType);
70-
return (String) type.getClass().getMethod("getTypeName").invoke(type, null);
72+
return (String) type.getClass().getMethod("getTypeName").invoke(type);
7173
} catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException |
7274
InvocationTargetException e) {
7375
throw new RuntimeException(e);

core/src/main/kotlin/org/evomaster/core/BaseModule.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package org.evomaster.core
33
import com.google.inject.AbstractModule
44
import com.google.inject.Provides
55
import com.google.inject.Singleton
6-
import org.evomaster.core.output.service.PartialOracles
76
import org.evomaster.core.search.service.mutator.genemutation.ArchiveImpactSelector
87
import org.evomaster.core.search.service.*
98
import org.evomaster.core.search.service.monitor.SearchProcessMonitor
@@ -80,9 +79,6 @@ class BaseModule(val args: Array<String>, val noTests: Boolean = false) : Abstra
8079
bind(MutationWeightControl::class.java)
8180
.asEagerSingleton()
8281

83-
bind(PartialOracles::class.java)
84-
.asEagerSingleton()
85-
8682
bind(ExecutionInfoReporter::class.java)
8783
.asEagerSingleton()
8884

core/src/main/kotlin/org/evomaster/core/output/service/PartialOracles.kt

Lines changed: 0 additions & 167 deletions
This file was deleted.

core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsStructureMutator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ abstract class ApiWsStructureMutator : StructureMutator() {
258258
}
259259

260260
// Removing the existing action added for RESERVED_RESOLVED_LOCAL_IP
261-
val defaultActions = old.filter { it.hostname == a.hostname && it.localIPAddress == ExternalServiceSharedUtils.RESERVED_RESOLVED_LOCAL_IP };
261+
val defaultActions = old.filter { it.hostname == a.hostname && it.localIPAddress == ExternalServiceSharedUtils.RESERVED_RESOLVED_LOCAL_IP }
262262
if (defaultActions.isNotEmpty()) {
263263
ind.removeHostnameResolutionAction(defaultActions)
264264
}
@@ -369,7 +369,7 @@ abstract class ApiWsStructureMutator : StructureMutator() {
369369
we might remove the condition check on representExistingData.
370370
*/
371371
if (ind.seeSqlDbActions().isEmpty()
372-
|| !ind.seeSqlDbActions().any { it is SqlAction && it.representExistingData }
372+
|| !ind.seeSqlDbActions().any { it.representExistingData }
373373
) {
374374

375375
/*

core/src/main/kotlin/org/evomaster/core/problem/enterprise/EnterpriseIndividual.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ abstract class EnterpriseIndividual(
317317
}
318318

319319
/**
320-
* return a list of all db actions in [this] individual
320+
* return a list of all db actions in this individual
321321
* that include all initializing actions plus db actions among main actions.
322322
*
323323
*/

0 commit comments

Comments
 (0)