Change testData for IntentionsTestGenerated to avoid using javax and sql packages
- Those packages are missing in the mockJdk 1.8 in intellij repository, and it leads to those tests failing in kotlin-ide repository
This commit is contained in:
committed by
Roman Golyshev
parent
22b558110d
commit
7d662bf5d1
@@ -1,3 +1,3 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun <caret>foo() = java.io.File("x").toURI()
|
fun <caret>foo() = java.io.File("x").getAbsolutePath()
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
import java.net.URI
|
|
||||||
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun foo(): URI? {
|
fun foo(): String? {
|
||||||
return java.io.File("x").toURI()
|
return java.io.File("x").getAbsolutePath()
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.invokeLater
|
import java.util.regex.Pattern.matches
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>SwingUtilities.invokeLater { }
|
<caret>Pattern.matches("", "")
|
||||||
|
|
||||||
val bottom = SwingUtilities.BOTTOM
|
val field = Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait {
|
Pattern.compile("")
|
||||||
SwingUtilities.invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = javax.swing.SwingUtilities.HORIZONTAL
|
val fieldFqn = java.util.regex.Pattern.CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.*
|
import java.util.regex.Pattern.*
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>invokeLater { }
|
<caret>matches("", "")
|
||||||
|
|
||||||
val bottom = BOTTOM
|
val field = CASE_INSENSITIVE
|
||||||
|
|
||||||
invokeAndWait {
|
compile("")
|
||||||
invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = HORIZONTAL
|
val fieldFqn = CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.*
|
import java.util.regex.Pattern.*
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>SwingUtilities.invokeLater { }
|
<caret>Pattern.matches("", "")
|
||||||
|
|
||||||
val bottom = SwingUtilities.BOTTOM
|
val field = Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait {
|
Pattern.compile("")
|
||||||
SwingUtilities.invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = javax.swing.SwingUtilities.HORIZONTAL
|
val fieldFqn = java.util.regex.Pattern.CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.*
|
import java.util.regex.Pattern.*
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>invokeLater { }
|
<caret>matches("", "")
|
||||||
|
|
||||||
val bottom = BOTTOM
|
val field = CASE_INSENSITIVE
|
||||||
|
|
||||||
invokeAndWait {
|
compile("")
|
||||||
invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = HORIZONTAL
|
val fieldFqn = CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
public class JavaUtilClass {
|
||||||
|
public static int STATIC_FIELD = 10;
|
||||||
|
|
||||||
|
public static void overloadedMethod(int i) {}
|
||||||
|
public static void overloadedMethod(String i) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
public class JavaUtilClass {
|
||||||
|
public static int STATIC_FIELD = 10;
|
||||||
|
|
||||||
|
public static void overloadedMethod(int i) {}
|
||||||
|
public static void overloadedMethod(String i) {}
|
||||||
|
}
|
||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'JavaUtilClass'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(source: Component!, aPoint: Point!, destination: Component!): Point! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(source: Component!, x: Int, y: Int, destination: Component!): Point! defined in javax.swing.SwingUtilities
|
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun overloadedMethod(i: Int): Unit defined in JavaUtilClass<br>public open fun overloadedMethod(i: String!): Unit defined in JavaUtilClass
|
||||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(source: Component!, aPoint: Point!, destination: Component!): Point! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(source: Component!, x: Int, y: Int, destination: Component!): Point! defined in javax.swing.SwingUtilities
|
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun overloadedMethod(i: Int): Unit defined in JavaUtilClass<br>public open fun overloadedMethod(i: String!): Unit defined in JavaUtilClass
|
||||||
// ERROR: Unresolved reference: unresolved
|
// ERROR: Unresolved reference: unresolved
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>SwingUtilities.convertPoint()
|
<caret>JavaUtilClass.overloadedMethod()
|
||||||
|
|
||||||
val bottom = SwingUtilities.BOTTOM
|
val bottom = JavaUtilClass.STATIC_FIELD
|
||||||
|
|
||||||
SwingUtilities.convertPoint()
|
JavaUtilClass.overloadedMethod()
|
||||||
|
|
||||||
SwingUtilities.unresolved
|
JavaUtilClass.unresolved
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
import JavaUtilClass.*
|
||||||
|
|
||||||
|
// INTENTION_TEXT: "Import members from 'JavaUtilClass'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(source: Component!, aPoint: Point!, destination: Component!): Point! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(source: Component!, x: Int, y: Int, destination: Component!): Point! defined in javax.swing.SwingUtilities
|
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun overloadedMethod(i: Int): Unit defined in JavaUtilClass<br>public open fun overloadedMethod(i: String!): Unit defined in JavaUtilClass
|
||||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun convertPoint(source: Component!, aPoint: Point!, destination: Component!): Point! defined in javax.swing.SwingUtilities<br>public open fun convertPoint(source: Component!, x: Int, y: Int, destination: Component!): Point! defined in javax.swing.SwingUtilities
|
// ERROR: None of the following functions can be called with the arguments supplied: <br>public open fun overloadedMethod(i: Int): Unit defined in JavaUtilClass<br>public open fun overloadedMethod(i: String!): Unit defined in JavaUtilClass
|
||||||
// ERROR: Unresolved reference: unresolved
|
// ERROR: Unresolved reference: unresolved
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
|
||||||
import javax.swing.SwingUtilities.*
|
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>convertPoint()
|
overloadedMethod()
|
||||||
|
|
||||||
val bottom = BOTTOM
|
val bottom = STATIC_FIELD
|
||||||
|
|
||||||
convertPoint()
|
overloadedMethod()
|
||||||
|
|
||||||
SwingUtilities.unresolved
|
JavaUtilClass.unresolved
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.<caret>SwingConstants.CENTER
|
import java.util.regex.<caret>Pattern.CASE_INSENSITIVE
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
javax.swing.SwingUtilities<caret>.invokeLater { }
|
java.util.regex.Pattern<caret>.CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import javax.swing.SwingUtilities.*
|
import java.util.regex.Pattern.*
|
||||||
|
|
||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>invokeLater { }
|
CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.Objects'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>javax.swing.SwingUtilities.invokeLater { }
|
<caret>java.util.Objects.equals(null, null)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import javax.swing.SwingUtilities.*
|
import java.util.Objects.*
|
||||||
|
|
||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.Objects'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>invokeLater { }
|
equals(null, null)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.invokeLater
|
import java.util.regex.Pattern.matches
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
invokeLater { }
|
matches("", "")
|
||||||
|
|
||||||
val bottom = <caret>SwingUtilities.BOTTOM
|
val field = <caret>Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait {
|
Pattern.compile("")
|
||||||
invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = javax.swing.SwingUtilities.HORIZONTAL
|
val fieldFqn = java.util.regex.Pattern.CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.*
|
import java.util.regex.Pattern.*
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
invokeLater { }
|
matches("", "")
|
||||||
|
|
||||||
val bottom = <caret>BOTTOM
|
val field = CASE_INSENSITIVE
|
||||||
|
|
||||||
invokeAndWait {
|
compile("")
|
||||||
invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = HORIZONTAL
|
val fieldFqn = CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: Unresolved reference: unresolved
|
// ERROR: Unresolved reference: unresolved
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
SwingUtilities.invokeLater { }
|
Pattern.matches("", "")
|
||||||
|
|
||||||
val bottom = <caret>SwingUtilities.BOTTOM
|
val field = <caret>Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait {
|
Pattern.compile("")
|
||||||
SwingUtilities.invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = javax.swing.SwingUtilities.HORIZONTAL
|
val fieldFqn = java.util.regex.Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingUtilities.unresolved
|
Pattern.unresolved
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
// INTENTION_TEXT: "Import members from 'javax.swing.SwingUtilities'"
|
// INTENTION_TEXT: "Import members from 'java.util.regex.Pattern'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: Unresolved reference: unresolved
|
// ERROR: Unresolved reference: unresolved
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.*
|
import java.util.regex.Pattern.*
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
invokeLater { }
|
matches("", "")
|
||||||
|
|
||||||
val bottom = <caret>BOTTOM
|
val field = <caret>CASE_INSENSITIVE
|
||||||
|
|
||||||
invokeAndWait {
|
compile("")
|
||||||
invokeLater { }
|
|
||||||
}
|
|
||||||
|
|
||||||
val horizontal = HORIZONTAL
|
val fieldFqn = CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingUtilities.unresolved
|
Pattern.unresolved
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: Unresolved reference: unresolved
|
// ERROR: Unresolved reference: unresolved
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.Objects
|
||||||
|
|
||||||
val v = <caret>SwingUtilities.unresolved()
|
val v = <caret>Objects.unresolved()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingConstants.<caret>CENTER
|
import java.util.regex.Pattern.<caret>CASE_INSENSITIVE
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.<caret>SwingConstants.CENTER
|
import java.util.regex.<caret>Pattern.CASE_INSENSITIVE
|
||||||
+3
-4
@@ -1,10 +1,9 @@
|
|||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: Unresolved reference: xxx
|
// ERROR: Unresolved reference: unresolved
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
SwingUtilities.<caret>xxx {
|
Pattern.<caret>unresolved()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<caret>SwingUtilities.invokeLater {
|
<caret>Pattern.CASE_INSENSITIVE
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// INTENTION_TEXT: "Add import for 'javax.swing.SwingConstants.CENTER'"
|
// INTENTION_TEXT: "Add import for 'java.util.regex.Pattern.CASE_INSENSITIVE'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingConstants
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
val v = SwingConstants.CENTER
|
val v = Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
SwingConstants.<caret>CENTER
|
Pattern.<caret>CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// INTENTION_TEXT: "Add import for 'javax.swing.SwingConstants.CENTER'"
|
// INTENTION_TEXT: "Add import for 'java.util.regex.Pattern.CASE_INSENSITIVE'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingConstants
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingConstants.CENTER
|
import java.util.regex.Pattern.CASE_INSENSITIVE
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
val v = CENTER
|
val v = CASE_INSENSITIVE
|
||||||
|
|
||||||
<caret>CENTER
|
<caret>CASE_INSENSITIVE
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-11
@@ -1,26 +1,23 @@
|
|||||||
// INTENTION_TEXT: "Add import for 'javax.swing.SwingUtilities.invokeLater'"
|
// INTENTION_TEXT: "Add import for 'java.util.regex.Pattern.matches'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: Unresolved reference: SomethingElse
|
// ERROR: Unresolved reference: SomethingElse
|
||||||
// ERROR: Unresolved reference: somethingElse
|
// ERROR: Unresolved reference: somethingElse
|
||||||
// SKIP_ERRORS_AFTER
|
// SKIP_ERRORS_AFTER
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
SwingUtilities.<caret>invokeLater {}
|
Pattern.<caret>matches("", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
javax.swing.SwingUtilities.invokeLater {
|
Pattern.matches("", "")
|
||||||
}
|
|
||||||
|
|
||||||
javax.swing.SwingUtilities.invokeLater(Runnable {
|
java.util.regex.Pattern.matches("", "")
|
||||||
SwingUtilities.invokeLater { }
|
|
||||||
})
|
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait { }
|
Pattern.compile("")
|
||||||
|
|
||||||
SomethingElse.invokeLater()
|
SomethingElse.matches("", "")
|
||||||
|
|
||||||
somethingElse.SwingUtilities.invokeLater()
|
somethingElse.Pattern.matches("", "")
|
||||||
}
|
}
|
||||||
@@ -1,27 +1,24 @@
|
|||||||
// INTENTION_TEXT: "Add import for 'javax.swing.SwingUtilities.invokeLater'"
|
// INTENTION_TEXT: "Add import for 'java.util.regex.Pattern.matches'"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// ERROR: Unresolved reference: SomethingElse
|
// ERROR: Unresolved reference: SomethingElse
|
||||||
// ERROR: Unresolved reference: somethingElse
|
// ERROR: Unresolved reference: somethingElse
|
||||||
// SKIP_ERRORS_AFTER
|
// SKIP_ERRORS_AFTER
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
import java.util.regex.Pattern
|
||||||
import javax.swing.SwingUtilities.invokeLater
|
import java.util.regex.Pattern.matches
|
||||||
|
|
||||||
fun foo() {
|
fun foo() {
|
||||||
invokeLater {}
|
matches("", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
invokeLater {
|
matches("", "")
|
||||||
}
|
|
||||||
|
|
||||||
invokeLater(Runnable {
|
matches("", "")
|
||||||
invokeLater { }
|
|
||||||
})
|
|
||||||
|
|
||||||
SwingUtilities.invokeAndWait { }
|
Pattern.compile("")
|
||||||
|
|
||||||
SomethingElse.invokeLater()
|
SomethingElse.matches("", "")
|
||||||
|
|
||||||
somethingElse.SwingUtilities.invokeLater()
|
somethingElse.Pattern.matches("", "")
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
SwingUtilities.invokeLater(<caret>object: Runnable {
|
Thread(<caret>object: Runnable {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
SwingUtilities.invokeLater { throw UnsupportedOperationException() }
|
Thread { throw UnsupportedOperationException() }
|
||||||
}
|
}
|
||||||
+1
-3
@@ -1,9 +1,7 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
|
||||||
|
|
||||||
fun bar(p: Int) {
|
fun bar(p: Int) {
|
||||||
SwingUtilities.invokeLater(<caret>object: Runnable {
|
Thread(<caret>object: Runnable {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (p < 0) return
|
if (p < 0) return
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
|
|||||||
Vendored
+1
-3
@@ -1,9 +1,7 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
import javax.swing.SwingUtilities
|
|
||||||
|
|
||||||
fun bar(p: Int) {
|
fun bar(p: Int) {
|
||||||
SwingUtilities.invokeLater(Runnable {
|
Thread(Runnable {
|
||||||
if (p < 0) return@Runnable
|
if (p < 0) return@Runnable
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<problem>
|
<problem>
|
||||||
<file>NoSamAdapterNeeded.kt</file>
|
<file>NoSamAdapterNeeded.kt</file>
|
||||||
<line>6</line>
|
<line>4</line>
|
||||||
<module>light_idea_test_case</module>
|
<module>light_idea_test_case</module>
|
||||||
<entry_point TYPE="file" FQNAME="NoSamAdapterNeeded.kt" />
|
<entry_point TYPE="file" FQNAME="NoSamAdapterNeeded.kt" />
|
||||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Convert object literal to lambda</problem_class>
|
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Convert object literal to lambda</problem_class>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun getEntry() : Map.Entry<kotlin.Array<String>, java.sql.Array> {
|
object Holder {
|
||||||
|
class Array
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getEntry() : Map.Entry<kotlin.Array<String>, Holder.Array> {
|
||||||
throw Error()
|
throw Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun getEntry() : Map.Entry<kotlin.Array<String>, java.sql.Array> {
|
object Holder {
|
||||||
|
class Array
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getEntry() : Map.Entry<kotlin.Array<String>, Holder.Array> {
|
||||||
throw Error()
|
throw Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
val x: Map.Entry<Array<String>, java.sql.Array> = getEntry()
|
val x: Map.Entry<Array<String>, Holder.Array> = getEntry()
|
||||||
|
|||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// WITH_JDK
|
// WITH_JDK
|
||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
import java.net.Socket
|
import java.util.concurrent.atomic.AtomicInteger
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
val s = Socket()
|
val i = AtomicInteger()
|
||||||
val stream = s.getInputStream()<caret>
|
val value = i.getAndIncrement()<caret>
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user