mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
assert that data is not empty
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ import com.intellij.openapi.util.JDOMUtil
|
||||
import com.intellij.util.ReflectionUtil
|
||||
import org.jdom.Element
|
||||
|
||||
private val LOG = Logger.getInstance("#com.intellij.openapi.components.impl.stores.DefaultStateSerializer")
|
||||
internal val LOG = Logger.getInstance("#com.intellij.configurationStore")
|
||||
|
||||
fun <T> deserializeState(stateElement: Element?, stateClass: Class<T>, mergeInto: T?): T? {
|
||||
@Suppress("DEPRECATION", "UNCHECKED_CAST")
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ class SchemeManagerIprProvider(private val subStateTagName: String) : StreamProv
|
||||
}
|
||||
|
||||
override fun write(fileSpec: String, content: ByteArray, size: Int, roamingType: RoamingType) {
|
||||
val name = PathUtilRt.getFileName(fileSpec)
|
||||
nameToData.put(name, ArrayUtil.realloc(content, size))
|
||||
LOG.assertTrue(content.isNotEmpty())
|
||||
nameToData.put(PathUtilRt.getFileName(fileSpec), ArrayUtil.realloc(content, size))
|
||||
}
|
||||
|
||||
fun load(state: Element?, nameGetter: ((Element) -> String)? = null) {
|
||||
|
||||
Reference in New Issue
Block a user