Singleton instance is "initialized" by delegating constructor call,
which is superclass constructor call in case of singletons (because
singletons can't have more than one constructor).
Singleton constructor is effectively split into two stages:
- before a super constructor call;
- after a super constructor call.
Before super constructor call, singleton instance can't be used directly
(see KT-20662), because neither 'this' nor static instance is
initialized yet. However, it can be used in closures, in which case a
static instance should be used (escaping uninitialized this is
prohibited by JVM). Actually using this static instance before it is
initialized (e.g., invoking a method that uses this singleton) will
cause a correct ExceptionInInitializerError.
After a super constructor call, static instance of a singleton may be
not initialized yet (in case of enum entries and interface companion
objects). However, we already have an initialized 'this', which we
should use for singleton references.
#KT-20651 Fixed
To make Gradle daemon which is run from IntelliJ IDEA use the same
environment as the daemon run by the "gradlew" command (the latter is
always using US)
Instead of a separate analysis pass to determine variable types at the
point of null checks, use current data flow information and transform
possibly nullable values to definitely non-null values using a special
intrinsic.
This allows to perform a single data flow analysis pass per RNCE
transformation pass (instead of two passes).
...from script-util
fix daemon usage in repls
define compiler classpath for script-util tests explicitly
minor refactorings in the build scripts for better import into idea
... just like AndroidReferenceSearchExecutor does. Otherwise, we get
com.intellij.openapi.application.impl.ApplicationImpl$NoReadAccessException
[java] [uitest] at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1070)
[java] [uitest] at com.intellij.psi.impl.source.tree.CompositeElement.textToCharArray(CompositeElement.java:291)
[java] [uitest] at com.intellij.psi.impl.source.tree.CompositeElement.getText(CompositeElement.java:261)
[java] [uitest] at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getValue(XmlAttributeValueImpl.java:72)
[java] [uitest] at org.jetbrains.android.dom.wrappers.ValueResourceElementWrapper.getValue(ValueResourceElementWrapper.java:458)
[java] [uitest] at org.jetbrains.kotlin.AndroidExtensionsReferenceSearchExecutor.processQuery(AndroidExtensionsReferenceSearchExecutor.kt:42)
[java] [uitest] at org.jetbrains.kotlin.AndroidExtensionsReferenceSearchExecutor.processQuery(AndroidExtensionsReferenceSearchExecutor.kt:38)
[java] [uitest] at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:87)
[java] [uitest] at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:45)
[java] [uitest] at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:79)
[java] [uitest] at com.intellij.util.UniqueResultsQuery.process(UniqueResultsQuery.java:66)
[java] [uitest] at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:56)
[java] [uitest] at com.intellij.psi.search.QuerySearchRequest.runQuery(QuerySearchRequest.java:53)
[java] [uitest] at com.intellij.psi.impl.search.PsiSearchHelperImpl.appendCollectorsFromQueryRequests(PsiSearchHelperImpl.java:635)
[java] [uitest] at com.intellij.psi.impl.search.PsiSearchHelperImpl.processRequests(PsiSearchHelperImpl.java:596)
[java] [uitest] at com.intellij.psi.search.SearchRequestQuery.processResults(SearchRequestQuery.java:45)
[java] [uitest] at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:79)
[java] [uitest] at com.intellij.util.MergeQuery.processSubQuery(MergeQuery.java:85)
[java] [uitest] at com.intellij.util.MergeQuery.forEach(MergeQuery.java:57)
[java] [uitest] at com.intellij.util.MergeQuery.findFirst(MergeQuery.java:51)
[java] [uitest] at com.intellij.util.UniqueResultsQuery.findFirst(UniqueResultsQuery.java:51)
[java] [uitest] at com.android.tools.idea.editors.theme.ThemeEditorComponent$19.doInBackground(ThemeEditorComponent.java:895)
[java] [uitest] at com.android.tools.idea.editors.theme.ThemeEditorComponent$19.doInBackground(ThemeEditorComponent.java:891)
[java] [uitest] at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
[java] [uitest] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[java] [uitest] at javax.swing.SwingWorker.run(SwingWorker.java:334)
[java] [uitest] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[java] [uitest] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[java] [uitest] at java.lang.Thread.run(Thread.java:745)
[java] [uitest] [ 72230] ERROR - plication.impl.ApplicationImpl - Android Studio 3.1 Canary Build #171.SNAPSHOT