Info

Login

Channels

APIs

Credits

  • cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2019-09-11

2019-09-12

2019-09-13 »

Nick Message Date
atrament666 [atrament666!~atrament@cpc95006-newt38-2-0-cust73.19-3.cable.virginm.net] has joined ##java [12:00]
shugz [shugz!~shugz@2605:e000:fd42:8a00:4dd:e03f:11f3:d30e] has joined ##java [12:01]
steaktartaar [steaktartaar!~wouter@maximilian.whermans.be] has joined ##java [12:06]
steaktartaar Good morning. Does anyone know if there is a way to do multi-file uploads (User selects multiple files at once in OS dialog) using stock Struts 1? I've been able to do multiple uploads per request by dynamically adding file input fields, but that still takes a lot of clikcing from the user [12:09]
knited [knited!~knited@unaffiliated/knited] has joined ##java [12:19]
very_sneaky can anybody tell me if Java now supports named parameters? i.e. `new Person(name="John", age=51);` or something similar. My googling shows a bunch of discussion from 5-6 years ago but not much recent, my guess is not but i thought i'd ask just in case [12:26]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [12:35]
RedSoxFan07 [RedSoxFan07!~Thunderbi@d-137-103-109-45.ct.cpe.atlanticbb.net] has joined ##java [12:39]
shugz [shugz!~shugz@cpe-98-150-75-96.dc.res.rr.com] has joined ##java [12:40]
djhworld [djhworld!~djhworld@90.252.118.61] has joined ##java [12:41]
tassee [tassee!~tasse@55d4ed42.access.ecotel.net] has joined ##java [12:45]
Jantz [Jantz!~IceChat9@118-93-2-79.dsl.dyn.ihug.co.nz] has joined ##java [12:53]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [12:53]
dtrott parted the channel: [12:58]
johndoe231 [johndoe231!~johndoe@117.198.102.130] has joined ##java [12:59]
abhixec [abhixec!~abhixec@73.92.49.6] has joined ##java [01:23]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:b160:9817:f690:c4ec] has joined ##java [01:28]
steaktartaar No, not as far as I know [01:29]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-xgtrbelwfiflprzi] has joined ##java [01:30]
cnsunyour [cnsunyour!~cnsunyour@114.244.176.207] has joined ##java [01:52]
johndoe231 [johndoe231!~johndoe@117.198.102.130] has joined ##java [01:52]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [01:56]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [01:57]
rajrajraj [rajrajraj!uid72176@gateway/web/irccloud.com/x-xccrrfysaukytvip] has joined ##java [01:59]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [02:09]
puppy_za [puppy_za!uid277586@gateway/web/irccloud.com/x-wuyxhozzeqndbuvj] has joined ##java [02:10]
deavmi [deavmi!~deavmi@165.0.49.39] has joined ##java [02:19]
ogradyd [ogradyd!~Thunderbi@HSI-KBW-046-005-255-067.hsi8.kabel-badenwuerttemberg.de] has joined ##java [02:29]
bitwinery [bitwinery!~bruno@c-73-37-18-139.hsd1.wa.comcast.net] has joined ##java [02:34]
juria_roberts [juria_roberts!cdfbe933@205.251.233.51] has joined ##java [02:40]
deavmi [deavmi!~deavmi@165.0.49.39] has joined ##java [02:42]
juria_roberts How do I achieve the following through Optional? https://justpaste.it/6c4tc [02:43]
juria_roberts juria_roberts's title: "if( object == null || object.getName() == null) { return ""; } else { return object.getName(... - JustPaste.it" [02:43]
odinsbane juria_roberts: you want to return an optional? or you want object to be an optional? [02:45]
juria_roberts odinsbane I want to return a String. I want to use Optional.ofNullable and orElse to achieve it [02:46]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [02:47]
odinsbane Sounds like you've got it. [02:47]
juria_roberts This is what I came up with [02:48]
juria_roberts Optional.ofNullable(object).map(object::getName) [02:49]
odinsbane You could use Optional.Map to get the string. [02:49]
juria_roberts Yes but How do I return "" if the name is null? [02:49]
odinsbane .orElse("") ? [02:49]
juria_roberts Isn't the orElse for if object is null? [02:50]
odinsbane It should work if object is null and if the name is null. [02:51]
funeral [funeral!~Funeral@2a01:79d:b7df:4bd8:f3d4:5e09:6ffa:eb73] has joined ##java [02:51]
odinsbane It returns an optional as "ofNullable" which is empty if the value is null. [02:51]
TomyWork [TomyWork!~TomyLobo@82.194.113.100] has joined ##java [02:52]
sdu [sdu!d4fb6b53@givos1.ath.forthnet.gr] has joined ##java [02:53]
odinsbane You could make a test and exhaust all of the possibilities. [02:54]
juria_roberts Yup will do that, Thanks odinsbane [02:55]
Chernabog [Chernabog!~Chernabog@gate.fleeture.de] has joined ##java [02:56]
progart [progart!~kamee@46.241.196.254] has joined ##java [02:57]
progart [progart!~kamee@46.241.196.254] has joined ##java [02:58]
juria_roberts odinsbane Wrote unit tests for it. I can confirm that you are right [03:00]
_boot [_boot!~boot@unaffiliated/boot/x-1140682] has joined ##java [03:07]
rohanrhu [rohanrhu!~rohanrhu@88.228.226.211] has joined ##java [03:11]
hojang [hojang!hojang@nat/redhat/x-tcidokzhjsypdltn] has joined ##java [03:14]
extor [extor!~extor@unaffiliated/extor] has joined ##java [03:18]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [03:19]
hypc1 [hypc1!~Thunderbi@175.169.193.192] has joined ##java [03:20]
coalado [coalado!~Thomas@unaffiliated/coalado] has joined ##java [03:22]
ravenousmoose [ravenousmoose!~ravenousm@194.78.35.195] has joined ##java [03:23]
anirban [anirban!~anirban@unaffiliated/apostasy] has joined ##java [03:24]
conan [conan!conan@nat/redhat/x-lsyiqailnjcdsrwb] has joined ##java [03:26]
quadsar [quadsar!~quadsar@unaffiliated/quadsar] has joined ##java [03:30]
exonity01 [exonity01!uid364582@gateway/web/irccloud.com/x-fegdbjloazqcelob] has joined ##java [03:41]
johndoe231 [johndoe231!~johndoe@117.198.102.130] has joined ##java [03:55]
hypc [hypc!~Thunderbi@175.169.193.192] has joined ##java [04:00]
enoq [enoq!~textual@212-186-80-213.static.upcbusiness.at] has joined ##java [04:02]
x256 [x256!~marc@x4d012a89.dyn.telefonica.de] has joined ##java [04:07]
hypc1 [hypc1!~Thunderbi@175.169.193.192] has joined ##java [04:09]
Zappi [Zappi!ZZappi@gateway/vpn/privateinternetaccess/zzappi] has joined ##java [04:11]
cfoch [cfoch!uid153227@gateway/web/irccloud.com/x-zgpiiloaucjgisjq] has joined ##java [04:15]
tracks_droid [tracks_droid!~androirc@2600:100d:b144:8f8b:0:1f:e728:e01] has joined ##java [04:15]
Zappi_ [Zappi_!ZZappi@gateway/vpn/privateinternetaccess/zzappi] has joined ##java [04:16]
Zappi_ [Zappi_!ZZappi@gateway/vpn/privateinternetaccess/zzappi] has joined ##java [04:18]
alwyn [alwyn!~alwyn@unaffiliated/alwyn] has joined ##java [04:26]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [04:33]
conan [conan!conan@nat/redhat/x-bkfhmiiapnbeexvq] has joined ##java [04:34]
HumanG33k [HumanG33k!~HumanG33k@62.147.242.8] has joined ##java [04:47]
conan [conan!conan@nat/redhat/x-fwzucurpomdscxra] has joined ##java [04:58]
x256 TIL: If `-ea` is not set, the OpenJDK 11 can remove dead code way better than (I) expected. https://hastebin.com/osixomezez.java The last three benchmarks all have the same throughput. [04:59]
mr_lou [mr_lou!~misthalos@077213104235.dynamic.telenor.dk] has joined ##java [05:01]
magz_ [magz_!~magz@68-168-184-223.fttp.usinternet.com] has joined ##java [05:02]
xeno_ [xeno_!~xeno@unaffiliated/xeno] has joined ##java [05:09]
puppy_za magic [05:10]
conan [conan!conan@nat/redhat/x-lzazopnsbyydsgqg] has joined ##java [05:12]
Chernabog_ [Chernabog_!~Chernabog@gate.fleeture.de] has joined ##java [05:16]
Chernabog__ [Chernabog__!~Chernabog@gate.fleeture.de] has joined ##java [05:17]
acidjnk_new [acidjnk_new!~acid@200116b8671cc000409de15339d14cab.dip.versatel-1u1.de] has joined ##java [05:21]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [05:34]
yawkat [yawkat!~yawkat@cats.coffee] has joined ##java [05:34]
progart [progart!~kamee@46.241.189.61] has joined ##java [05:36]
yawkat x256: this applies to static final fields in general - because assert is just that: https://javap.yawk.at/#i7Q8en [05:39]
extorr [extorr!~extor@unaffiliated/extor] has joined ##java [05:44]
Chernabog__ [Chernabog__!~Chernabog@gate.fleeture.de] has joined ##java [05:52]
Chernabog [Chernabog!~Chernabog@gate.fleeture.de] has joined ##java [05:53]
x256 So a classloader could enable or disable asserts for each class individually? Is that usable in some way? (e.g. enable assert only for a certain package)? [05:56]
yawkat -ea:package [05:59]
x256 Found it already. Nice. [05:59]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-kcvwtadpcunqyqpo] has joined ##java [06:02]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [06:26]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [06:26]
Jonopoly [Jonopoly!~Jonopoly@unaffiliated/jonopoly] has joined ##java [06:26]
Jonopoly Not sure if anyone can help me but how can i make this more flexible on linux/windows [06:27]
Jonopoly it's a unit test [06:27]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [06:27]
Jonopoly assertThat(created, containsInAnyOrder("attachments/" + QUESTION_CODE_2 + "_" + FILE_NAME_2)); [06:27]
Jonopoly I tried to use path.get( ) [06:28]
Jonopoly but it returned <"attachments\... [06:28]
x256 Compare Path instances, not strings. Path is already interoperable. [06:33]
progart [progart!~kamee@46.241.189.61] has joined ##java [06:37]
surial x256: Path doesn't have 'contains', though. [06:38]
progart [progart!~kamee@46.241.189.61] has joined ##java [06:38]
surial Jonopoly: you're also using hamcrest wrong; it's just 'contains', here. [06:38]
progart [progart!~kamee@46.241.189.61] has joined ##java [06:39]
surial oh, I'm misreading this, created is a list of strings. Yeah, okay, what x256 said: Don't convert them to strings, contains(Paths.get("attachments/" + QUESTION_CODE_2 + "_" + FILE_NAME_2). [06:39]
somazero [somazero!~somazero@2600:8805:100:112:d1cb:bac:38ce:1f97] has joined ##java [06:39]
Jonopoly i do and it says faiiled [06:41]
Jonopoly Expected:[<attachments\question... [06:42]
Jonopoly but: "attachments\questions [06:42]
x256 What type is 'created'? [06:45]
Jonopoly List<String> [06:46]
surial Jonopoly: stop what you are doing for a second. try to walk a mile in the shoes of someone who tries to help you. review the conversation. [06:46]
surial You think that's enough info to give you anything except a 'well, uh... \_(?)_/'? [06:46]
surial Jonopoly: It needs to be a List<Path>. [06:46]
abclove [abclove!~moretz@183.101.68.93] has joined ##java [06:48]
abclove hello, [06:48]
tachoknight__ [tachoknight__!~tachoknig@205.178.20.7] has joined ##java [06:49]
abclove thanks for help to learn java till now, i want to go to android development, so where can i learn android app? [06:49]
x256 Jonopoly: If the unit you are testing returns List<String> and not List<Path>, then the API is not interoperable and sucks. You have to mimic whatever it does it in your tests. Good luck. [06:49]
x256 abclove: #android-dev would be the better channel to ask. [06:50]
abclove x256: i know it but no one answer where must i learn android app? [06:51]
abclove ( [06:51]
surial abclove: then wait or google. This channel is not about android. [06:51]
x256 abclove: Android is java (the language) but not java (the ecosystem). You don't get any android help here. [06:51]
sonOfRa #android-dev is the appropriate channel for it. [06:52]
abclove x256: i know it so i want to go to #android-dev [06:52]
x256 Type "/j #android-dev" and hit enter. [06:52]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [06:56]
hojang [hojang!hojang@nat/redhat/x-tmeundsldzwxkjuc] has joined ##java [06:58]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [06:59]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [07:00]
deavmi_ [deavmi_!~deavmi@165.0.49.39] has joined ##java [07:01]
dreamreal and the "/leave ##java" depending on what IRC client you use [07:09]
x256 dreamreal: So interests in java and android development are mutually exclusive? [07:11]
dreamreal x256: no, not at all. But have you any memory of abclove's interactions here? [07:11]
x256 dreamreal: I have a very selective memory of stuff I read on the internet, including this channel :) [07:13]
dreamreal x256: okay. Imagine a fountain of intellect, right? Eagerness to learn, incisive. Now turn the fountain off. [07:13]
dreamreal x256: Now that it's off, imagine a meteor crashing into it. Now it's a crater, right? Name that crater abclove. [07:14]
dreamreal That's almost an apt analogy. The reality is worse. [07:14]
newbieG [newbieG!~bhaskar@27.61.110.230] has joined ##java [07:17]
Jonopoly Fixed my issue [07:20]
dreamreal woohoo! [07:20]
Jonopoly Did Paths.get but didn't include whole string just upuntil file.csv [07:21]
Jonopoly Paths.get(attachments\\stuff_) [07:21]
Jonopoly file.csv :D [07:21]
abclove it is good idea to learn making android app? [07:24]
abclove I already learn java nevertheless it is not perfect [07:24]
abclove yet [07:24]
Jonopoly can be, android is quite fun [07:25]
abclove fun :) [07:25]
dreamreal abclove: you will not be able to do well [07:25]
dreamreal and I'm afraid that you have not learned java at all. Halfway through HF2? You should have learned java in the first 50 pages. [07:26]
dreamreal If not earlier. [07:26]
abclove i will start it with youtube first [07:26]
dreamreal if you learn like that, that's great. Good luck. You'll need it. [07:27]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [07:27]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [07:27]
abclove oh my god kotlin is default :( [07:28]
abclove what is kotlin? [07:28]
dreamreal kotlin is not default. [07:29]
dreamreal kotlin [07:29]
dreamreal Kotlin is a statically typed JVM language created by JetBrains that supports properties and null safety in the type system. It is very similar to java. https://kotlinlang.org/ [07:29]
Bombe That amuses me. [07:29]
abclove android studio use kotlin as default [07:29]
abclove ( [07:29]
puppy_za uh [07:29]
Bombe abclove, have you considered that programming is maybe not your forte? [07:29]
dreamreal oh well. [07:30]
dreamreal Bombe: I asked that yesterday. Don't be mean by asking a question that everyone wonders! [07:30]
Bombe This all seems very forced. [07:30]
abclove Bombe: it is my part [07:30]
Bombe abclove, that doesn?t tell me anything. [07:30]
abclove Bombe: ? [07:30]
dreamreal your... part? What does that mean? (It's okay that ENGLISH is not your forte; lots of native english speakers have the same problem. But if you're trying to program, PROGRAMMING not being your forte IS an issue.) [07:30]
royal_screwup21 [royal_screwup21!5661e695@gateway/web/cgi-irc/kiwiirc.com/ip.86.97.230.149] has joined ##java [07:30]
Bombe abclove, yes, that about sums it up. [07:30]
Bombe A big question mark. [07:31]
abclove anyway i will use java [07:32]
dreamreal I see a bright future for you in programming. [07:32]
abclove no time to learn kotlin anymore :( [07:32]
dreamreal (Because the explosion will put out a lot of light.) [07:32]
Bombe Photons! \o/ [07:32]
dreamreal you mean: photons! _\|/_ [07:33]
Bombe Photons are totally the light of my life. [07:33]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [07:33]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [07:33]
dreamreal A photon checked into a flight at the airport, the desk said "any bags, sir," and the photon said, "No, I'm travelling light." [07:33]
Bombe Ah, light humour. How enlightening. [07:35]
dreamreal It's quick, has pretty much no weight to it... [07:36]
dreamreal ba-dum-tssssss [07:36]
dreamreal You know, that sound is played on the drums, and is referred to as a "ruffle," which mostly makes me want potato chips. *sigh* [07:37]
dreamreal I don't even LIKE those potato chips. [07:39]
abclove i m afraid that i must learn kotlin too :( [07:40]
abclove google make kotlin? [07:40]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [07:40]
dreamreal no. As the factoid said very explicitly, jetbrains made kotlin. [07:41]
Bombe dreamreal, I think your brain is wired weirdly. [07:41]
dreamreal Bombe: it is. :( [07:41]
puppy_za dadjoke is incurable [07:42]
Bombe dreamreal, maybe you can retrain it to want chocolate cookies instead? [07:42]
abclove JetBrains :( strange it is sf movie [07:43]
dreamreal Bombe: ew, chocolate [07:43]
Bombe dreamreal, let me adjust my earlier statement to ?really weirdly.? [07:43]
Chernabog_ [Chernabog_!~Chernabog@gate.fleeture.de] has joined ##java [07:45]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [07:55]
newbieG [newbieG!~bhaskar@27.61.110.230] has joined ##java [07:59]
taylan [taylan!b2cb92fc@ip-178-203-146-252.hsi10.unitymediagroup.de] has joined ##java [08:10]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [08:12]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:b160:9817:f690:c4ec] has joined ##java [08:13]
taylan one of my main gripes with Java is the code bloat of getters/setters and how this makes me often settle with public fields and that I then can't transparently change "obj.field = value" to become a setter call. is there anything planned in the future of Java to improve this? for instance (brainstorming): a special type of field declaration like [08:15]
taylan say "encapsulated String foobar;" which automatically turns dot-notation accesses into calls to default getters/setters that can be overridden later? [08:15]
dreamreal lombok [08:15]
dreamreal dreamreal, lombok is a tooling (compiler and IDE) plugin that removes boilerplate. For example, it adds getters, setters, equals, hashCode, builders, etc for you. Works in eclipse, intellij, netbeans, javac, maven, ant, etc. https://projectlombok.org/ [08:15]
dreamreal kotlin [08:15]
dreamreal Kotlin is a statically typed JVM language created by JetBrains that supports properties and null safety in the type system. It is very similar to java. https://kotlinlang.org/ [08:15]
dreamreal kotlin actually does that already: class Foo { var bar:String="baz" } actually creates getBar() and setBar(String), and using foo.bar="blech" *calls* setBar() transparently [08:16]
taylan I might get into Kotlin eventually but my main problem is it's too different from Java [08:17]
dreamreal It's... what? [08:17]
taylan looking into Lombok, thanks... [08:17]
dreamreal one of kotlin's primary strengths over other JVM languages is that from a design standpoint it's almost identical to java, esp compared to similar attempts like scala [08:18]
dreamreal groovy's more like java than kotlin, but it lacks the tipping points to make it actively (or arguably) better like kotlin does [08:18]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [08:23]
SmearedBeard [SmearedBeard!~SmearedBe@unaffiliated/smearedbeard] has joined ##java [08:31]
abclove i don?t know it is good or not when i learn java i watch youtube video [08:33]
abclove ( [08:33]
abclove when i learn android i watch youtube video [08:33]
dreamreal abclove: it depends on if you LEARN. People learn in different ways. Some read. Some listen. Some do. Some watch. It's fine. The key is whether you LEARN. So far, you've done little of that. [08:34]
Bombe abclove, you know, at a certain point we don?t really care anymore? [08:34]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [08:34]
dreamreal I think it's safe to say that you don't learn by reading. Watching, well... that's a possibility. Try it. If you fail at learning by watching, well, that eliminates most of the internet, since you don't learn by reading. [08:34]
abclove ok at first it is better to watch video than to read book [08:35]
dreamreal finds videos entirely useless for learning, usually [08:35]
taylan so about this "both methods have same erasure but neither overrides the other" error. it arises when the method signatures are the same after type erasure, right? in that case, why doesn't the one in the subclass override the one of the superclass? I simply want my subclass to apply a tighter constraint to a type parameter, but can't seem to do [08:36]
taylan it because of this error. is there a better way to do that? [08:36]
dreamreal generics [08:37]
dreamreal taylan, For a tutorial on generics, please see http://docs.oracle.com/javase/tutorial/java/generics/index.html . Also, http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html is a great in-depth resource. [08:37]
CookieM [CookieM!~tomek@bjx195.neoplus.adsl.tpnet.pl] has joined ##java [08:37]
taylan dreamreal: what section of those should I be looking at? ^^ [08:39]
dreamreal Dunno, I'd look at the use of generics to provide the type signatures. But that tends to pollute your hierarchy. Sometimes there's not a good solution. [08:39]
Bombe taylan, have you tried putting the error message into your favourite search engine? [08:40]
Bombe Because I got a single hit that explained it. [08:41]
taylan I think my problem is a bit more specific than most of those results... e.g. in my case it's a single method that has a type parameter and is overridden in a subclass. [08:42]
cheeser sounds like a job for PECS [08:43]
dreamreal pecs [08:43]
dreamreal dreamreal, pecs is Producer extends, Consumer super: http://i.stack.imgur.com/KjDLw.png [08:43]
cheeser generics aren't intrinsicaly covariant. [08:43]
dreamreal taylan: basically, you're doing it wrong for java [08:43]
dreamreal you see the same sort of issue in the entire hierarchy (see: equals()) [08:43]
Bombe It?s probably a method with a type parameter in a class that is not generic. [08:43]
dreamreal (also see: compareTo) [08:43]
dreamreal There are ways. But there's a cost associated with it. [08:44]
taylan Bombe: correct [08:44]
wedr May I ask, does Java use more heap space in the memory? If yes, does Java use more heap than other common languages? Or that Java is known for using the heap space more often than the stack memory? That's 3 questions. I and another person were in a discussion about Java, and these 3 questions came up that I don't have the confidence to answer. [08:44]
taylan wedr: more heap space compared to what language? :) [08:45]
dreamreal wedr: uhhhh [08:45]
wedr taylan, The original question only brought up "common languages", which I think it refers to C,C++, C#, etc. [08:45]
Bombe taylan, funny, the hit I mean is exactly that situation. [08:45]
dreamreal wedr: 1) more heap space in the memory: for comparison, you must have at least two things to compare. This question is flawed. 2) It can, and probably prefers to, but without a specific comparison point, it's hard to know. Java uses managed regions and it's amazingly good at it. #3) probably. [08:46]
wedr dreamreal, I see. I think I will just copy/paste your answers so I can win some arguments in the discussion. (I'll credit you of course.) [08:46]
puppy_za O_o [08:47]
surial wedr: Oversimplifying a lot: Java is quite good at memory management and tends to run apps 'efficiently', in that you have to go out of your way to handroll your data structures and micromanage the crap out of them if you want to get to a scenario where code written in java will bomb out with a memory error but your hand tuned stuff won't. [08:47]
dreamreal I really don't like proxies for such things. [08:47]
wedr Ah, sorry, I didn't do anything yet. [08:47]
dreamreal I'd rather offer the answers myself. Where is this? [08:47]
surial wedr: HOWEVER, java still thinks it usually runs on servers (probably because it does): It is its own little computer. Just like, if you start a windows virtual machine on your mac, you have to specify beforehand that it gets to act like it has 2GB, and then your virtual machine seems like it is 'eating' 2 GB but really it isn't.. java works somewhat similarly. your kernel/OS says: That VM is taking 3 GB omg!!!! but that's not [08:48]
surial really what happened. java has reserved 3GB because it (correctly!) thinks it can manage memory better than the OS can for its application. [08:48]
wedr It's in ##programming, but the discussion shifted to Rust. :( [08:48]
dreamreal okay. [08:48]
surial TL;DR: Java is efficient with memory, however, it doesn't play particularly nice on systems running tons of other apps at the same time. Also, don't trust kernel/OS reports. [08:48]
ravenousmoose [ravenousmoose!~ravenousm@ptr-cud5aqec0ue4d3rm246.18120a2.ip6.access.telenet.be] has joined ##java [08:48]
wedr That's fine, the discussion is dropped, so I'll not do anything [08:48]
wedr But I'm learning something new. Let me read a bit from surial [08:49]
wedr ok, so in Java, if you declare "new" on an object instance, that tends to be stored on the heap. If you declare a "primitive" instance, like int, float, etc., then those are stored on the stack. [08:51]
surial oh, and one more thing: "how much memory does this process take" sounds simple but it really isn't: There's such a thing as shared libraries. So, if 15 apps all use the same shared lib, and that shared lib eats 1500MB, how do you do this? List the lib as a separate process? No kernel does that; it's not a process. Divide the 1500 amongst the 15 processes and show each process as eating 100MB worth? Okay.. do you list the kernel [08:51]
surial itself which usually uses ALL of the core libs as 1 process? Whose actual memory load bounces up and down WILDLY because apps are starting and stopping, so the divisor changes? Maybe this is the most fair but it's also not very useful. So, in practice, many memory reporter tools mark _ALL_ of teh 15 processes as having +1500MB, and then their sum total vastly exceeds your RAM, and yet.. that's not actually how much RAM is used. [08:51]
dreamreal wedr: um, not quite. It depends on where the declarations go. [08:52]
dreamreal void foo() { int bar=9; } // bar will "live" on the stack [08:52]
surial wedr: java on bootup immediately 'opens up' ALL the shared libraries it uses to interact with the OS. So, even if you aren't going to do anything whatsoever with the network, java will hook into the network API. Which means java gets the crap end of the stick for the reporting. Java telling the OS: I might do network stuff later will mean it gets a +50MB to its memory load, even though the ACTUAL memory load on your hardware [08:52]
surial didn't change at all. That network lib is already open and will remain open. [08:52]
wedr Oh, I'm just reading from here, https://www.baeldung.com/java-stack-heap where it said "All the newly created objects are stored here on the heap space". [08:52]
wedr wedr's title: "Stack Memory and Heap Space in Java | Baeldung" [08:52]
dreamreal void foo() { String bar="baz"; } // the *reference* will be on the stack, the actual value will be *presumably* on the heap [08:52]
dreamreal (it's a constant in the example, so the actual allocation might not be on the heap at all) [08:53]
surial wedr: [1] primitive aren't instances. [2] fields are always on the heap, even primitive fields. [3] other than that, yeah, basically. [08:53]
wedr I see [08:53]
dreamreal surial: hmm, so void foo() { int bar; } // bar is on the *heap*? [08:53]
wedr That I'm sure "bar" is on the stack [08:54]
surial dreamreal: no, because bar is not a field there. [08:54]
dreamreal okay, that's consistent with what I was saying then [08:54]
wedr Thanks surial and dreamreal for that. [08:54]
surial class Foo { int bar; } // here any version of 'bar' that ends up existing will be on the heap one way or another. [08:54]
surial dreamreal: yes :) [08:54]
dreamreal wedr: ^^ see the difference in the "bar" declarations? One's a primitive allocated in a method, another is an OBJECT allocated in a method, the third is an attribute of a class [08:55]
surial wedr: oh, and, coming attraction: Team Valhalla (employed by oracle right now, led by Brian Goetz) is working on value types for java. These act, memory-wise, like primitives, but aren't. Which means they end up on stack. [08:55]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [08:55]
wedr Is that for Java 13? [08:55]
dreamreal ... maybe. We're not sure yet. [08:56]
surial so one day, probably around java v15, you could have: "publi class Something { Point p = Point(2, 3); } and The whole thing, all of it, will all be on the stack. [08:56]
surial err, correcetion, that's a field, those gotta be on heap. I meant.. [08:56]
surial er, public class Something { public void foo() { Point iWillBeEntirelyStackBased = Point(2, 3); } [08:56]
Bombe Well, now I am confused! [08:56]
surial where Point is: 'public value class Point { int x, y;} [08:56]
surial Bombe: which bit confuses? [08:56]
Bombe Everything! [08:57]
surial oh dear. [08:57]
wedr I see [08:57]
surial Bombe: well, don't eat yellow snow. It all started with the big bang. Water is wet. [08:57]
wedr I understand fully now, so good luck Bombe [08:57]
dreamreal surial: incidentally, "it" in context of everything starting with the big bang, is limited :) [08:57]
Bombe Uuh? what was the bit after the snow? Got sidetracked there by thinking about husky puppies. [08:57]
surial P [08:58]
dreamreal current prevailing thought is that the big bang followed a gnab gib, which itself followed a preceding big bang... [08:58]
wedr The banging is becoming more and more rhythmic [08:58]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [08:58]
dreamreal right, like God playing drums on a kit that's unimaginable in size [08:59]
dreamreal just sent apologeticists like William Lane Craig into apoplexy :) [08:59]
Bombe But how you gonna mic that kit? [09:00]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [09:00]
dreamreal Bombe: glyn johns method, of course, otherwise it takes up too many channels on a mixer [09:00]
very_sneaky [very_sneaky!~very_snea@221.121.132.89] has joined ##java [09:00]
Bombe The fuck you mixing on a Xenyx502 or what? [09:01]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:01]
Bombe You should be able to spare at least one layer of faders for the drums. [09:01]
dreamreal Bombe: *I* record on a tiny four-channel A/D, so it's glyn johns or nothing [09:01]
dreamreal but then again, a lot of motown was recorded on a MONO input for dums [09:02]
dreamreal drums [09:02]
Bombe Well, true, there are a lot more important factors than number of mics when recording drums. We digress, though. [09:02]
taylan I'm guessing Java also does some unboxing optimizations when you use instances of Number? [09:03]
taylan whoops, I had scrolled up and was 5 minutes in the past in the convo [09:03]
dreamreal Bombe: do we, though? ... I guess we do. Although Cherry Audio has a Euclidean rhythm generator, written *in java*, available for their modular synth... [09:04]
freeone3000 taylan: No, you get the full function call, it's just hidden. There's a JEP [09:04]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [09:06]
taylan freeone3000: for each theoretical unboxing operation? like when I do (very dumb example): Integer x = 5; int sum = 0; for (int i = 0; i < 999999; ++i) { sum += x; } will it call the unboxing method on x for every single iteration? [09:07]
freeone3000 taylan: It's not a big deal. [09:08]
dreamreal taylan: if you have an SLA and you're missing it, run a profiler, measure. If you see unboxing being a problem, THEN worry about it. [09:08]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [09:08]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [09:09]
taylan sure, I'm just wondering how smart the optimizer is [09:09]
Bombe Smart enough. [09:09]
dreamreal taylan: "damned" [09:09]
taylan if it is damned smart, I'd expect it to unbox x once in that example :D [09:10]
Bombe I wouldn?t be surprised at all if the compiler already optimized all that into a single assignment. [09:10]
dreamreal taylan: I know of two or three programmers who can outsmart the java optimizer, who can write code to directly influence what it does, for better or for worse. You'd probably recognize the names. (You might not, but you should.) There might be others, but it's an amazingly exclusive group and I'm definitely not in it. [09:10]
mgrech__ [mgrech__!~mgrech@188-22-224-43.adsl.highway.telekom.at] has joined ##java [09:11]
freeone3000 javac doesn't do that optimization. It'll do AVX for that. JIT might optimize that into single assignment. [09:11]
dreamreal I am, however, blessed to have had access and conversations and acquaintances with such people. [09:11]
taylan I don't know of any famous Java programmers I'm afraid ^^ my interaction with Java is mostly limited to Android development at work, with little to no private interest (though I have grown fond of many aspects of it) [09:12]
wedr My experience is limited to JUnit [09:12]
freeone3000 The Android runtime is completely different, so all of the optimizations are completely different. [09:12]
dreamreal That's fine. I'm just saying that the JIT is *amazeballs* [09:12]
wedr The only issue is not being able to JUnit test multi-threaded SQL transactions. :( [09:12]
dreamreal wedr: JUnit can do it, you just have to know what you're about. [09:13]
dreamreal work out what the testing conditions are, *write them in a test* [09:13]
anirban [anirban!~anirban@unaffiliated/apostasy] has joined ##java [09:15]
wedr Hm... the testing condition is, if a SQL transaction on a separate thread has executed, attempt to determine if the data has been modified or not. No guarantees the transaction is "instant", and you can't change production code. [09:16]
goatish [goatish!~gffryclrk@9.134.198.104.bc.googleusercontent.com] has joined ##java [09:16]
wedr I'm just sitting here scratching my head sometimes [09:16]
wedr hairs falling out because of this [09:16]
wedr ( [09:16]
Bombe Sounds pretty straight forward. [09:16]
Bombe Unless that second thread is not started by the test. [09:16]
dreamreal wedr: so: create an executor service. Start the transaction. After the provided time, check the result. It means your test MIGHT take up to 20 seconds or whatever. [09:17]
wedr the second thread is started by the test, but to do assertions is unpredictable. [09:17]
dreamreal You use an executor so you can interrupt the wait if necessary. [09:17]
wedr Executor service... [09:17]
surial taylan: javac is intentionally stupid. As in, quite unlike C and co, the spec is extremely definite: THIS java source file should be translated into precisely THIS class file, byte for byte, and here is the (extremely simplistic and short) list of optimizations you are allowed to apply. [09:17]
wedr Let me think for a bit on this [09:17]
surial taylan: the smarts are all at runtime. java.exe when running the code will optimize. There are -XX switches to make it print the hotspotted machine code. [09:18]
Bombe wedr, just notify your test thread from the second thread that it has finished? Doesn?t sound that complicated but maybe I?m missing something. [09:18]
surial if you really wanna know, check that out. But note that the VM will optimize only usefully. For example, if on some arch+kernel combo there is no real gain to be had by unboxing only once, for some reason, then it won't bother optimizing for that. [09:18]
wedr no, I checked the production code, there is a second thread created that does Hibernate operations. The only public method from the object I'm testing for is a static method that creates a new thread. [09:19]
surial taylan: and where I said 'yo uare allowed to apply' I meant: MUST apply. The spec is such that any given java source file more or less needs to result in this exact byte-for-byte stream, there is virtually no leeway. [09:19]
wedr everything else are all marked as private methods. [09:19]
taylan surial: that's pretty neat [09:19]
very_sneaky i feel like i'm tilting at windmils here, but does anybody know if it's possible to recursively add a directory to the classpath when compiling using javac? [09:19]
surial taylan: that's where java can theoretically outperform C. In C, you have to, at compile (write) time, guess, for example, which of two choices in a branch is more likely. [09:20]
dreamreal what do you mean by "recursively add a directory to the classpath when compiling using javac? [09:20]
odinsbane very_sneaky: why would you do that? [09:20]
Bombe wedr, well, I guess you just have to stick to stuff you can observe, then? trigger the stuff being tested and wait until it?s complete (or timed out). [09:20]
very_sneaky `javac -cp some_dir/*: .` [09:20]
surial taylan: java can actually track which branch is the common path and eventually re-hotspot the code such that the more likely path is the fall-through (which is faster on most arch). In C you'd have to go out of your way to write a dynamic system that tracks intelligently and such. Tons of work. Java just gives you that everywhere for free. [09:20]
wedr Bombe, the second thread in the production code doesn't do any notifications (Object notify()). It's a daemon thread. [09:21]
very_sneaky in this case, it only checks `some_dir` for jar files, not the containing directories [09:21]
Bombe wedr, and mark the test with @Dirty. :) [09:21]
wedr Hm I guess [09:21]
dreamreal very_sneaky: okay, so ... why? [09:21]
surial the way java does garbage collection is also utterly infeasible in C and can outperform. In practice, handtuned C code wins more than it loses vs. java, but it's close. [09:21]
very_sneaky i'm wondering if there's a way to enumerate my maven repo [09:21]
conan [conan!conan@nat/redhat/x-nzznvgmoouriepvh] has joined ##java [09:21]
dreamreal very_sneaky: ... WHY do you want to? [09:21]
very_sneaky getting to it :P [09:21]
dreamreal Chances are that'd be useless for you [09:21]
Bombe wedr, daemen threadedness has nothing to do with that but if you don?t control this thread there?s not much you can do? besides refactoring! \o/ [09:21]
wedr Bombe, Yep, only a refactor can be done on this [09:22]
wedr And it's a huge 10-man team refactor. [09:22]
surial very_sneaky: java's built in * support only works on non-windows if you put the arg in single quotes, and only works if it's just a * and not "*.jar" or whatnot. It does not recurse. 'some_dir/*' means: each jar file in some_dir, directly. Any subdirs of 'some_dir' are not considered whatsoever. [09:22]
Bombe wedr, refactoring is fun! ?unless you don?t have tests. :) [09:22]
very_sneaky educational more than anything I guess. I'm wondering where the limits of compiling manually are - am i restricted to constructing an enormous classpath? or would the best solution be to copy the jar's all into a single dir? [09:22]
wedr Hence I'm writing the tests [09:22]
surial very_sneaky: having a hierarchy of dirs that contain jar files is... fucked up. I don't know of any system or deployment that works this way. If you must have this, tools like ant can trivially do it, but.. yeah, why? [09:22]
wedr My task is to get 100% code coverage, so that when everyone does the code refactoring, they have something to compare with [09:23]
dreamreal very_sneaky: wh... okay, fair, but honestly? This is wasted effort. NOBODY compiles manually. [09:23]
wedr it's really hard for that SQL transactions. [09:23]
dreamreal wedr: 100% code coverage on a real codebase is tragically difficult and virtually worthless [09:23]
very_sneaky yeah i understand haha [09:23]
surial very_sneaky: take a step back though. Think of the 'process'. [09:23]
Bombe wedr, well, 100% coverage is nice on paper but it?s not always the wise choice. [09:23]
wedr dreamreal, Ok, 99% [09:23]
wedr I will bite, 100% is impossible [09:23]
taylan surial: I think there's this thing called "profile-driven optimization" for C where you feed the optimizer profiling results of previous runs of the program so it can make better choices, but getting that for free (and probably having it even smarter) is neat of course ^^ [09:23]
dreamreal wedr: wanna know a secret? (No, 100% is not impossible.) [09:23]
very_sneaky surial: maven seems to organise all of the dependency jars into a hierarchical structure though, so wouldn't this be a case of exactly that? [09:24]
Bombe Oh, it might be possible but the last 2% are _hard_. [09:24]
Bombe And not worth it. [09:24]
surial very_sneaky: the process is to enumerate EXPLICITLY your dependencies. For the same reason star imports are annoying, a more blanket 'eh, fuck it, whatever jars you can find in this dir, just shove em in there'. That's a bit of a shotgun approach; hard to duplicate on other dev machines, hard to update. Imagine you get news of a security leak in this-or-that v1.18... [09:24]
dreamreal taylan: and what happens when the runtime behavior changes due to circumstances? [09:24]
taylan exactly [09:24]
wedr dreamreal, Unless you have null checks on Hibernate models marked with @Column(nullable = false) [09:24]
dreamreal wedr: Dude. Don't tell me what I know. [09:24]
wedr of which, the code it runs on to clean up the database is basically not runnable [09:24]
dreamreal Especially if you're not correct. :) [09:24]
surial very_sneaky: Now, HOW you then implement such a process where you explicitly enumerate ALLLLL your deps? Up to you, but EVERY build system (and yes, this OBVIOUSLY means rolling with simple command line commands is fucking insane, we're scripting this, of course, and the scripts get complex enough that you really, really don't want to use bash for this. Hence maven, gradle, etc) - every build system just explicitly enumerates [09:25]
Bombe Hehe? [09:25]
surial them to javac with -cp really:long:list [09:25]
dreamreal wedr: here's the thing: if you want GOOD code coverage? Target 70%. Maybe 80% if you're nuts. [09:25]
dreamreal wedr: The dirty little secret is that code coverage does NOT assure that the code is any good. [09:25]
surial very_sneaky: Now, if you want to change the process, hey, if you grok the process, be my guest. If you have tooling that explicitly enumerates deps, then _COPIES THOSE INTO A LIB DIR_, and you then compile with javac -cp 'carefullyCuratedGeneratedListOfExplicitlyNamedDeps/*' src/whatever/*.java ? okay. [09:25]
Bombe I have a project with 80% coverage but there?s still large gaps that I intend to close! [09:25]
wedr dreamreal, Aiming to do so. I have thus far uncovered some weird programming codes in the process. [09:26]
dreamreal Bombe: I tend to get in the upper 90s myself when I care, but ... [09:26]
surial you should probably be more worried about listing multiple source dirs. That's where javac is headscratchingly stupid. you have to lit them all. The lack of recursion there is.. dumb. [09:26]
very_sneaky surial: yep, okay cool. noted [09:26]
dreamreal wedr: if you want to actually get valuable results, write *good functional tests* and eliminate code that doesn't serve those functional tests [09:26]
sonOfRa surial: isn't the problem with recursion there the whole directory structure == package structure deal? [09:26]
dreamreal like, figure out what the software is actually supposed to do, exactly, and test that it does exactly that [09:27]
sonOfRa Would be a lot of annoying work for the compiler to have to figure out where each of the recursive source directories starts [09:27]
dreamreal if code doesn't get run as part of the functional tests that are accurate and complete, it's not useful code, delete it [09:27]
wedr dreamreal, That includes optional settings configurations done by the end user? If yes, then I'll get to it. [09:27]
Bombe Deleting code is cool. [09:27]
dreamreal wedr: sure. [09:27]
wedr dreamreal, Thanks [09:27]
dreamreal If that's part of the spec, then you should be able to write a test for it. [09:28]
wedr Bombe, Depends [09:28]
sonOfRa Most of the non-covered code in my more recent code is checked exceptions that... just don't happen [09:29]
sonOfRa Like a JVM that doesn't support AES128 [09:29]
dreamreal sonOfRa: yep, that's most people's code. :) [09:30]
wedr Yes, some of the non-covered code that I'm working on includes error logging and stuffs [09:30]
wedr Don't need to cover those [09:30]
sonOfRa And I don't even know how I would write test code that *forces* that code to be ran [09:30]
dreamreal checked exceptions wreck coverage numbers, esp when they have to handle circumstances that don't/can't happen or are very difficult to recreate [09:30]
wedr Mockito can help [09:30]
wedr (to an extent...) [09:31]
dreamreal yes [09:31]
sonOfRa yes but mocks are fucking dumb [09:31]
cheeser indeed. [09:31]
Bombe You can always put in more abstraction layers to reduce gaps in your coverage! [09:32]
Bombe However, that?s the opposite of deleting code. [09:32]
cheeser every problem can be solved with more layers of abstractiton [09:33]
Bombe Except for ?too many abstractions.? [09:33]
cheeser well, one more layer will hide all those other abstractions [09:34]
Bombe The abstraction to abstract all abstractions! [09:34]
cheeser i call it The Turtle [09:35]
Bombe Abstractions, all the way dows. [09:36]
Bombe s/ws/wn/ [09:36]
conan [conan!conan@nat/redhat/x-qggrqqmoejbosedj] has joined ##java [09:36]
mbooth Terry's got a lot to answer for. Shame he selfishly went and died on us... [09:37]
Bombe I believe that?s Sir Terry, if you please. [09:37]
dreamreal Well, is Terry complaining? >:( [09:41]
sbalmos dreamreal: We can complain, in absentia/posthumously? [09:43]
cheeser not here at least ;) [09:44]
sbalmos cheeser: I wish to lodge a complaint! (Dead Parrot-style) [09:45]
cheeser SHUT YOUR GOB YOU FESTERING TIT! [09:45]
sbalmos O_O but... I was looking for an argument [09:46]
Bombe No, you weren?t. [09:46]
SJr Does anyone know or have any sources if whether shipping the MySQL Connector/J JAR 5.1 requires your program to be GPL? [09:50]
SJr Version 8 contains an exception, but I can't find anything for 5.1. [09:50]
taylan SJr: why not jtds? [09:51]
SJr Why JTDS? [09:52]
wedr We use MySQL Connector 5.13, and we aren't GPL compliant. [09:52]
wedr I think [09:52]
cheeser taylan: jtds is for sqlserver [09:52]
sonOfRa taylan: probably because you can't connect to mysql with it? [09:53]
cheeser SJr: you don't need to be GPL no [09:53]
taylan oh sorry, I thought jtds implemented mysql too [09:53]
cheeser not afaik [09:53]
SJr cheeser, thats what I'm thinking, but I'm not sure why, and I need something to satisfy the lawyers. One argument is that we don't link to it, we are just linking to the JDBC apis (and even then not really), so I'm not sure if that counts as a derived work. [09:53]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [09:54]
cheeser randos on irc are hardly going to satisfy the lawyers. [09:54]
dreamreal SJr: what you NEED to do then is TALK TO THE LAWYERS and have them look at the language. If you are merely using GPL libraries, I don't think it pollutes your code... but we're not lawyers. [09:54]
SJr Yeah that's why I wanted sources from the people I trust the most, people like you cheeser. [09:54]
cheeser but yes. that's going to be true wrt the mysql driver [09:54]
led_dark_1 [led_dark_1!~Thunderbi@217.66.160.14] has joined ##java [09:54]
cheeser SJr: i have an investment for you in that case. [09:54]
dreamreal cheeser: but you sold ME that bridge last week? How's that monopoly money working out for you? [09:55]
Chernabog_ [Chernabog_!~Chernabog@gate.fleeture.de] has joined ##java [09:55]
SJr dreamreal, yes but I was just hoping someone had an inkling who had dealt with this before :( [09:55]
cheeser dreamreal: considering i sold it 8 times so far, *really* well. [09:56]
dreamreal SJr: that's fine. But that won't satisfy YOUR lawyers. They need to look at the GPL text themselves. [09:56]
dreamreal cheeser: heh [09:56]
dreamreal SJr: Java mangles the GPL pretty badly, because of java's late binding. Lawyers love that crap. Have fun. [09:57]
cheeser the easy fix is to switch to pgsql [09:58]
SJr I just got approval to switch to jetty from tomcat so I won't be pushing my luck on that front yet :) [09:59]
VegetarianFalcon [VegetarianFalcon!uid258908@gateway/web/irccloud.com/x-qgptgacjxyxfzylo] has joined ##java [09:59]
learningc [learningc!~learningc@218.111.14.130] has joined ##java [10:00]
Karyon_ [Karyon_!~Karyon@unaffiliated/karyon] has joined ##java [10:09]
mindCrime_ [mindCrime_!~mindCrime@216.85.170.148] has joined ##java [10:17]
conan [conan!~conan@85.255.232.4] has joined ##java [10:21]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [10:21]
abclove java ?> android app : this is good idea? or can i do something with java? [10:23]
dreamreal android [10:23]
dreamreal Android is Google's OS based on Linux and a non-Java-bytecode Virtual Machine. See http://developer.android.com/ . Start in #android-dev if you have Android development questions - and if you use Android's API or you're running it on Android, you have an Android development question. [10:23]
dreamreal you've been told this multiple times. [10:24]
progart [progart!~kamee@188.115.226.25] has joined ##java [10:24]
dreamreal Shall I make a video for you and put it on youtube? Maybe you learn better than way; I don't know. [10:24]
kicked abclove (abclove) [10:24]
very_sneaky i thought he'd asked his last question yesterday [10:27]
dreamreal they're not .. very... uh... what's the word [10:28]
dreamreal It would be "intelligent" but that has too many syllables [10:28]
very_sneaky lol [10:29]
cheeser smort [10:30]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:31]
puppy_za just wondering his age and all [10:32]
puppy_za but maybe that's irrelevant [10:32]
dreamreal you'd have to ask. The persistence is admirable... the goal seems unattainable given progress [10:32]
SJr lol dreamreal [10:34]
Wixy [Wixy!ba32dcc2@unaffiliated/mplabs] has joined ##java [10:36]
puppy_za well, I probably will ask if he comes back [10:36]
dreamreal They will. See "persistence" above. Kicks have been applied, honest and heartfelt advice to find other gainful pursuits has been offered... all for nothing [10:37]
mitch0 yay, put some more ram into the laptop, and now idea is a lot less sluggish... bit of a shame though that 8GB was not enough... [10:38]
dreamreal mitch0: you know that you can adjust the IDEA VM parameters inside IDEA, right? Adding RAM doesn't change the VM invocation in and of itself [10:39]
puppy_za well maybe it swaps less now he has more RAM :p [10:39]
mitch0 dreamreal: apparently the default config is optimized for more than 8GB :) [10:40]
dreamreal Sure. But that'd be because the settings weren't appropriate for his specific environment in the first place. [10:40]
puppy_za true [10:40]
dreamreal mitch0: see idea.vmoptions - I think it only allocates 2G of ram as a max by default [10:41]
learningc [learningc!~learningc@121.122.76.45] has joined ##java [10:41]
mitch0 apparently it's 924MB only. but it starts a maven server with 768MB, too (and I don't have maven projects...) [10:44]
dreamreal ouch. I wonder if there's a way to turn that off... [10:45]
mitch0 probably [10:46]
RedSoxFan07 [RedSoxFan07!~Thunderbi@d-137-103-109-45.ct.cpe.atlanticbb.net] has joined ##java [10:51]
mitch0 hm. the obvious setting didn't do that ;) [10:51]
freeone3000 I've only given IDEA 36GB and it's happy as a clam. [10:52]
cheeser 8G hasn't been enough for a dev machine for a while now [10:53]
mitch0 cheeser: it was perfectly enough for me until I switched to idea ;) [10:53]
mitch0 anyway, all is well now (almost, need to find a way to kill off this maven build server if possible) [10:53]
Wixy Hey all. I'm trying to create a jar file in a new Intellij Gradle project. the problem is for some reason a "Main-Class" is not added in the Manifest. What could have gone wrong? [10:54]
Wixy The error is "no main manifest attribute", which is indeed true [10:55]
dreamreal Wixy: chances are you're not setting the main-class attribute properly. [10:55]
yawkat whats your gradle config [10:55]
dreamreal Is it an executable project? not a library? [10:55]
Wixy let me paste the build.gradle file, but it's pretty strightforward [10:56]
mitch0 dreamreal: ok, I give up. where can I disable the maven server? :) [10:58]
conan [conan!~conan@85.255.232.4] has joined ##java [10:59]
dreamreal mitch0: I don't know! I said "i wonder if there's a way to turn that off..." because I wondered if there was a way to turn that off [10:59]
Wixy https://gist.github.com/emmx/583b7c3c51899d5e55f02aa7c6c36f7e [10:59]
Wixy I have a "Main-Class" attribute in there, I guess that's all I need [11:00]
mitch0 dreamreal: hah, I thought it was the usual snarky dreamreal comment ;) [11:00]
dreamreal otherwise, I'd have just told you, I'm not a jerk! [11:00]
enoq [enoq!~textual@212-186-80-213.static.upcbusiness.at] has joined ##java [11:00]
dreamreal Wixy: um... okay, that's not an application's build script [11:00]
Wixy Then on the project settings I created an artifact [11:00]
dreamreal Wixy: you'd do ALL of that in the build.gradle [11:01]
dreamreal Wixy: which version of gradle are you running? [11:01]
Wixy 4.4.1 [11:01]
puppy_za Wixy: have you seen this one? https://stackoverflow.com/questions/24924932/gradle-could-not-find-or-load-main-class [11:02]
dreamreal hmm, well, they're on 5.6.2 now if memory serves. With recent versions, gradle init actually asks you questions about the project you're trying to build and can add the application plugin (and configure it) for you, as an example [11:02]
puppy_za yeah, the application plugin is also needed, if I recall [11:03]
Wixy Ok, so I'll upgrade it and ask again if things still go wrong [11:03]
Wixy Do you recommend gradle over maven or any other? I actually didn't know what to use [11:04]
dreamreal Wixy: if your project is bog-standard, I'd say use maven, personally [11:05]
Wixy Okay, it is standard yeah. What would you use Gradle for? I was expecting a "it doesn't matter" :P [11:06]
TheJollyRoger [TheJollyRoger!~Peter@gateway/tor-sasl/thejollyroger] has joined ##java [11:07]
dreamreal Wixy: in practice, it really doesn't matter. Gradle's better for giving you more control over the builds, and the scripts are far more concise. But IMO it's slower (note "IMO" - I haven't measured) and I actually rarely NEED gradle's features. [11:08]
Wixy Got it [11:08]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [11:10]
rippa [rippa!~rippa@ppp-vpdn-37.1.85.157.yarnet.ru] has joined ##java [11:12]
mitch0 disabled the maven plugin completely for now, that did the trick [11:15]
dreamreal mitch0: you should document that somewhere where google can see it, casual search didn't turn that up [11:20]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [11:20]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [11:37]
jesmon [jesmon!~user@204.134.232.60] has joined ##java [11:45]
learningc [learningc!~learningc@121.122.76.45] has joined ##java [11:46]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [11:59]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [12:00]
newbieG [newbieG!~bhaskar@27.61.110.230] has joined ##java [12:08]
learningc [learningc!~learningc@121.122.76.45] has joined ##java [12:09]
TheJollyRoger [TheJollyRoger!~Peter@gateway/tor-sasl/thejollyroger] has joined ##java [12:15]
newbieG [newbieG!~bhaskar@27.61.124.44] has joined ##java [12:16]
t3ch [t3ch!~t3ch@unaffiliated/t3ch] has joined ##java [12:16]
manualcrank [manualcrank!~manualcra@bras-base-mtrlpq2718w-grc-11-70-24-187-214.dsl.bell.ca] has joined ##java [12:19]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [12:20]
winfli [winfli!~Thunderbi@201.139.119.82] has joined ##java [12:27]
sdu [sdu!~doo@athedsl-169404.home.otenet.gr] has joined ##java [12:31]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [12:31]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [12:38]
bn_work [bn_work!uid268505@gateway/web/irccloud.com/x-hevgfrdopcoxpiwj] has joined ##java [12:40]
Naeblis [Naeblis!~Naeblis@unaffiliated/naeblis] has joined ##java [12:41]
johndoe231 [johndoe231!~johndoe@117.198.102.130] has joined ##java [12:45]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [12:50]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [12:51]
MR-D05 [MR-D05!~textual@72.240.36.59] has joined ##java [01:04]
otto_j [otto_j!~otto_j@otto.hadiko.de] has joined ##java [01:04]
rajrajraj [rajrajraj!uid72176@gateway/web/irccloud.com/x-hjlyxlargnmnwasr] has joined ##java [01:07]
donofrio [donofrio!~donofrio@host-232.subnet-17.med.umich.edu] has joined ##java [01:12]
learningc [learningc!~learningc@121.122.76.45] has joined ##java [01:12]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@162.233.183.109] has joined ##java [01:19]
johndoe231 [johndoe231!~johndoe@117.198.102.130] has joined ##java [01:19]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [01:19]
User__ [User__!~learningc@121.122.76.45] has joined ##java [01:27]
tachoknight_ [tachoknight_!~tachoknig@205.178.20.7] has joined ##java [01:38]
irrgit [irrgit!~ch33se@parajsa.chat] has joined ##java [01:43]
gelignite [gelignite!~gelignite@55d4afea.access.ecotel.net] has joined ##java [01:44]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [01:52]
deavmi [deavmi!~deavmi@165.0.49.39] has joined ##java [01:54]
soreau parted the channel: [01:56]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [01:59]
darkxploit [darkxploit!~jay@c-73-68-48-243.hsd1.ct.comcast.net] has joined ##java [01:59]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [02:03]
johndoe231 Hi, I am using groups in bean validation to validate a single entity in different forms (User is being validated in both login and registration but with different constraints). However, I have group sequences like: First, Second, Third which take priority while validating. So, if a constraint of the First group fails, it won't check for the second. But it seems like if I put the sequence interface to the [02:03]
johndoe231 validator, it gets validated regardless of which validation case this is in (Login or Registration) [02:03]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [02:04]
johndoe231 How do I make sure that if a constraint is in group Login and First, it should only get validated in Login and not in Registration? [02:04]
johndoe231 the validator is called like this: validator.validate(user, Case.Login.class, Sequence.class) where Sequence.class is actually a group sequence. [02:05]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:06]
baiguai [baiguai!~baiguai@c-73-181-176-71.hsd1.wa.comcast.net] has joined ##java [02:11]
dino82 [dino82!~deeno@unaffiliated/dino82] has joined ##java [02:13]
learningc [learningc!~learningc@121.122.76.45] has joined ##java [02:13]
kupi [kupi!uid212005@gateway/web/irccloud.com/x-jfuzgchhiucjojzs] has joined ##java [02:22]
johndoe231 [johndoe231!~johndoe@2401:4900:2000:d354:935:700c:ba69:2daa] has joined ##java [02:28]
shugz [shugz!~shugz@2605:e000:fd42:8a00:b8b4:ea5e:45ff:9f34] has joined ##java [02:29]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [02:30]
BShaftoe12349 [BShaftoe12349!~blahlblah@EAST-WEST-L.ear2.LosAngeles1.Level3.net] has joined ##java [02:36]
null1337 [null1337!~WhoAmI@c-73-203-123-117.hsd1.co.comcast.net] has joined ##java [02:40]
glosoli [glosoli!~glosoli@unaffiliated/glosoli] has joined ##java [02:47]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [02:48]
progart [progart!~kamee@188.115.226.25] has joined ##java [02:49]
null1337 [null1337!~WhoAmI@c-73-203-123-117.hsd1.co.comcast.net] has joined ##java [02:54]
hojang [hojang!~hojang@ip-89-176-64-99.net.upcbroadband.cz] has joined ##java [02:56]
whaley [whaley!~whaley@192.133.78.17] has joined ##java [03:01]
zikani03 [zikani03!~zikani03@197.211.102.243] has joined ##java [03:14]
arikchan [arikchan!~arikchan@178.69.37.91] has joined ##java [03:20]
juank_prada [juank_prada!~juank_pra@dynamic-201-244-193-112.dynamic.etb.net.co] has joined ##java [03:40]
juank_prada [juank_prada!~juank_pra@dynamic-201-244-193-112.dynamic.etb.net.co] has joined ##java [03:42]
donofrio [donofrio!~donofrio@host-232.subnet-17.med.umich.edu] has joined ##java [03:55]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [03:58]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [04:05]
ryan2215 [ryan2215!~ryan@98.207.153.158] has joined ##java [04:05]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [04:18]
Sheilong [Sheilong!uid293653@gateway/web/irccloud.com/x-yrpvkknjhzdyvczw] has joined ##java [04:21]
deavmi [deavmi!~deavmi@165.0.49.39] has joined ##java [04:24]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [04:34]
nonconvergent [nonconvergent!c72f2503@unaffiliated/nonconvergent] has joined ##java [04:35]
nonconvergent Oh! can't have a method call in switch case, it has to be constant, right? [04:37]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [04:43]
cheeser yes [04:46]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [04:51]
ipe [ipe!~ipe@91.156.247.55] has joined ##java [04:57]
wedr question about synchronized blocks. Looking through production code, I see that there are multiple synchronized blocks placed down, using the same Object. If a thread holds the Object's lock, and goes through 3 separate synchronized blocks, does the thread hold the Object 3 times after going through all of the synchronized blocks? [04:58]
wedr Ah, nevermind I found my answer. [04:59]
wedr "All synchronized blocks synchronized on the same object can only have one thread executing inside them at the same time." [04:59]
whaley wedr: and the locks are reentrant, and a single thread can acquire the lock (via the synchronized block) over and and over again [05:00]
whaley not sure if that is also what you wanted to know, but how I read the question made me think this was the root of it [05:01]
wedr ok. Just making sure. Right now, I was able to set the JUnit test up that the production code can enter a deadlock [05:03]
fizzie The way I read it, it sounded like `synchronized (x) { ... } synchronized (x) { ... } synchronized (x) { ... }` in sequence, in which case the lock is just released every time the thread exits a block, and reacquired when it enters the next one. [05:03]
fizzie But I guess that depends on how you parse "down" and "through". [05:03]
wedr yeah. [05:09]
wedr It has to be written like that because of Hibernate transactions. I don't know exactly as to how or why it's setup like this, but so far no one has encountered this problem until now [05:10]
atslash [atslash!~atslash@static.231.107.9.5.clients.your-server.de] has joined ##java [05:29]
Jonopoly [Jonopoly!~Jonopoly@unaffiliated/jonopoly] has joined ##java [06:04]
happymeal` [happymeal`!~happymeal@c-73-82-240-153.hsd1.ga.comcast.net] has joined ##java [06:05]
matt|home [matt|home!~matt@unaffiliated/matthome/x-8401877] has joined ##java [06:14]
matt|home okay.. i am very very confused. im reading up on java constructors. here's the page im following: https://www.homeandlearn.co.uk/java/class_constructor.html [06:18]
matt|home matt|home's title: "java for complete beginners - class constructor" [06:18]
iam730 [iam730!~iam730@45.41.180.94] has joined ##java [06:19]
matt|home i want to set up a class so that i can pass some int variables when creating the object with the constructor. so something like: MyClass a = new MyClass(1, 2, 3); right? [06:20]
matt|home im really confused when looking at the syntax for how to exactly do that. [06:20]
matt|home in the first example it shows the constructor as one line: StudentResults() { } <-- does that line inside the class with the same name create the constructor by default and let you pass values? [06:21]
synaptech StudentResults() { } is the equivalent of an empty default constructor [06:23]
synaptech you would want to create a constructor that takes integers as parameters [06:23]
matt|home right. hang on [06:23]
Kol [Kol!~Kol@S0106bcd1656555bc.vc.shawcable.net] has joined ##java [06:23]
synaptech it's similar to a normal function declaration but without a return type [06:23]
matt|home synaptech , so when you create an empty default constructor like that [06:24]
matt|home and you create the object later, you can just pass values to it in the order they were created? [06:25]
synaptech no if you were to instantiate an object of type StudentResults the above constructor doesn't take any parameters [06:25]
synaptech so it would just be new StudentResults(); [06:25]
matt|home so with the example class in the first box on that page, when you create the object instance you can do: StudentResults a = new StudentResults("myname", "my other name") ? [06:25]
matt|home so you have to specify which arguments it can take [06:26]
matt|home ugh brb [06:26]
synaptech no you would need to create another constructor that takes two string parameters in that case [06:26]
matt|home okay. here's where im confused [06:28]
matt|home what's the syntax to do that? [06:28]
synaptech https://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html [06:30]
synaptech synaptech's title: "Providing Constructors for Your Classes (The Java Tutorials > Learning the Java Language > Classes and Objects)" [06:30]
matt|home that's what i thought.. [06:30]
matt|home so the syntax is: constructor_name(type var1, type var2, ..) { } to create an empty construct. and when you create an instance then you can assign those int values? [06:32]
synaptech the constructor name needs to match the class name [06:33]
matt|home right [06:33]
synaptech but yeah then you would just call the constructor with the parameters you want to set [06:33]
matt|home i guess the part i don't understand is in the brackets of the constructor { } when they show you weird examples of assigning values. i don't understand what that does [06:33]
matt|home public Bicycle(int startCadence, int startSpeed, int startGear) { [06:34]
matt|home gear = startGear; [06:34]
matt|home what's gear = StartGear; ? [06:34]
matt|home is that literally just renaming the variable ? [06:34]
synaptech think of a constructor as an instance instantiator, so you're initializing instance attributes to certain values [06:34]
synaptech gear should be defined above the constructor as a class attribute [06:35]
matt|home confusion.. [06:35]
matt|home eh i think i get the syntax [06:35]
synaptech the constructor there is initializing the cadence, speed, and gear of the new bicycle object [06:37]
matt|home so it's just assigning a default value [06:37]
synaptech a starting value yes [06:37]
cheeser well, not necessarily [06:37]
matt|home but you don't have to have that [06:37]
synaptech it depends what actually happens in the constructor [06:37]
cheeser it' accepting 3 parameters [06:37]
matt|home so the reason im asking about this is because i have a class with a lot of variables. 12. 10 ints 2 strings. instead of initializing each value by name on their own separate lines when i create an object, i can just pass them all in one line when i create the object? [06:39]
matt|home just wondering if that's the correct way to do it normally [06:39]
cheeser you still have to assign constructor parameter values to fields. [06:39]
matt|home uh [06:40]
matt|home right [06:40]
matt|home cheeser - lemme show you my example code on github, and then i'll show you what i wanna do on one line, tell me if it's correct [06:40]
cheeser the compiler will tell you taht. [06:40]
matt|home it's just a lot of typing is all ;_; [06:40]
cheeser welcome to software development [06:41]
synaptech lol [06:41]
matt|home when you said i have to assign parameter values to fields, does that mean they are required to have default starting values [06:41]
synaptech no [06:41]
cheeser why would they? [06:41]
matt|home because i don't understand that sentence and wanted to be clear [06:41]
matt|home well let's give it a shot.. [06:42]
b0nn [b0nn!~shane@81.4.127.22] has joined ##java [06:43]
fizzie What you do with constructor parameters inside the constructor body is up to you, but quite often people tend to set the new object's fields to those values (or values derived from them), otherwise there's hardly any point in passing them to the constructor in the first place. [06:43]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [06:49]
MR-D05 [MR-D05!~textual@cblmdm72-240-147-62.buckeyecom.net] has joined ##java [06:59]
RoriconKnight [RoriconKnight!~RoriconKn@114.5.208.213] has joined ##java [07:04]
RoriconKnight [RoriconKnight!~RoriconKn@114.5.208.213] has joined ##java [07:18]
DiabloD3 [DiabloD3!foobar@exelion.net] has joined ##java [07:28]
dreamreal heh [07:29]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [07:34]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [07:35]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [07:36]
Diablo-D3 [Diablo-D3!foobar@45.59.64.5] has joined ##java [07:38]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [07:49]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [07:52]
YottaByte [YottaByte!~YottaByte@unaffiliated/yottabyte] has joined ##java [07:55]
pikapika_lunar_a [pikapika_lunar_a!~pikapika@pika.powered.by.lunarbnc.net] has joined ##java [07:59]
deavmi [deavmi!~deavmi@165.0.49.39] has joined ##java [08:00]
TheJollyRoger [TheJollyRoger!~Peter@gateway/tor-sasl/thejollyroger] has joined ##java [08:00]
zalt_ [zalt_!~lambda443@unaffiliated/lambda443] has joined ##java [08:05]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [08:09]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [08:09]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [08:10]
rorx [rorx!~rorx@tserver.truestep.com] has joined ##java [08:11]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [08:11]
DiabloD3 [DiabloD3!foobar@exelion.net] has joined ##java [08:19]
Jonopoly [Jonopoly!~Jonopoly@unaffiliated/jonopoly] has joined ##java [08:23]
Bebef [Bebef!sbreit@phobos.bebef.de] has joined ##java [08:24]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [08:29]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [08:35]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [08:40]
YottaByte when I call a repository delete method using spring data jpa it doesn't actually execute the sql statement until later. I'm not sure why it's designed this way. I guess it's called "flushing." I can call myRepository.flush() explicitly, but if I don't do this I've seen cases where I call delete then save, and the save (insert) happens before the delete, even though the delete call is first. [08:55]
YottaByte this makes _no_ sense to me [08:55]
happymeal` [happymeal`!~happymeal@c-73-82-240-153.hsd1.ga.comcast.net] has joined ##java [08:55]
dreamreal YottaByte: no, it's transactions. [08:56]
whaley [whaley!~whaley@c-73-78-132-227.hsd1.co.comcast.net] has joined ##java [08:56]
dreamreal JPA queues up operations and executes them when the transaction commits. [08:57]
YottaByte but I had @Transactional on the method, shouldn't the delete and save happen in the same transaction and thereby in order? [08:57]
dreamreal You had transactional on WHICH method? [08:57]
YottaByte the method that contains my delete and save calls [08:57]
dreamreal okay, so you have a @Component or @Service that calls the repository.delete(), and repository.save() calls, and THAT is the @Transactional method? [08:58]
YottaByte I have a @Service with @Transactional myMethod() { ... repositoryA.delete(); ... repositoryB.save(myB); }, and the inserts are happening before the deletes, and I need the deletes to happen first because constraints are violated [09:00]
dreamreal hmm, that's definitely odd. Which JPA impl? [09:00]
YottaByte hibernate 4 [09:03]
dreamreal hibernate *4*? ouch. [09:03]
dreamreal Hrm, it still shouldn't have a problem, though. [09:04]
YottaByte well repositoryA.delete has @Transactional and @Modifying on it [09:04]
YottaByte but just @Transactional should inherit the parent method's transaction, no? [09:04]
YottaByte the callee's transaction, if there is one? [09:04]
dreamreal default scope is REQUIRES, I believe [09:04]
YottaByte yeah [09:04]
dreamreal which would accept the enclosing [09:04]
dreamreal something is wonky in the sequencing somewhere, though. You may need to ask the spring data guys what's going on there. [09:05]
learningc [learningc!~learningc@mti-37-145.tm.net.my] has joined ##java [09:08]
User__ [User__!~learningc@mti-37-145.tm.net.my] has joined ##java [09:12]
Hanii [Hanii!~Hanii@2a00:23c5:c587:a800:d8c3:4ff5:8bf5:6152] has joined ##java [09:12]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [09:20]
fairuz [fairuz!~fairuz@unaffiliated/fairuz] has joined ##java [09:25]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [09:30]
ideaPlus [ideaPlus!~Username@113.246.9.96] has joined ##java [09:34]
sbalmos [sbalmos!~sbalmos@cpe-98-30-198-117.columbus.res.rr.com] has joined ##java [09:41]
linext [linext!~linext@pool-74-105-128-32.nwrknj.fios.verizon.net] has joined ##java [09:43]
caverdudelarry [caverdudelarry!~larry@184.62.100.121] has joined ##java [09:54]
cader [cader!~cader@c-67-170-40-61.hsd1.wa.comcast.net] has joined ##java [09:56]
rruizt [rruizt!~rruizt@83-84-23-124.cable.dynamic.v4.ziggo.nl] has joined ##java [10:03]
Diablo-D3 [Diablo-D3!foobar@exelion.net] has joined ##java [10:21]
RedSoxFan07 [RedSoxFan07!~Thunderbi@d-137-103-109-45.ct.cpe.atlanticbb.net] has joined ##java [10:21]
BShaftoe12349 [BShaftoe12349!~blahlblah@2605:e000:1520:429b:f8c2:b54c:c079:eed] has joined ##java [10:33]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [10:34]
mindCrime_ [mindCrime_!~mindCrime@cpe-2606-A000-112A-8159-2036-895B-613C-82EC.dyn6.twc.com] has joined ##java [10:52]
matt|home parted the channel: "Leaving" [10:53]
mindCrime__ [mindCrime__!~mindCrime@cpe-98-27-55-10.nc.res.rr.com] has joined ##java [10:54]
abhixec [abhixec!~abhixec@73.92.49.6] has joined ##java [10:54]
very_sneaky [very_sneaky!~very_snea@131.170.239.15] has joined ##java [11:03]
very_sneaky hi all; I'm really struggling to understand what's going wrong with my springboot api w/ spring data jpa configurations here: https://bpaste.net/show/qinh [11:07]
very_sneaky the error I'm getting is `Field commentRepository in com.sept.rest.webservices.restfulwebservices.comment.CommentController required a bean of type 'com.sept.rest.webservices.restfulwebservices.repository.CommentRepository' that could not be found.` [11:07]
very_sneaky as per https://stackoverflow.com/questions/39173982/what-is-a-nosuchbeandefinitionexception-and-how-do-i-fix-it, my repository has the @Repository meta annotation of @Component, which to my understanding should configure the repository (as/with?) a bean. can anybody see what i'm doing wrong? [11:08]
rajrajraj [rajrajraj!uid72176@gateway/web/irccloud.com/x-dokfuyrrscmdlgpx] has joined ##java [11:23]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [11:24]
newbieG [newbieG!~bhaskar@27.61.122.72] has joined ##java [11:25]
caverdudelarry very_sneaky, not a spring boot channel [11:26]
very_sneaky sure bit it as a _java_ channel, and spring boot is a java framework... [11:28]
caverdudelarry you will not get assitance in here [11:29]
very_sneaky alrightey, i might wait to see if anybody responds regardless - I've been receiving spring boot related advice here over the past couple of days so it seems that there are some people willing to assist [11:31]
surial very_sneaky: spring is fine here, caverdudelarry is talking about their ass and being a dick. [11:37]
surial caverdudelarry: cut it out. [11:37]
surial very_sneaky: Now, _I_ am not particularly familiar with spring, so perhaps someone else. It's a rather quiet time right now, maybe try in a few hours. [11:37]
very_sneaky surial: cheers, will do [11:37]
johndoe231 [johndoe231!~johndoe@117.198.102.130] has joined ##java [11:39]
Albright I'm using JavaFX. I've got a TableView. I need to String.format() the values on one column which correspond to a double on the underlying items. The examples I'm finding on SERPs seem to assume that this property will always be a String, and it kind of seems like JavaFX is expecting that too. Any idiot-level examples out there on how to do this? [11:53]
caverdudelarry the table has a model right? [11:55]
Albright caverdudelarry: Yes. [11:56]
DTZUZU [DTZUZU!~DTZUZU@S0106bcd165662a4d.vs.shawcable.net] has joined ##java [11:56]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [11:58]
Albright Oh? I figured it out. Okay. Had that column defined incorrectly. [11:59]