deactivateduser
08/26/2017, 9:54 PMnapperley
08/27/2017, 3:22 AMDalinar
08/27/2017, 4:42 AMObject
it is a java class, its subclasses are all Kotlin)alien11689
08/27/2017, 5:19 PMalien11689
08/27/2017, 6:44 PMx80486
08/28/2017, 12:48 AMclass Client(host: String = "localhost", port: Int = 50551, enableTls: Boolean = false)
. Now I would like to call the constructor
with a different port
, like: val client = HelloWorldClient(443)
.
Is there anything like a "wildcard" or something I can use that fills up the missing parameter? Something like val client = HelloWorldClient(_, 443)
...waqas
08/28/2017, 9:41 AMedik
08/28/2017, 12:42 PMrrader
08/28/2017, 1:16 PMaaronfox
08/28/2017, 1:26 PMSlackbot
08/28/2017, 2:04 PMankitdroiddeveloper
08/29/2017, 2:49 AMpoohbar
08/29/2017, 7:10 PMif (value in listOf(A, B)) { ... }
and just import A
and B
directlymichaelzinn
08/30/2017, 8:46 AMjstuyts-squins
08/30/2017, 8:52 AMtaskCache[s]?.let { cachedValue ->
...
}
user
08/30/2017, 10:36 AMkarelpeeters
08/30/2017, 12:35 PMsupaham
08/30/2017, 3:48 PMdata class SquadEntry(
val name: String,
var leader: OptionalPresence<UUID> = OptionalPresence.empty(),
var color: OptionalPresence<String> = OptionalPresence.empty(),
var tag: OptionalPresence<String> = OptionalPresence.empty(),
var members: OptionalPresence<Set<UUID>>
)
Every time I want to write to a field e.g. leader I have to do leader = OptionalPresence(value). Is there a way to use something like delegate properties to simplify this process?jw
08/30/2017, 3:49 PMrellenberger
08/30/2017, 5:02 PMpoohbar
08/30/2017, 7:24 PMvar res = someJavaFuncThatActuallyReturnsNull()
// res is now SomeJavaType!
// at this point I can start passing 'res' around and later access anything on it and get an NPE, Kotlin didnt help at all
Daniel
08/30/2017, 8:55 PMjlleitschuh
08/30/2017, 9:16 PMIncompatibleClassChangeError
on JDK 9 that I'm not expecting.
https://travis-ci.org/junit-team/junit5/jobs/270169944#L1267-L1268
I'm not sure why but I seem to be getting it from this test.
Any thoughts on why this might occur on JDK 9 but not JDK 8?
https://github.com/junit-team/junit5/pull/1001/files#diff-140541d5d08c428c13588c5f777f9218R49edik
08/30/2017, 11:29 PMkevinmost
08/31/2017, 1:21 AMasarazan
08/31/2017, 2:54 AMtianhao
08/31/2017, 2:59 AMenleur
08/31/2017, 7:39 AMjlleitschuh
08/31/2017, 4:07 PM:junit-jupiter-api:javadocPicked up _JAVA_OPTIONS: -Xmx500m
javadoc: error - An exception occurred while building a component: TagInfo
(com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /home/travis/build/junit-team/junit5/junit-jupiter-api/build/classes/kotlin/main/org/junit/jupiter/api/AssertionsKt$sam$Supplier$i$44378ebd.class
undeclared type variable: T
Please remove or make sure it appears in the correct subdirectory of the classpath.)
Please file a bug against the javadoc tool via the Java bug reporting page
(<http://bugreport.java.com>) after checking the Bug Database (<http://bugs.java.com>)
for duplicates. Include error messages and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /home/travis/build/junit-team/junit5/junit-jupiter-api/build/classes/kotlin/main/org/junit/jupiter/api/AssertionsKt$sam$Supplier$i$44378ebd.class
undeclared type variable: T
Please remove or make sure it appears in the correct subdirectory of the classpath.
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.badClassFile(ClassReader.java:278)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.findTypeVar(ClassReader.java:963)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.sigToType(ClassReader.java:670)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.sigToType(ClassReader.java:732)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.sigToType(ClassReader.java:656)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readType(ClassReader.java:499)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$11.read(ClassReader.java:1193)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readAttrs(ClassReader.java:1537)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readMemberAttrs(ClassReader.java:1527)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:2391)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2641)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassBuffer(ClassReader.java:2706)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2719)
at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:348)
at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:285)
at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1314)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1248)
https://travis-ci.org/junit-team/junit5/jobs/270479723#L1179karelpeeters
09/01/2017, 10:54 AMkarelpeeters
09/01/2017, 10:54 AMarekolek
09/01/2017, 10:55 AMDestructuring declarations are only allowed for local variables/values.
~ Preprocessor
karelpeeters
09/01/2017, 10:57 AM