https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
spring
  • c

    Christian Dräger

    12/28/2020, 10:44 AM
    hey, is it somehow possible to use a spring service on file level / top level declaration? to be more clear here is a little example code to explain what i am trying to archive:
    // lets assume i have some basic crud repository like:
    interface MyFunkyRepository : CrudRepository<MyFunkyEntity, String>
    
    @Entity(name = "funky")
    @Table(name = "funky")
    class MyFunkyEntity(
        @Id
        var id: String = UUID.randomUUID().toString(),
    
        @Column(name = "title", nullable = false)
        var title: String,
    
        @Column(name = "description", nullable = false)
        var description: String,
    )
    
    // and i have a service that is using the repository
    @Service
    class MyFunkyService(
        private val myFunkyRepository: MyFunkyRepository,
    ) {
        fun funkyAmount() = myFunkyRepository.count()
        fun addFunkiness(f: MyFunkyEntity) = myFunkyRepository.save(f)
    }
    
    // now i would like to write a little internal DSL to add entries to the repository by using the service
    @DslMarker
    annotation class MyFunkyDsl
    
    @MyFunkyDsl
    fun <T> addFunkyStuff(init: MyFunkyEntity.() -> T): T {
        // TODO: somehow inject MyFunkyService and store fields set by init callback
    }
    
    // so i could just use 'addFunkyStuff' lambda anywhere in my code like this:
    class UseDslExample {
        fun someFunction() {
            addFunkyStuff {
                title = "xyz"
                description = "abcd"
            }
        }
    }
    is this possible in any way or what could be an alternative approach to write an DSL for a use-case like that?
    ❓ 1
    t
    m
    • 3
    • 7
  • w

    wakingrufus

    12/30/2020, 3:08 PM
    Looks like spring security is spinning up both its MVC and reactive stuff. I'm not that familiar with security so not sure why. Take a look at those autoconfigs and see what conditionals they have
    m
    • 2
    • 1
  • n

    Nikky

    01/06/2021, 12:00 PM
    trying to use rsocket on spring, is there any way to do this
    spring:=
      rsocket:
        server:
          port: 8080
          transport: websocket
          mapping-path: "rsocket"
    in a way that it shares the port with the existing http server ? we cannot expose additional ports and this would force us to switch to a different platform or deployment option
    n
    • 2
    • 1
  • p

    Philipp Mayer

    01/06/2021, 8:46 PM
    Hello everyone! Does one of you got a hint for me on how to properly inject configurationProperties in a
    @Configuration
    class? Usually, one would define it as follows:
    @ConstructorBinding
    @ConfigurationProperties(prefix = "rooms")
    class RoomConfigurationProperties(val filePath: String)
    But due to modularization, I have a configuration class for the whole module (speak: maven module) whichs looks similiar to that:
    @Configuration
    @ComponentScan
    class RoomConfig {
    
        @Bean
        @ConfigurationProperties(prefix = "rooms")
        fun properties(filePath: String) = RoomConfigurationProperties(filePath)
    
        /*...*/
    }
    However, since the filepath is a constructor parameter, I of course have to supply it and I'm not sure how. Any hint would be appreciated, I unfortunately didn't find what I was looking for in the docs.
    k
    s
    • 3
    • 13
  • g

    gotoOla

    01/08/2021, 2:39 PM
    Hi! Old java-spring developer here who has spent the last few years in kotlin and ktor. If one is to start using spring with ktor, are there any things you should really watch out for? Specific question: How are coroutines working out with Spring Security? Do you need to do some kind of CoroutineContext adapter similar to the old Exector when one used @Async ?
    n
    r
    • 3
    • 5
  • k

    kqr

    01/09/2021, 12:13 AM
    why it can't be autowired?
    b
    • 2
    • 8
  • s

    Sourabh Rawat

    01/10/2021, 6:37 AM
    Does spring boot jersey support coroutines? Following code is giving me this error:
    WARNING: A HTTP GET method, public final java.lang.Object com.example.demo.FooController.bar(java.lang.String,kotlin.coroutines.Continuation), should not consume any entity.
    WARNING: Parameter 1 of type kotlin.coroutines.Continuation<? super java.lang.String> from public final java.lang.Object com.example.demo.FooController.foobar(kotlin.coroutines.Continuation<? super java.lang.String>) is not resolvable to a concrete type.
    WARNING: A HTTP GET method, public final java.lang.Object com.example.demo.FooController.foobar(kotlin.coroutines.Continuation), should not consume any entity.
    
    2021-01-10 11:51:30.715 ERROR 20636 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[.[.e.demo.JerseyConfig]   : Servlet.service() for servlet [com.example.demo.JerseyConfig] in context with path [] threw exception [java.lang.NullPointerException] with root cause
    
    java.lang.NullPointerException: null
    	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:193) ~[kotlinx-coroutines-core-jvm-1.4.2.jar:na]
    	at com.example.demo.FooController.bar(FooController.kt:36) ~[main/:na]
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
    Code:
    @GET
        @Path("{name}")
        @Produces(MediaType.APPLICATION_JSON)
        suspend fun bar(@PathParam("name") name: String): Bar = coroutineScope {
            val foo = async { Bar(name) }
            foo.await()
        }
    w
    j
    b
    • 4
    • 4
  • d

    Dariusz Kuc

    01/17/2021, 2:59 AM
    Hello 👋 I got an endpoint that can accept either a single item or a list of items. Was wondering whether there is a "better" way to do this than the below
    val rawBodyContent = serverRequest.bodyToMono(String::class.java).awaitFirst()
    val jsonNode = objectMapper.readTree(rawBodyContent)
    if (jsonNode.isArray) {
        objectMapper.convertValue(jsonNode, object: TypeReference<List<MyItem>>() {})
    } else {
        objectMapper.treeToValue(jsonNode, MyItem::class.java)
    }
    • 1
    • 1
  • m

    marzelwidmer

    01/19/2021, 5:12 AM
    Hello I have some problem with the https://docs.spring.io/spring-hateoas/docs/1.1.0.RELEASE/reference/html/#server.affordances implementation in Kotlin. have maybe somebody this done already ?
    k
    • 2
    • 25
  • a

    andy.burdett

    01/19/2021, 6:43 PM
    Hi, I’m trying to use the Kotlin DSL for spring security in spring boot 2.4.0 but everything inside the http block is unrecognised. I have included the spring-boot-starter-security dependency is there anything else I need to add to my pom?
    http {
                httpBasic {}
                authorizeRequests {
                    authorize("/greetings/**", hasAuthority("ROLE_ADMIN"))
                    authorize("/**", permitAll)
                }
            }
    s
    r
    • 3
    • 4
  • d

    Dariusz Kuc

    01/21/2021, 3:53 PM
    Hello 👋 Any ideas what might be causing the flakiness of SpringBoot websocket integration tests -> https://github.com/ExpediaGroup/graphql-kotlin/blob/master/examples/server/spring-[…]ql/examples/server/spring/subscriptions/SimpleSubscriptionIT.kt Locally it always works fine but when run GH actions one of the tests randomly fail (after updating to SpringBoot 2.4.2 they fail much more often) with race condition - generally skipping the first message from a stream
    c
    • 2
    • 1
  • s

    Slackbot

    01/22/2021, 1:54 PM
    This message was deleted.
    k
    a
    • 3
    • 2
  • x

    xii

    01/28/2021, 4:25 PM
    I have a postgres database and im trying to fetch a jsonb[] column from it, but I can't seem to make this work
    m
    b
    • 3
    • 21
  • i

    Imran/Malic

    01/28/2021, 5:06 PM
    How can I override a specific Bean that is provided through the Application Context? Ideally without
    MockBean
    a
    • 2
    • 2
  • b

    bjonnh

    02/01/2021, 3:51 AM
    I have a problem with Idea, it seems that Idea keeps loading jars that I removed from my spring application
    m
    • 2
    • 8
  • d

    dodalovic

    02/05/2021, 10:45 AM
    Hi, everyone This is not strictly about Kotlin (although we're using it in our apps), but I'm curious if anyone has some GitHub repo as an example of how to deploy a spring boot app, using
    bootBuildImage
    and GitHub Actions to the AWS ECS ? Thanks in advance!
    b
    • 2
    • 2
  • a

    Alexis Cala Martínez

    02/05/2021, 6:30 PM
    Hello, i are having an issue with spring - kotlin - documentdb, this is our config: val kotlinVersion = "1.2.71" val springBootVersion = "2.1.8.RELEASE" plugins { jacoco id("org.springframework.boot") version "2.1.8.RELEASE" id("io.spring.dependency-management") version "1.0.8.RELEASE" id("org.jlleitschuh.gradle.ktlint") version "7.1.0" kotlin("jvm") version "1.2.71" kotlin("plugin.spring") version "1.2.71" } we have a query to documentdb which search by "_id" an array of numbers, the size could be between 100 to 7000. i've noticed that queries up to 1200 may last 400ms, over that number start the problem, we found an example of 6500 documents which lasted 5sec. We are not sure where the problem is, but DBA team shows their lacency metrics by query and we do not find a query that lasted that long. We think the problem is how we parse the query result.
    r
    • 2
    • 4
  • m

    marzelwidmer

    02/07/2021, 8:34 AM
    Hello I am searching a documentation about the new https://docs.spring.io/spring-cloud-stream/docs/3.1.1/reference/html/spring-cloud-stream.html#spring-cloud-stream-overview-introducing with Kotlin ….. about
    Function,Supplier,Consumer
    do I need maybe also the
    spring-cloud-function-kotlin
    for this ? I try to migrate my sample application to the new API
    @SpringBootApplication
    class ProducerApplication
    fun main(args: Array<String>) {
        runApplication<ProducerApplication>(*args)
    }
    @RestController
    @RequestMapping(value = ["/producer"])
    class ProducerController(private val producerMessagingService: ProducerMessagingService) {
    
        private val log = LoggerFactory.getLogger(javaClass)
    
        @PostMapping(value = ["{message}"])
        fun message(@PathVariable message: String) {
            <http://log.info|log.info>("------------> Receive message {} <-------------", message)
            producerMessagingService.sendMessage(message)
        }
    }
    @Service
    class ProducerMessagingService(private val producerSource: ProducerSource) {
        fun sendMessage(message: String) = producerSource.producerChannel().send(MessageBuilder.withPayload(message).build())
    }
    interface ProducerSource {
        @Output(value = "producerOutput")
        fun producerChannel(): MessageChannel
    }
    @Configuration
    @EnableBinding(value = [ProducerSource::class])
    class MessagingConfig
    s
    • 2
    • 5
  • m

    Mar Mar

    02/13/2021, 4:51 AM
    Hello! Can somebody help me with Spring Repositories? I need query without any By (even id), is it possible?
    m
    • 2
    • 3
  • a

    antonarhipov

    02/16/2021, 3:21 PM
    Hello! 👋 A new tutorial with Kotlin and Spring was published just recently. 5 parts, from basics to more complex things. Any feedback appreciated https://spring.io/guides/tutorials/spring-webflux-kotlin-rsocket/
    👏 3
    👍 12
    😎 3
    🙏 2
    s
    r
    m
    • 4
    • 4
  • d

    Denis Sazonov

    02/17/2021, 6:29 AM
    Hello! I figured out that Spring Retry doesn't work with coroutines. I need something to replace it with during the Kotlin coding. Are there any replacements, or any information when it will be fixed in spring?
    b
    • 2
    • 2
  • g

    gotoOla

    02/17/2021, 7:15 PM
    Hi! Does anyone know if the ReactiveSecurityContextHolder works with coroutines these days?
    s
    • 2
    • 2
  • g

    gotoOla

    02/22/2021, 1:13 PM
    Hi! Has anyone ever done role <-> permissions/authority mapping when using an opaqueToken? I am having this securityWebFilter
    `fun springSecurityFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain? =
            http.csrf().disable().authorizeExchange()
                .anyExchange().permitAll()
                .and()
                .oauth2Client()
                .and()
                .oauth2ResourceServer { it.opaqueToken(withDefaults()) }
                .build()
    and my Principal gets populated with the fields from the token as a BearerTokenAuthentication (I'm guessing this happens within the oauth2ResourceServer-block?) I'd like to add a layer where I can map the given role to some permissions specifically for my back end service. How should one go about this? I've tried implementing an AuthoritiesExtractor and PrincipalExtractor and exposed them as @Components but they never seem to be called (I am using webflux with spring 2.2.6.RELEASE) I guess I could do a roleToPermissionService and call that immediately from the controller but it feels a bit non-springy
    k
    • 2
    • 1
  • u

    123

    02/23/2021, 12:47 PM
    Anything you could suggest to use for advanced Spring Data filtering? I know there are at least two tools 1. QueryDSL but I do not like the idea of pregenerated Q-classes 2. Specifications, they are quite verbose
    k
    • 2
    • 1
  • i

    igor.wojda

    02/23/2021, 10:06 PM
    Is it somehow possible to define this
    init
    bean as top-level function? (now this bean does not run)
    @SpringBootApplication
    class TestServerApplication
    
    
    fun main(args: Array<String>) {
        runApplication<TestServerApplication>(*args)
    }
    
    @Bean
    fun init(repository: StreamRepository) = ApplicationRunner { _ ->
        // Do sth on app start
    }
    This makes a bean run, but this solution involves a lot of nesting, so wonder if this is necessary 🤔
    @SpringBootApplication
    class InboxionServerApplication {
        companion object {
            @JvmStatic
            fun main(args: Array<String>) {
                runApplication<InboxionServerApplication>(*args)
            }
        }
    
    
        @Bean
        fun init(repository: StreamRepository) = ApplicationRunner { _ ->
            // Do sth on app start
        }
    }
    t
    j
    • 3
    • 2
  • c

    Christian Dräger

    03/08/2021, 10:16 PM
    hey, after bumping my spring-boot project to kotlin version 1.5.0-M1 i am getting errors like the one shown in the screenshot. my kotlin compiler options look like
    subprojects {
        tasks {
            withType<KotlinCompile> {
                dependsOn(ktlintFormat)
                kotlinOptions {
                    jvmTarget = "1.8"
                    apiVersion = "1.5"
                    languageVersion = "1.5"
                    freeCompilerArgs = listOf("-Xjsr305=strict")
                }
            }
    when running the app via gradle everything works fine but having intellij showing up errors all the time isn’t nice for the workflow ^^ any hint what could be the problem here?
    i
    • 2
    • 5
  • i

    iamkdblue

    03/09/2021, 3:12 PM
    I am trying to make multi module project(kotlin) with gradle, i am not getting any reference on internet , could you guys help with this?
    a
    • 2
    • 9
  • g

    gotoOla

    03/10/2021, 12:27 PM
    Does anybody have any tips on how to run coroutines with spring and reactor context? Right now I've gotten my service level code to work with `
    val reactorContext = coroutineContext[ReactorContext.Key]!!.context.asCoroutineContext()
    but if I try to write a unit-test for this I fail with a nullpointerException since I guess the coroutineContext[ReactorContext.Key] is populated from the context given by spring/the controller layer? ?
    s
    • 2
    • 2
  • a

    Alfred Lopez

    03/10/2021, 4:01 PM
    Hello, I'm using a JAR compiled from Kotlin code in a Java Spring Boot application. The class that I want to use as bean contains several fields that are marked private, some of which are vals. The vals have been initialize at the declaration level, but when I inspect the returned bean (@RequestScope), the vals are null. Is there something special that I have to do on the Spring Boot side of things to get Spring to initialize those fields? Thanks!
    j
    • 2
    • 30
  • u

    123

    03/12/2021, 5:07 PM
    Imagine I have two entities
    A
    and
    A_Log
    with relations:
    @Entity data class A (val log: A_Log)
    @Entity data class A_Log(val a: A, val price: Int)
    And a method which persists them:
    @Transactional fun persist(val dto: PriceDto) {
    	val a: A = A(???)
    	val log: A_Log = (a, price = dto.price)
    
    	// persist methods
    }
    I think the problem is clear, any way to solve this egg-or-chicken problem except making fields nullable and using (
    !!
    ) elsewhere in code?
    j
    j
    • 3
    • 4
Powered by Linen
Title
u

123

03/12/2021, 5:07 PM
Imagine I have two entities
A
and
A_Log
with relations:
@Entity data class A (val log: A_Log)
@Entity data class A_Log(val a: A, val price: Int)
And a method which persists them:
@Transactional fun persist(val dto: PriceDto) {
	val a: A = A(???)
	val log: A_Log = (a, price = dto.price)

	// persist methods
}
I think the problem is clear, any way to solve this egg-or-chicken problem except making fields nullable and using (
!!
) elsewhere in code?
j

Jaco

03/12/2021, 5:22 PM
The answer to your question is probably not in the structure of your classes but in the behaviour you need. Do you really need to have a bi-directional relationship for storage?
u

123

03/12/2021, 6:06 PM
@Jaco seems like yes, because I need to have reference on parent from every log entity, and having last log reference on the main eitnty
https://stackoverflow.com/questions/35439421/circular-references-with-vals-in-kotlin found this
j

jbnizet

03/12/2021, 9:56 PM
Assuming you could do that, what would happen if you call equals() or hashCode() or toString() on one of those objects?
View count: 32