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

« 2019-01-10


2019-01-12 »

Nick Message Date
srisri [srisri!~srisri@] has joined ##java [12:07]
_kmh_ [_kmh_!] has joined ##java [12:13]
qrestlove [qrestlove!~qrestlove@2605:6000:eb4a:ef00:c977:813f:a17:2b0] has joined ##java [12:14]
bobek_ [bobek_!~bobek@unaffiliated/bobek] has joined ##java [12:14]
DTZUZO [DTZUZO!] has joined ##java [12:15]
CombatVet [CombatVet!~CombatVet@gateway/tor-sasl/combatvet] has joined ##java [12:29]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:91c2:ef8a:6322:9b54] has joined ##java [12:29]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [12:30]
immibis [immibis!] has joined ##java [12:33]
thebope [thebope!~thebope@pdpc/supporter/student/thebope] has joined ##java [12:34]
AMcBain [AMcBain!] has joined ##java [12:41]
dob1 [dob1!~dob1@unaffiliated/dob1] has joined ##java [12:42]
dob1 hi, why this gives me ",00" and not "0,00" : DecimalFormat fmt = new DecimalFormat("#.00"); System.out.println(fmt.format(BigDecimal.ZERO)); [12:43]
surial dob1: because the spec says so. [12:47]
surial dob1: # specifically means: 0 shows as absent. [12:47]
surial dob1: try "0.00" [12:47]
dob1 surial, it seems to works, thanks [12:50]
kgrimes2 [kgrimes2!] has joined ##java [12:54]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [01:35]
sbeex [sbeex!~sbeex@] has joined ##java [01:39]
sbeex good morning [01:39]
pressure679 [pressure679!] has joined ##java [01:49]
Gazooo [Gazooo!~Gazooo@] has joined ##java [01:50]
nokdoot [nokdoot!~nokdoot@] has joined ##java [01:54]
KeyJoo [KeyJoo!~KeyJoo@] has joined ##java [01:56]
Gazooo [Gazooo!~Gazooo@] has joined ##java [02:00]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:09]
kstealth`` [kstealth``!~kstealth`@] has joined ##java [02:09]
Gazooo [Gazooo!~Gazooo@] has joined ##java [02:13]
t2mkn [t2mkn!~t2mkn@] has joined ##java [02:16]
zulutango [zulutango!] has joined ##java [02:18]
Mimicize [Mimicize!~mime@unaffiliated/mimicize] has joined ##java [02:20]
currybullen i'm trying to understand the pros of a JIT comoiler. i've heard a JIT compiler has the advantage of preserving the portability/flexibility of interpretation, what does this actually mean? couldnt the portability still be maintaned by compiling the program once locally before it runs, then running that locally compiled executable for all subsequent runs? [02:24]
fatdragon [fatdragon!] has joined ##java [02:24]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [02:27]
trittweiler [trittweiler!~trittweil@] has joined ##java [02:28]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [02:34]
katiex7 [katiex7!] has joined ##java [02:39]
mohsen_1 [mohsen_1!uid289573@gateway/web/] has joined ##java [02:41]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:42]
Xgc [Xgc!~Jon@] has joined ##java [02:46]
mohsen_1 Can I get an instance of Class<List<SomeClass>> ? [03:11]
Gazooo [Gazooo!~Gazooo@] has joined ##java [03:14]
mona_x [mona_x!~mona_x@] has joined ##java [03:24]
[twisti] currybullen: as far as i know, there are efforts to preserve JIT work during launches. you may find more on google [03:25]
blackntan-airboo [blackntan-airboo!~blackntan@unaffiliated/blackntan] has joined ##java [03:28]
bsaboia [bsaboia!~bsaboia@] has joined ##java [03:30]
canton7 currybullen, compiling a whole application on startup can get slow. Like, waiting 30-90 minutes sort of slow, easily. A JIT spreads that cost over the lifetime of the application: you'll probably never use most of the application, and those bits won't get compiled. Also, a JIT can change how it compiles a bit of code depending on e.g. how often it's used, or even *how* it's used, in practice [03:31]
Gazooo [Gazooo!~Gazooo@] has joined ##java [03:36]
currybullen all of that makes sense, but i imagine the following scenario: i have an application that i will always run on the same machine/environment. would it not be better to have it compiled ahead of time (removing lag from runtime that would have been the result of JIT compilation), and still allow the JVM to perform recompiling for optimisation reasons during runtime? [03:38]
currybullen i get that the one time initial cost of such an approach would be high, but wouldnt it make sense in a case of a program that will be stopped and started frequently? [03:41]
mona_x Is there any real advantage between deploying an ear file (with 4 wars using scope provided) vs deploying each war manually ? is there a risk that jars will register things multiple times or is the end result exactly the same ? For instance if the jars are shared ... and each have an @Component ... will it register it twice ... vs one ? or will the ear also register it twice ? [03:45]
[twisti] that seems reasonable to me, and i look forward to hearing our resident experts weigh in on this. personally, thinking of java apps mostly as big servers with uptime that is counted in months, that approach always seemed reasonable to me [03:45]
mona_x Iam focusing on the question of not having two beans register twice due to jars not being provided in the ear but existent in several deployments. [03:46]
Gazooo [Gazooo!~Gazooo@] has joined ##java [04:03]
gabizou [gabizou!] has joined ##java [04:10]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [04:11]
orbyt_ [orbyt_!~orbyt@] has joined ##java [04:19]
bendem currybullen, AOT compilation was introduced as an experimental feature in java 9 [04:22]
bendem jep 295 [04:22]
bendem 'JEP 295: Ahead-of-Time Compilation' can be found at [04:22]
deavmiLaptop [deavmiLaptop!~deavmi@] has joined ##java [04:23]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [04:26]
yawkat currybullen: there are certain optimizations that cannot be done ahead-of-time [04:26]
yawkat in theory, a jitted application can, in the long run, be always better than an aoted one [04:27]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [04:30]
qwedfg [qwedfg!~adam@] has joined ##java [04:31]
gdrc [gdrc!~gdrc@unaffiliated/under] has joined ##java [04:33]
mona_x [mona_x!~mona_x@] has joined ##java [04:34]
[twisti] yawkat: but why not AOT + JIT ? [04:34]
mona_x did i miss an answer? [04:34]
bendem mona_x, no [04:36]
deavmiLaptop [deavmiLaptop!~deavmi@] has joined ##java [04:39]
srisri [srisri!~srisri@] has joined ##java [04:40]
Gazooo [Gazooo!~Gazooo@] has joined ##java [04:42]
Gazooo [Gazooo!~Gazooo@] has joined ##java [04:48]
KeyJoo [KeyJoo!~KeyJoo@] has joined ##java [04:56]
shirafuno [shirafuno!~shirafuno@] has joined ##java [04:57]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:ec1e:8:ea2:a51d] has joined ##java [04:58]
gregf_ [gregf_!557336c9@gateway/web/freenode/ip.] has joined ##java [05:03]
DTZUZO [DTZUZO!] has joined ##java [05:04]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [05:06]
Gazooo [Gazooo!~Gazooo@] has joined ##java [05:07]
Maldivia submit - Gradle PM1: "Too many people are still maven", Gradle PM2: "Let's just make a maven tool then!" [05:16]
Maldivia Link for accepted for ##java. [05:16]
sbeex [sbeex!~sbeex@] has joined ##java [05:23]
headcr4sh [headcr4sh!] has joined ##java [05:24]
nfd9001 [nfd9001!~nfd9001@2601:602:8500:d0d1:5410:d0f6:4076:f8c6] has joined ##java [05:28]
computeiro [computeiro!~computeir@] has joined ##java [05:33]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:36]
[twisti] we are discussing unit/integration tests for a product that talks to two servers and moves (and converts) data in between them. we would rather not test against the actual servers, as the process to set them up in a test environment is rather heavy weight (takes ~15 minutes to fire up the env alone). the communication to the servers is through SQL and REST, respectively. any good advice on paths we should [05:47]
[twisti] investigate ? right now the idea is being floated to have the json from an actual server in a file and just play that back to the client [05:47]
blackntan-work [blackntan-work!~blackntan@unaffiliated/blackntan] has joined ##java [05:49]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [05:53]
lightslategrey [lightslategrey!~lightslat@] has joined ##java [05:56]
dendazen [dendazen!] has joined ##java [06:04]
srisri [srisri!~srisri@] has joined ##java [06:07]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [06:10]
BurmaSauce [BurmaSauce!~evansj@2001:8b0:a75a:a2d2:5822:c0de:6034:776f] has joined ##java [06:17]
nbro [nbro!~nbro@2a02:aa13:3100:6000:90ae:6de7:c049:51bd] has joined ##java [06:21]
dendazen [dendazen!] has joined ##java [06:25]
nbro [nbro!~nbro@2a02:aa13:3100:6000:90ae:6de7:c049:51bd] has joined ##java [06:27]
Seji [Seji!] has joined ##java [06:29]
sigtrm [sigtrm!] has joined ##java [06:29]
blackntan-work [blackntan-work!~blackntan@unaffiliated/blackntan] has joined ##java [06:29]
AcTiVaTe [AcTiVaTe!] has joined ##java [06:30]
aquery [aquery!~aquery@fwrz043.HRZ.Uni-Marburg.DE] has joined ##java [06:32]
aquery Good day all, could anyone recommend me of a good pdf (or website) for learning java, possibly for people who have background in other programming languages? [06:34]
Tichodroma tutorial [06:36]
Tichodroma The Oracle tutorial for Java is probably your best starting point, at . Skip the Netbeans bits. Another option: - has a list of others as well. [06:36]
aquery Tichodroma: thank you! :) [06:40]
avemi [avemi!ave@gateway/vpn/privateinternetaccess/avemilia] has joined ##java [06:42]
Zee- [Zee-!~Zee-@] has joined ##java [06:42]
Zee- [Zee-!~Zee-@] has joined ##java [06:43]
lightslategrey [lightslategrey!~lightslat@] has joined ##java [06:44]
dendazen [dendazen!] has joined ##java [06:46]
t2mkn [t2mkn!~t2mkn@] has joined ##java [06:46]
fallst4r [fallst4r!] has joined ##java [06:46]
deathwishdave [deathwishdave!~deathwish@] has joined ##java [06:48]
dendazen [dendazen!] has joined ##java [07:07]
Zee-- [Zee--!~Zee-@] has joined ##java [07:10]
deathwishdave [deathwishdave!~deathwish@] has joined ##java [07:27]
dendazen [dendazen!] has joined ##java [07:28]
enoq [enoq!~enoq@2a02:8388:6a87:b080:3f30:9f7d:611e:7eef] has joined ##java [07:30]
sbeex I have a small brain challenge for you guys (and me too btw) [07:30]
sbeex goal: send an MQTT message when Netflix is started (website opened) [07:31]
sbeex how would you do that with help of java ? (JNA ?) [07:31]
enoq hi I'm currently running jvm 8 on docker using: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1 [07:31]
enoq when changing to 11 I suppose I only need to drop -XX:+UnlockExperimentalVMOptions [07:32]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [07:32]
enoq is that assumption correct? [07:32]
enoq I'm also running Kotlin on it so I'm not in a rush, would you still recommend upgrading to 11 or wait a bit? [07:33]
cheeser upgrade, yes [07:34]
yawkat have to do it eventually [07:35]
Tichodroma sbeex: the web site opens in a browser, right? How is Java involved here? [07:36]
extenuate [extenuate!uid96210@gateway/web/] has joined ##java [07:36]
sbeex Tichodroma: exactly the goal is to be able to track title of browser tabs [07:36]
cheeser not in java you don't [07:36]
sbeex yes the easier way would probably be to create a chrome extension :/ [07:38]
sbeex but then I will end with many things to install for a single project it's a bit annoying [07:38]
Addax welcome to programming [07:39]
sbeex it's more "welcome to closed world" [07:39]
sbeex if netflix had an API it would be solved [07:39]
sbeex ) [07:40]
Addax that, too, is "welcome to programming" [07:40]
sbeex yes and sarcastic answers too btw ;) [07:40]
Addax that's not sarcastic [07:40]
Addax it's a reality [07:40]
Addax question: what's the best IDE/gradle interaction? Plugins, IDEs, everything welcomed [07:41]
sbeex interaction ? Oo [07:42]
sbeex if you mean *integration then IntelliJ is one of the earliest adopter of gradle (that's why android studio is not eclipse studio) [07:43]
sbeex and it works quite well [07:43]
Addax is android studio better about it than idea ultimate? because that's what I use NOW and I find it far less useful than IDEA's maven integration [07:44]
sbeex well you talk about gradle or maven ? [07:44]
Addax I'm talking about gradle. I use both gradle and maven, and I find maven's integrations typically much stronger, so I'd like to find a better way to work with gradle. [07:45]
sbeex gradle is so flexible that it's a nightmare to create a good plugin for it [07:45]
sbeex that's why [07:45]
sbeex but at this game IntelliJ well... Jetbrains products have some lead on it [07:46]
Addax Sure, the reasons aren't hard to figure out. I may migrate this project back to maven, then, because "mess around with gradle" isn't one of the project goals [07:46]
sbeex (That's exactly what we have done gradle -> maven) [07:46]
Addax or at least it shouldn't be [07:46]
Addax I thought this was all straightforward enough that it wouldn't be a problem. :/ [07:46]
Addax oh well, you live, you get to see your life turn into a crappy alanis morissette song [07:47]
sbeex maven allow some parent POM project which is pretty useful for us and to reach that with gradle it was over complicated [07:47]
sbeex gradle is cool sure but... maven is much more popular and IDE more mature with it IMHO [07:48]
Addax I think it's less a facet of maturity and more a facet of flexibility [07:49]
dendazen [dendazen!] has joined ##java [07:49]
Addax the result's pretty much the same though [07:49]
sbeex though it won't fix your problem [07:49]
sbeex with power come responsibilities so if you go for gradle -> then assume your responsabilities and put the finger in the thing don't hope the IDE will do everything for you :) [07:50]
Addax Yeah. I'm pretty sure *I* can fix my problem, it's just a dumb problem to have. [07:50]
Addax I should file an issue with jetbrains: "can you fix gradle like you fixed java?" [07:53]
[Anthony] [[Anthony]!] has joined ##java [07:54]
sbeex Addax what's your problem with gradle and intellij ? [07:54]
Addax sbeex: really pretty simple stuff: fairly deeply nested subprojects [07:54]
sbeex good so intellij support it very well [07:55]
Addax of course [07:55]
sbeex so the problem is ? [07:55]
Addax actually getting the subprojects to refer to each other cleanly in gradle. It's a me and gradle problem, but one that I think tooling should be able to help with. I'll work it out. [07:57]
Addax when I say "welcome to programming" I say it to myself just as often as I say it to anyone else. [07:57]
sbeex ah ok no it's not the IDE job to teach you gradle. If you go for gradle you have to learn it. That's exactly why maven is a bit more easier to reach because it's in XML so autocomplete can exists but in gradle you can't have such behavior at all [07:58]
Addax I'm aware of the difficulties, thank you. [07:58]
conan [conan!] has joined ##java [07:58]
sbeex what kind of tree do you have for your subproject? [07:58]
sbeex a -> b,c,d,e ? [07:58]
Addax parent, 12 subprojects, some of which need to refer to each other, some of which have subprojects themselves that need to refer up [07:59]
sbeex okay [07:59]
Addax so a: [b,c,d:[e,f,g],h] where f needs to refer to c [07:59]
echoSMILE [echoSMILE!~echoSMILE@unaffiliated/echosmile] has joined ##java [07:59]
sbeex show us your gradle files so we can see where it's wrong [08:00]
[Anthony] spring-boot-starter-jdbc automatically wires up an h2 db if the com.h2database dependency is present right ? [08:00]
Addax I have no doubt it's doable, but actually getting the build to work is taking more time than it should. I can't, unfortunately. [08:00]
sbeex no pain no gain. [08:00]
sbeex next [08:00]
sbeex Another satisfied customer. Next! [08:00]
Addax sbeex: yep. Like I said, I'll work it out. [08:00]
Maldivia Addax: the way gradle fixed it, was to create their own maven: [08:01]
Maldivia Maldivia's title: "Apache Maven support coming to Gradle Enterprise | Gradle Enterprise" [08:01]
Jenetrix [Jenetrix!] has joined ##java [08:03]
stryek [stryek!uid332574@gateway/web/] has joined ##java [08:05]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [08:06]
computeiro [computeiro!~computeir@] has joined ##java [08:09]
Addax gah, figured it out [08:10]
dendazen [dendazen!] has joined ##java [08:10]
Addax the top level settings.gradle had to refer to the ... third level project to include it [08:10]
Addax gross [08:10]
SuperTyp [SuperTyp!] has joined ##java [08:20]
mona_x [mona_x!~mona_x@] has joined ##java [08:22]
Essadon [Essadon!] has joined ##java [08:25]
Essadon [Essadon!] has joined ##java [08:26]
ericek111 [ericek111!] has joined ##java [08:32]
Zer0Pl4sm4 [Zer0Pl4sm4!~Zer0Pl4sm@gateway/tor-sasl/zer0pl4sm4] has joined ##java [08:33]
rippa [rippa!] has joined ##java [08:41]
Markow [Markow!~ejm@] has joined ##java [08:42]
socoro [socoro!~socoro@2001:1528:107:0:a4f0:43de:4900:e85a] has joined ##java [08:48]
sliekas99 [sliekas99!~mantas@] has joined ##java [08:49]
nikivi [nikivi!] has joined ##java [09:05]
dendazen [dendazen!] has joined ##java [09:12]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [09:16]
sh1r4fun0 [sh1r4fun0!~shirafuno@] has joined ##java [09:16]
deavmiLaptopHome [deavmiLaptopHome!~deavmi@] has joined ##java [09:20]
aqd [aqd!] has joined ##java [09:22]
EgonX [EgonX!~Egon@2601:2c6:480:7235:d05c:8c9b:6c40:642a] has joined ##java [09:31]
GraysonBriggs [GraysonBriggs!~GraysonBr@unaffiliated/graysonbriggs] has joined ##java [09:33]
ziper02 [ziper02!~ziper02@] has joined ##java [09:40]
ziper02 hey,how can I make Button(of JavaFX) Serializable?I dont find any solution ... [09:42]
Addax what are you trying to do by making it serializable? [09:43]
ziper02 I got class with attribute of Button, and this class I transfer between client and server [09:43]
Addax why not make the attribute transient? The button wouldn't have any context on the other system [09:44]
ziper02 ohhh I didnt know about this option [09:45]
ziper02 P [09:45]
ziper02 I will check it out [09:45]
ziper02 ty [09:46]
Rapture [Rapture!] has joined ##java [09:46]
Byteflux [Byteflux!] has joined ##java [09:47]
EgonX [EgonX!~Egon@2601:2c6:480:7235:d05c:8c9b:6c40:642a] has joined ##java [09:48]
dani- [dani-!sid341953@gateway/web/] has joined ##java [09:50]
cheeser shipping actual UI instances seems silly. just transfer application state and let the client manage it. [09:58]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [09:58]
nikivi [nikivi!] has joined ##java [10:02]
ziper02 Addax, worked,ty ...@cheeser we do some tries,but you right we gonna change it later [10:02]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:05]
jamiejackson [jamiejackson!c7df1efe@gateway/web/cgi-irc/] has joined ##java [10:07]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [10:09]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:09]
tuskkk____ [tuskkk____!uid18470@gateway/web/] has joined ##java [10:10]
deavmi [deavmi!~deavmi@] has joined ##java [10:13]
wordsToLiveBy [wordsToLiveBy!~wordsToLi@unaffiliated/wordstoliveby] has joined ##java [10:15]
Iolo [Iolo!] has joined ##java [10:16]
srisri [srisri!~srisri@] has joined ##java [10:27]
kindling [kindling!kVmkM6ji@unaffiliated/kindling] has joined ##java [10:27]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:47]
enoq [enoq!~enoq@2a02:8388:6a87:b080:3f30:9f7d:611e:7eef] has joined ##java [10:54]
tang^ [tang^!~tang^@] has joined ##java [10:57]
led_dark_1 [led_dark_1!] has joined ##java [10:57]
john_doe_jr [john_doe_jr!] has joined ##java [11:04]
john_doe_jr What does the following error mean: "Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/layout/Baseline"? [11:04]
surial john_doe_jr: it means you are using code from a third party library, and it's not on the classpath. [11:05]
surial Presumably, this: ? last update 2010. Schoolwork? [11:05]
surial surial's title: "Maven Repository: org.jdesktop swing-layout 1.0.3" [11:05]
Dirkos [Dirkos!5d75ef5a@gateway/web/freenode/ip.] has joined ##java [11:06]
tang^ hey. we use that in production today [11:06]
Dirkos Hey im keeping error like this: Caused by: unable to find valid certification path to requested target [11:07]
Dirkos Via the CLI it works fine but i noticed that java has its own keystore? [11:07]
shirafuno [shirafuno!~shirafuno@] has joined ##java [11:07]
Dirkos How should i import a cert there? [11:07]
tang^ lots of documentation around on importing certs to the java keystore [11:07]
Dirkos tang^: correct, but a bit too much so its pretty confusing [11:08]
Markow [Markow!~ejm@] has joined ##java [11:08]
Dirkos And 1 extra question because i noticed there are 2. Which one is java actually using? [11:08]
tang^ you can create as many keystores as you want, actually [11:09]
tang^ but jre/lib/security/cacerts is the one that java uses by default [11:10]
john_doe_jr surial: how do I put the swing-layout jar file into the class path? I'm using netbeans? [11:11]
surial classpath [11:11]
surial john_doe_jr, The classpath tells Java or the compiler which jar files and folders to search for classes and resources. Use the -cp/-classpath run-time options to specify the classpath (does NOT work with -jar!). Also see [cheeser's blog], [], or for more information. [11:11]
surial Note, netbeans is used a lot less than the big 2 (eclipse and intellij), so the netbeans specific configuration to set that up is something that'd need to be answered by a netbeans user and there might not be any in the channel right now. [11:12]
wodencafe [wodencafe!~wodencafe@2605:6000:1517:462e:724d:7bff:fe63:71b6] has joined ##java [11:17]
john_doe_jr surial: I'm trying to build a really old project that only works on java 1.6. This is how I have to launch netbeans in order to get it to run: /Applications/NetBeans/NetBeans --jdkhome /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home ?.maybe I need to add the swing jar to this path in order for it to know where to look for the jar [11:19]
bn_work [bn_work!uid268505@gateway/web/] has joined ##java [11:19]
tang^ john_doe_jr: read the linked articles on classpath [11:20]
Dirkos tang^: its working now [11:20]
Dirkos thanks for the help! [11:20]
_BIGSHOT_ [_BIGSHOT_!~big__@unaffiliated/niceguy00] has joined ##java [11:20]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [11:23]
_BIGSHOT_ i have //symbolColumn.setCellFactory(new Callback<TableColumn<GetPivots, String>, TableCell<GetPivots, String>>() {// now I want to change the "cell color" based on values which are not in Tablecolumn, i.e. i have to ObservableArrayList GetMPivots and GetWPivots, now i want to change "symbolcolumn" color based on values in GetMPivots and GetWPivots ... how to do that in javafx? [11:23]
_BIGSHOT_ i have **two** [11:23]
rruizt [rruizt!] has joined ##java [11:24]
_BIGSHOT_ i don't want to use "Callback" since i don't have values populated in column [11:24]
SchleimKeim [SchleimKeim!~skull@unaffiliated/schleimkeim] has joined ##java [11:26]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [11:27]
bobek_ [bobek_!~bobek@unaffiliated/bobek] has joined ##java [11:28]
mohsen_1 does jackson serialize null fields to "" in json ? [11:29]
Addax I don't think so, because null and "" are different values [11:29]
Addax but it'd be easy to try [11:29]
mohsen_1 Is there anyway I can tell jackson to not serialize null fields? [11:32]
surial john_doe_jr: no; netbeans simply needs to be told how to run the app. There's a config dialog to specify how to run things. I just don't know what that's like given that I don't use netbeans. Google around; there are tons of articles on this. [11:33]
lol768 Does anyone know of a WhatWG URL parser for Java? [11:33]
Addax mohsen_1: what does it do with null fields? [11:33]
lol768 I would like it to support relative URLs. [11:34]
surial lol768: there's a URL parser for java. [11:34]
surial lol768: I have no idea what a 'whatwg url' is, though. [11:34]
lol768 Yeah and it doesn't follow the spec I referenced [11:34]
surial javadoc URI [11:34]
surial lol, surial: [JDK:] [11:34]
surial lol768: you referenced a spec? [11:34]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [11:34]
lol768 [11:34]
mohsen_1 Addax: serializes to null: {"user_id": null} [11:34]
Addax well, that's not the same as "" [11:34]
surial lol768: j.n.URI is compatible with that. [11:35]
lol768 is unsuitable, it won't oarse " b" [11:35]
lol768 lol768's title: "G Suite: Collaboration & Productivity Apps for Business" [11:35]
freeone3000 surial: WHATWG is a standards org. URL would be the spec. [11:35]
lol768 No it's not :p [11:35]
lol768 Its behaviour is completely different to that of a browser [11:35]
Addax URL != browser [11:36]
lol768 Another example: " [11:36]
lol768 "^" [11:36]
surial lol768: This spec says nothing about spaces. [11:36]
lol768 Both result in an exception being thrown [11:36]
orbyt_ [orbyt_!~orbyt@] has joined ##java [11:37]
surial lol768: "" works fine. [11:37]
freeone3000 lol768: Firefox doesn't know what to do with them either. Are you wanting the literal spaces in the url, or are you wanting them pre-escaped? I'm not seeing you use search paths or anything specific to the WHATWG standard over the IETF RFC [11:37]
mohsen_1 Addax: @JsonInclude(JsonInclude.Include.NON_NULL) on the class avoids the problem [11:37]
lol768 Firefox does [11:38]
lol768 It encodes it to %20 [11:38]
Addax mohsen_1: there you go, I was trying to find which option and was looking in the wrong place [11:38]
freeone3000 lol768: Okay. You want the url to be encoded for you. Run URLEncoder.encode() before passing it to URI. [11:38]
surial lol768: let's take a step back. Either [A] ^ and space are just as inllegal via this whatwg spec doc as they are the way everyone and their uncle agrees they are illegal, or [B] they are actually okay according to whatwg but crucially, java, chrome, edge, firefox, and safari all think this is bull. [11:38]
surial lol768: either way.. why, exactly, do you want to parse spaces in URLs? What are you trying to accomplish [11:39]
lol768 Please try the URLs I posted in Firefox [11:39]
surial Because it sure feels like whatever you are trying to accomplish, you're going about it the wrong way. [11:39]
surial lol768: this proves nothing. [11:39]
freeone3000 lol768: In the address bar, they run an encoding step. Running it through JS, which is what the WHATWG URL spec specifies it in, gives a 404 in both cases. [11:39]
surial browsers are notorious for dealing with illegal input in the way of: "Eh, fuck it, I'll give it my best shot". [11:39]
freeone3000 lol768: If you want it to match address bar behaviour, you'll want to run the encoding step first. [11:39]
Maldivia lol768: -- " bar" - not valid [11:39]
lol768 I'm dealing with user input. I need to take a lax approach towards parsing [11:40]
freeone3000 lol768: You must implement the laxity yourself. [11:40]
lol768 Characters which should be encoded may not be [11:40]
mohsen_1 Addax: Thank you [11:40]
freeone3000 ...Right. Which is why you run URLEncoder.encode() over the user string before passing it to URI.parse(). [11:40]
surial Yup, there's no library I'm aware of that does the kind of laissez-faire: I know this is not a legal URI but I'll just try to imagine what you were intending and give it my best shoot approach that browsers do. [11:40]
_BIGSHOT_ how can i change 'cell color' of a column based on values which are not present in the table? [11:40]
lol768 That'll double encode legitimately encodes characters... [11:40]
_BIGSHOT_ in javafx [11:40]
Maldivia _BIGSHOT_: in the cell rendered [11:40]
surial lol768: Exactly. There's a reason it makes no sense. [11:40]
up|ime decode first and then re-encode and hope for the best :P [11:41]
surial lol768: this 'best effort' stuff browsers bill is really tricky and impossible to spec out. It's usually a mistake because it makes code paths effectively non-deterministic. [11:41]
Addax mohsen_1: hey, YOU found it, not me [11:41]
lol768 Try this URL in Firefox : ^ [11:41]
surial lol768: so I really doubt there's a java lib to fake it, nor will there be an easy trick. But if you must have it, well, good luck. Write your own. [11:41]
lol768 Does it double encode the first space? No. It doesn't. [11:41]
lol768 up|ime: I'll try that [11:41]
surial lol768: you come across as argumentative. [11:41]
Addax he does? I mean, he does, but... [11:42]
Maldivia lol768: if the users enters "" - how do you know if they mean "get off" or "get%20off" ? [11:42]
surial lol768: perhaps leave the attitude of 'the world owes me a parser like firefox's' behind. [11:42]
lol768 And you guys come across condescending [11:42]
up|ime lol768: it probably still won't work, users will break whatever you write. [11:42]
surial lol768: yes but you need help, we don't. [11:42]
lol768 shrugs [11:42]
lol768 I can use [11:42]
lol768 I thought I'd ask if there was a better approach [11:42]
surial lol768: Seems fair to me that you should have a little more patience than we do here. At any rate, it's likely that whatever you come up with can be broken by someone who's really trying, and you'll have to write it yourself: Keep % sequences intact, find ONLY invalid characters and replace just those with the appropriate % sequence. [11:42]
lol768 I appreciate the suggestions, surial [11:43]
surial lol768: here, I'll give you a first start: /** Takes URIs even if invalid and tries to turn them into valid ones on a best-guess best-effort basis */ public static String uriCleaner(String in) {return in.replace(" ", "+");} [11:43]
lol768 I think that, plus looking at how the browsers do it is a good start [11:43]
Maldivia _BIGSHOT_: what kind of data are you showing in your table, and what is the backing model for it? [11:43]
_BIGSHOT_ Maldivia, can you give an example as to how to use cell renderer to change the cell color based on values which are not in the column [11:43]
_BIGSHOT_ Maldivia, i have 2 values and based on it i want to change the cell color of the column [11:44]
Maldivia _BIGSHOT_: and how do these two values relate? [11:44]
_BIGSHOT_ those 2 values are not in the tablecolumn but will calculate externally [11:44]
_BIGSHOT_ symbols [11:44]
_BIGSHOT_ values are related to symbol [11:44]
Maldivia well, access those symbols then from the cell? [11:44]
mohsen_1 Addax: no problem? [11:44]
surial in practice you probably want a definition of 'not valid chracter' (space and ^ should be in this definition), so that you can take all such chars and replace them with + for space and their % equivalent for the rest. Not sure if you want to go into invalid parts too (imagine I wrote :::com//foo/bar - characterwise its all valid, but triple colon at the start is, as far as I know, not valid. Also, is 'com' a valid server? Could [11:44]
surial resolve locally.. do you want to fix that? [11:44]
_BIGSHOT_ no [11:44]
Maldivia _BIGSHOT_: for example code from google: [11:44]
Maldivia _BIGSHOT_: here the updateItem reads the actual cell-data -- but you could just as well read from a database etc from that method [11:45]
_BIGSHOT_ k [11:46]
Maldivia _BIGSHOT_: to extract the example from the above website; here it makes a call to some other object or something to get a list of people that has birthday on that particular date, assuming the table is showing a Calendar - [11:49]
_BIGSHOT_ got it i'm trying now [11:50]
Maldivia this assumes you have some kind of relation between the cell value and ther other value -- if it's based on row/column, then read those from the cell instead [11:51]
lol768 I don't see a problem with "http://com". The ai TLD has an A record and is reachable with http://ai. [11:53]
lol768 lol768's title: "Offshore Information Services Ltd." [11:53]
surial lol768: neither does URI.create. [11:55]
lol768 Good, I wouldn't expect it to :) [11:57]
t2mkn [t2mkn!~t2mkn@] has joined ##java [11:57]
lol768 com on its own is a bit more difficult I guess. I think most browsers would see that as a relative link, though I may be wrong [11:58]
Maldivia "com" would be relative to base "http://com" would be absolute [11:58]
lol768 Yeah [11:58]
_BIGSHOT_ [_BIGSHOT_!~big__@unaffiliated/niceguy00] has joined ##java [12:03]
jrzz [jrzz!~jrzz@2001:bc8:6010:206:ae1f:6bff:fe27:2e94] has joined ##java [12:04]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [12:06]
frc[m] [frc[m]!frcmatrixo@gateway/shell/] has joined ##java [12:13]
SuperTyp [SuperTyp!] has joined ##java [12:13]
_BIGSHOT_ Maldivia, i am getting red error at @Override annotation what's wrong? [12:13]
Maldivia _BIGSHOT_: because you have the generics in the wrong order [12:16]
_BIGSHOT_ where? [12:16]
Maldivia _BIGSHOT_: TableCell<String, GetPivots> [12:16]
_BIGSHOT_ ah thanks [12:16]
Maldivia TableCell<TableOrColumnType, CellType> [12:16]
Maldivia so you probably home something wrong somewhehre -- I assume your TAble is not a TableView<String> :D [12:17]
orbyt_ [orbyt_!~orbyt@] has joined ##java [12:18]
_BIGSHOT_ Maldivia, column type is string [12:18]
_BIGSHOT_ getpivots is the object with which i fill the tableview [12:18]
comrad [comrad!~comrad@holarse/core/comrad] has joined ##java [12:19]
_BIGSHOT_ Maldivia, nothing is wrong with generics [12:19]
Maldivia well, then your method should be updateItem(String, boolean) [12:20]
Maldivia since you're saying the cell-type is String [12:20]
_BIGSHOT_ [12:21]
Maldivia _BIGSHOT_: so your table is something like ? [12:21]
_BIGSHOT_ yes [12:21]
_BIGSHOT_ getpivot2.y not getpivot3.y [12:21]
_BIGSHOT_ Maldivia, you there bud? [12:25]
_BIGSHOT_ GetPivots cannot be converted to String [12:25]
Maldivia _BIGSHOT_: should be able to get the GetPivots via the row then -- [12:25]
_BIGSHOT_ Maldivia, but what's wrong with previous approach? [12:26]
Maldivia somewhere else you've specified that this column contains a String and specified how to convert the GetPivots to a String [12:26]
forgottenone [forgottenone!~forgotten@] has joined ##java [12:27]
Kol [Kol!] has joined ##java [12:27]
fatdragon [fatdragon!] has joined ##java [12:28]
Maldivia you can either say that the cell contains a GetPivots there, and then in this cell renderer tell it how to extract the String, or rad the GetPivots from the row [12:28]
_BIGSHOT_ Maldivia, here [12:29]
_BIGSHOT_ how to implement my previous code in above code block? [12:29]
Maldivia you have everything here though... [12:30]
metrixx_ [metrixx_!~metrixx@unaffiliated/metrixx] has joined ##java [12:30]
_BIGSHOT_ huh? [12:30]
Maldivia replace the body of if (gp != null) {...} [12:30]
Maldivia although, the code you pasted before with the loop over datam doesn't do what you want it to do :D (it always sets the color based on the last item in datam) [12:32]
bobek_ [bobek_!~bobek@unaffiliated/bobek] has joined ##java [12:36]
socoro Hi, could anyone recommend me a book/lectures about JVM internals? Possibly something you have read. O:-) [12:37]
Maldivia socoro: JVM internals is a rather broad topic... anything in particular _ [12:39]
socoro Maldivia: I would like to understand JIT compiler more indepth [12:40]
socoro There are many resources about Java language. I know Java language to certain degree and I would like to peel the onion one step further [12:42]
Maldivia jvms [12:42]
Maldivia Maldivia, jvms is short for the 'Java Virtual Machine Specification'; it is the official spec that defines what java (the virtual machine) is. You can find it at - you can also find the 'Java Language Specification' there, which defines java (the language). [12:42]
yawkat i dont think there are books on how the jit is implemented [12:43]
socoro thank you guys, I'll look tomorrow. I gotta go now. Thanks a bunch!! [12:43]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [12:47]
SolarFlare [SolarFlare!~SamanthaB@unaffiliated/samanthabdawn] has joined ##java [12:55]
esro [esro!~esro@] has joined ##java [12:57]
_BIGSHOT_ Maldivia, after running this code the "Symbol" column disappears! there's not text to be seen!! [01:01]
_BIGSHOT_ Maldivia, <-- this one [01:02]
_BIGSHOT_ with all the setCellFactory calls on symbolColumn [01:02]
_BIGSHOT_ [_BIGSHOT_!~big__@unaffiliated/niceguy00] has joined ##java [01:04]
_BIGSHOT_ i got disconnected Maldivia [01:04]
_BIGSHOT_ Maldivia, you there bud? [01:05]
freeone3000 You set the cell factory three times? With equivilent code? [01:06]
_BIGSHOT_ no [01:06]
freeone3000 Line 1, line 53, line 95? [01:07]
_BIGSHOT_ 1 cell factory opens link 2nd cell factory changes color of the cell and 3rd cell factory is default color [01:07]
yawkat do you know what setCellFactory does [01:08]
Lymia [Lymia!] has joined ##java [01:08]
hussam [hussam!uid193284@gateway/web/] has joined ##java [01:10]
_BIGSHOT_ freeone3000, any clue why does the Symbol Column disappear from the table? [01:10]
freeone3000 _BIGSHOT_: Because your third cell factory doesn't set the text. [01:11]
freeone3000 _BIGSHOT_: Your first two cell factories aren't used. [01:11]
_BIGSHOT_ which line? [01:11]
_BIGSHOT_ line # [01:11]
megaTherion [megaTherion!] has joined ##java [01:12]
_BIGSHOT_ oh hold on [01:12]
bobek_ [bobek_!~bobek@unaffiliated/bobek] has joined ##java [01:13]
_BIGSHOT_ line#109 sets the text freeone3000 [01:13]
_BIGSHOT_ you are saying 3rd doesn't set the text [01:13]
deathcap [deathcap!] has joined ##java [01:15]
bathtub_shark parted the channel: "y" [01:15]
deathcap Wouldn't it be great if the .addActionListener method in a lot of the Swing classes could accept a lambda? [01:15]
bathtub_shark [bathtub_shark!zarthus@trivialand/guesser/zarthus] has joined ##java [01:16]
yawkat well lucky you [01:16]
_BIGSHOT_ freeone3000, you there bud? [01:17]
gelignite [gelignite!] has joined ##java [01:17]
freeone3000 deathcap: It can. [01:18]
deathcap What? since when? [01:19]
deathcap We're stuck on 8 [01:19]
freeone3000 deathcap: Since 8. [01:19]
freeone3000 deathcap: ActionListener is a Single-Abstract-Method interface, so (evt) -> { } is a valid ActionListener. [01:19]
deathcap ...I had no idea. [01:20]
freeone3000 _BIGSHOT_: Check whether you're hitting line 111. [01:20]
deathcap huh, somehow I completely and totally overlooked that in the documentation. Well, that makes me happy. [01:21]
blackntan [blackntan!~blackntan@unaffiliated/blackntan] has joined ##java [01:23]
_BIGSHOT_ freeone3000, when i execute this code symbol column disappears! [01:27]
_BIGSHOT_ Maldivia, you there bud [01:29]
_BIGSHOT_ ? [01:29]
yawkat have you considered being less of an ass by not constantly highlighting people [01:30]
pswartz [pswartz!] has joined ##java [01:31]
t2mkn [t2mkn!~t2mkn@] has joined ##java [01:32]
freeone3000 your indention doesn't reflect your code flow. fix that, and your problem is obvious. [01:36]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [01:38]
Mimicize [Mimicize!~mime@unaffiliated/mimicize] has joined ##java [01:39]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [01:40]
nbro [nbro!~nbro@2a02:aa13:3100:6000:90ae:6de7:c049:51bd] has joined ##java [01:47]
_BIGSHOT_ freeone3000, i formatted it and added if else but it still doesn't fix the disappearing Symbol column [01:49]
freeone3000 _BIGSHOT_: You have branches where setText() is not called. [01:50]
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [01:51]
_BIGSHOT_ freeone3000, does this branch require setText("")? if (!empty && getTableRow() != null && getTableRow().getItem() != null) { [01:52]
freeone3000 _BIGSHOT_: What if you set the text you're given independent of your color logic? [01:53]
mindCrime [mindCrime!~mindCrime@] has joined ##java [01:53]
_BIGSHOT_ freeone3000, it is still disappearing! [01:56]
_BIGSHOT_ freeone3000, is this correct way to declare? final ObservableList<GetWPivots> dataw = FXCollections.observableArrayList(); [01:59]
_BIGSHOT_ final ObservableList<GetMPivots> datam = FXCollections.observableArrayList(); [01:59]
_BIGSHOT_ maybe datam and dataw don't have any values in them? [02:00]
Bombe Maybe. [02:00]
freeone3000 _BIGSHOT_: That's not unconditional. [02:00]
_BIGSHOT_ huhy? [02:00]
freeone3000 _BIGSHOT_: There are branches where .setText() is not called. [02:01]
freeone3000 _BIGSHOT_: What if you just put setText(item); on line 19? [02:01]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:01]
_BIGSHOT_ oh superb! [02:02]
_BIGSHOT_ freeone3000, is the "for" loop inside of setCellFactory OK? i am not getting the coloration correctly! [02:24]
adadelta|txter [adadelta|txter!~gulli@unaffiliated/gulli] has joined ##java [02:24]
adadelta|txter [adadelta|txter!~gulli@unaffiliated/gulli] has joined ##java [02:25]
freeone3000 why are you setting the color for the entire cell for every iteration of a for loop? [02:27]
Zee- [Zee-!] has joined ##java [02:28]
ziper02 [ziper02!~ziper02@] has joined ##java [02:29]
conan [conan!] has joined ##java [02:29]
Bombe I think the ?why? should be clear about now. [02:31]
EgonX [EgonX!~Egon@2601:2c6:480:7235:9cf6:6a01:d5ee:3037] has joined ##java [02:32]
freeone3000 Trying really patiently to get him to fix his own code. [02:32]
_BIGSHOT_ freeone3000, because datam and dataw don't have their column in the TableView [02:33]
_BIGSHOT_ how to associate datam/dataw to GetPivots? that's why I used for loop to loop through find the 'match' and replace the color [02:34]
_BIGSHOT_ GetPivots list [02:34]
freeone3000 _BIGSHOT_: I don't understand the questoin. [02:36]
_BIGSHOT_ GetPivots list has "Symbol Column" and datam and dataw need to have some "association" with GetPivots list [02:36]
_BIGSHOT_ GetPivots p; p.getSymbolProperty(), but how to find values of datam and dataw related to GetPivots p? [02:37]
_BIGSHOT_ all 3 GetPivots p, dataw and datam have only one thing is "common" i.e. the "Symbol" [02:38]
_BIGSHOT_ one thing *in* [02:38]
freeone3000 What association do they have in your mind? [02:38]
_BIGSHOT_ same symbol [02:39]
freeone3000 what's a datam? [02:39]
_BIGSHOT_ datam.getSymbolProperty dataw.getSymbolProperty and GetPivots p; p.getSymbolProperty()! when all 3 "match" i compare their values to color the cells!!! [02:39]
freeone3000 Are you familiar with the concept of a table? [02:40]
_BIGSHOT_ a bit [02:40]
adadelta [adadelta!~gulli@unaffiliated/gulli] has joined ##java [02:40]
_BIGSHOT_ GetPivots <-- this has all the columns for tableview [02:40]
_BIGSHOT_ i created GetMPivots and GetWPivots just for coloring the table row! [02:41]
freeone3000 Why? [02:41]
_BIGSHOT_ for easy access with eyes you know so that i can notice all the changes with colors separation [02:41]
kgrimes2 [kgrimes2!] has joined ##java [02:42]
_BIGSHOT_ do you have some other design pattern in mind? i know my way is hackish but want it to work [02:42]
freeone3000 Sure. Fix your understanding of data modelling. [02:42]
_BIGSHOT_ what do you suggest [02:42]
_BIGSHOT_ freeone3000, so what i have done still now is a total failure? [02:42]
_BIGSHOT_ till* [02:43]
freeone3000 You have some data sequence, datam. You have another data sequence, dataw. Each has a property named symbol. You appear to want to do a cross join on datam and dataw on symbol. [02:43]
_BIGSHOT_ yes [02:43]
freeone3000 Okay. A cell renderer is not the appropriate place to do this. [02:43]
_BIGSHOT_ then [02:43]
_BIGSHOT_ also cross join mean comparison right? [02:44]
_BIGSHOT_ if not cell renderer then? [02:44]
_BIGSHOT_ oh maybe i should create another class and make an object out of all the 3 objects [02:45]
freeone3000 No. It's what SQL calls the operation where: Given tables A and B: The output columns are all columns in A and all columns in B. For every entry in table A that does not have a matching column in table B (where "matching" is defined as the same value in column X), set the table row to the values from A with the columns from B being null. For every entry in B where there is no entry in A, do the same. For every entry with both, set the row [02:46]
freeone3000 to contain both. [02:46]
freeone3000 So yes, you probably should do the operation to match datam rows to dataw rows and output the final table *first*, then feed this as data to your javafx Table. [02:47]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [02:48]
_BIGSHOT_ no no here datam (GetMPivots) dataw (GetWPivots) and p (GetPivots) all are of *same* size and have one thing is command i.e. "symbol" [02:48]
freeone3000 Right. [02:48]
freeone3000 So would the above approach produce incorrect results? [02:48]
_BIGSHOT_ freeone3000, what way do you suggest i should make a match? [02:49]
_BIGSHOT_ which data structure should i use [02:49]
wtflux [wtflux!] has joined ##java [02:50]
freeone3000 _BIGSHOT_: List<TableRow> or somesuch, where TableRow is a quick class that contains your datamValue, dataW value, pValue, and Symbol [02:50]
_BIGSHOT_ TableRow of javafx? or just a name? [02:51]
_BIGSHOT_ List<MyRowCompare> [02:51]
_BIGSHOT_ oh nvm [02:52]
_BIGSHOT_ anyways bye now later ;) [02:53]
w17t [w17t!~w17t@unaffiliated/w17t] has joined ##java [02:54]
Bombe So, freeone3000, how did that work out for you? [02:58]
FloggerXXX [FloggerXXX!] has joined ##java [02:58]
peaceguy [peaceguy!~yu68@unaffiliated/peaceguy] has joined ##java [03:02]
CodeMouse92 [CodeMouse92!~JasonMc92@unaffiliated/codemouse] has joined ##java [03:06]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [03:10]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [03:17]
RickyB98 [RickyB98!022029a5@mediawiki/rickyb98] has joined ##java [03:21]
RickyB98 hello! how would you fix this hash collision? [03:22]
adder [adder!~adder@gateway/tor-sasl/adder] has joined ##java [03:23]
deavmiLaptopHome [deavmiLaptopHome!~deavmi@] has joined ##java [03:27]
Revan- [Revan-!] has joined ##java [03:31]
yawkat dont rely on hashcode for uniqueness [03:31]
yawkat hashcode collisions are normal and common [03:32]
FloggerXXX [FloggerXXX!] has joined ##java [03:40]
tachoknight [tachoknight!~tachoknig@] has joined ##java [03:40]
CAPITANOOO [CAPITANOOO!~CAPITANOO@] has joined ##java [03:43]
goldstar I have a weird issue with the stream API's sorted() method. I am trying to sort a HashMap with sorted(Map.Entry.comparingByValue()) but it's sorting by the key instead ? [03:44]
goldstar the value was a Long, but I decided to change it to a String but that didn't abode well either [03:44]
goldstar ex value is: 1542077686274 [03:44]
wildlander [wildlander!~wildlande@unaffiliated/wildlander] has joined ##java [03:48]
orbyt_ [orbyt_!~orbyt@] has joined ##java [03:52]
cheeser show us [03:54]
cheeser Paste the code (and any errors) in a pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems. [03:54]
nbro_ [nbro_!~nbro@2a02:aa13:3100:6000:482d:94d9:77:43c3] has joined ##java [04:00]
goldstar cheeser: [04:01]
goldstar this particular example isn't sorting either column [04:01]
yawkat well youre putting it in a hashmap again... [04:04]
cheeser put it in a TreeMap [04:05]
cheeser new TreeMap().putAll(map); [04:05]
cheeser done [04:05]
goldstar yawkat how else is one to do it ? [04:06]
goldstar cheeser, i'll give that a spin [04:07]
goldstar still pretty new to the stream api [04:07]
yawkat treemap would be keys [04:08]
goldstar yeh, treemap is keys. I need it for values [04:09]
mike802 parted the channel: [04:12]
goldstar it works fine up to sorted btw [04:13]
goldstar its the collect() bit that messes up the order again [04:13]
yawkat yes, because HashMap is not ordered [04:13]
goldstar yawkat: hmm right, so what do you suggest ? [04:15]
webmariner [webmariner!] has joined ##java [04:23]
wordsToLiveBy [wordsToLiveBy!~wordsToLi@unaffiliated/wordstoliveby] has joined ##java [04:24]
Bombe Put it in a LinkedHashMap, that preserves insertion order. [04:24]
Revan- [Revan-!] has joined ##java [04:25]
cheeser oh, right. by values. [04:26]
cheeser yeah. LHM is the answer. [04:26]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [04:27]
cfoch [cfoch!uid153227@gateway/web/] has joined ##java [04:28]
goldstar cheeser: yep, that did fix it. Now the browser is sorting the keys in asc :\ [04:32]
goldstar guess I will have to switch the two then [04:33]
orbyt_ [orbyt_!~orbyt@] has joined ##java [04:37]
Nightwing52 [Nightwing52!] has joined ##java [04:43]
gelignite [gelignite!] has joined ##java [04:50]
sticaz [sticaz!] has joined ##java [05:03]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::20e] has joined ##java [05:04]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [05:12]
orbyt_ [orbyt_!~orbyt@] has joined ##java [05:22]
rtjure [rtjure!~rtjure@] has joined ##java [05:23]
orbyt_ [orbyt_!~orbyt@] has joined ##java [05:40]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:42]
InfiniteLoop [InfiniteLoop!~InfiniteL@2001:a61:60c:2901:f81e:df20:3119:df4e] has joined ##java [05:42]
Teckla Ha, nice, the company I work for waits until the last minute to scramble off of Java 8. [05:48]
Teckla Err, *Oracle* Java 8. [05:48]
jtiner [jtiner!] has joined ##java [05:54]
HarlinS [HarlinS!~hseritt@2603:300b:69a:c000:988c:4669:16cc:d58] has joined ##java [05:55]
Diablo-D3 Teckla: well, you could just switch to adoptopenjdk java 8 [05:58]
Teckla I think The Powers That Be are looking into using some Java from AWS. [05:59]
blackntan-airboo [blackntan-airboo!~blackntan@unaffiliated/blackntan] has joined ##java [05:59]
deavmiLaptopHome [deavmiLaptopHome!~deavmi@] has joined ##java [06:00]
deavmi [deavmi!~deavmi@] has joined ##java [06:00]
Diablo-D3 Teckla: I wouldnt. [06:04]
ItsNotGoodName [ItsNotGoodName!] has joined ##java [06:04]
Diablo-D3 its just some old java that amazon maintains for amazon customers [06:04]
yawkat I think people like it because they give solid lts deadlines and pass tck [06:05]
yawkat But adoptopenjdk is probably the better choice [06:05]
yawkat Not that it really matters anyway [06:06]
yawkat They're all the same [06:06]
Diablo-D3 the only thing you need to worry about is if theres an upgrade path for your branch via your chosen vendor [06:07]
Diablo-D3 oracle basically forces you to pay, or be forced to constantly upgrade major versions [06:08]
Diablo-D3 adoptopenjdk just provides binaries of openjdk, which is what everyone else builds too [06:08]
Diablo-D3 and doesn't jerk people around with security updates [06:09]
Diablo-D3 azul is if you want a paid support jdk, but don't want to give oracle money [06:09]
Diablo-D3 and amazon coretto is amazon's own java 8 branch that runs amazon's java code, but is still just an openjdk build like everything else [06:10]
orbyt_ [orbyt_!~orbyt@] has joined ##java [06:11]
Diablo-D3 and it seems they're stuck with 8 for lts, and not providing any future versions anytime soon [06:11]
Diablo-D3 and I have no clue what IBM and Red Hat are doing with theirs [06:12]
Diablo-D3 but the only one thats guaranteed to be functional and sane is adoptopenjdk [06:13]
Diablo-D3 imo anyways [06:13]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [06:18]
shicks_ [shicks_!] has joined ##java [06:22]
SuperTyp [SuperTyp!] has joined ##java [06:27]
immibis [immibis!] has joined ##java [06:28]
ericek111 [ericek111!] has joined ##java [06:28]
philippirrip [philippirrip!~pip@] has joined ##java [06:28]
games_ hi -- i'm having trouble extracting a method. [06:32]
games_ [06:32]
games_ I'm not sure if i need to use the Class API, reflection, or something else. any advice would be appreciated. [06:32]
Addax why do you need extracted methods? It's one line [06:32]
games_ it's actually more. but this is the bit that's different [06:34]
games_ the other lines will just be copied and pasted in, Addax [06:34]
games_ i basically need to parameterize on the Type [06:34]
Addax well, parameterize: <T> Type extractType() { return new TypeToken<List<T>>().getType(); } [06:34]
games_ that method doesnt have a parameter...dont i need to pass in whether it's A or B to the method [06:37]
Addax hold on, and be prepared for this to be an ~xy thing [06:38]
games_ xy [06:38]
games_ XY Problem: You have problem X, and you think Y is a good solution, so now you are asking about how to do Y. However, maybe Y is not a good way to solve X. Maybe you should take a step back and tell us about X first. More: [06:38]
games_ Addax: perhaps this makes things a little more clear? [06:41]
rager [rager!] has joined ##java [06:43]
rager hi... having trouble with log4j [06:43]
rager I've got this config: [06:43]
rager it feels like it _should_ let me see all my logs with that config [06:44]
rager but all I see are Error level ogs [06:44]
rager logs, that is [06:44]
NorthwestVegan [NorthwestVegan!~Northwest@gateway/tor-sasl/northwestvegan] has joined ##java [06:44]
Addax games_: still what I said, I think: <T> List<T> getList(String content) { Gson gson=new Gson(); Type aType=new TypeToken<List<T>>(){}.getType(); return gson.fromJson(result,aType); } [06:44]
Addax untested, of course [06:44]
conan [conan!] has joined ##java [06:47]
orbyt_ [orbyt_!~orbyt@] has joined ##java [06:48]
games_ Addax: it seems to work. honestly this is exposing my ignorance about java generics [06:49]
Addax games_: I don't normally use gson, and I don't have any test data for this, so I can't just throw together a test like I'd like [06:49]
games_ List<A> results = getList(content); // <---- so when i pass in A as the list generic type...that's how the method knows to use A [06:50]
games_ right? [06:50]
Addax You don't have to pass in a type argument at all, I don't think [06:50]
games_ sorry -- "pass in" is a loaded term. i meant, when I specify `List<A>` [06:51]
Addax I think just using the right type is enough for the compiler [06:51]
games_ the compiler infers that `A` is the `T` type variable basically [06:52]
Addax [06:54]
Addax output here is: [{quux=a, quargle=b}] [06:54]
Addax gson 2.8.5, java 11 [06:57]
games_ Addax: thanks so much for all this. (i have an ide with the code already, so i tested it). [07:09]
games_ i think the big learning thing for me was, the compiler infers the "type" based on the generic you assign to the list. [07:10]
victorxray [victorxray!] has joined ##java [07:10]
PearlJO [PearlJO!~Pearl@unaffiliated/pearljo] has joined ##java [07:20]
sir_galahad_ad [sir_galahad_ad!] has joined ##java [07:21]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [07:31]
victorxray [victorxray!] has joined ##java [07:33]
sir_galahad_ad [sir_galahad_ad!] has joined ##java [07:37]
rkazak [rkazak!] has joined ##java [07:39]
adadelta [adadelta!~gulli@unaffiliated/gulli] has joined ##java [07:46]
zulutango [zulutango!] has joined ##java [07:47]
theWhisper_ [theWhisper_!~quassel@unaffiliated/thewhisper/x-7482734] has joined ##java [07:55]
mitch0 [mitch0!] has joined ##java [08:00]
orbyt_ [orbyt_!~orbyt@] has joined ##java [08:07]
games_ j/k it's not working [08:36]
games_ java.lang.ClassCastException: cannot be cast to com.chainalysis.aggregation.featurestore.model.TransactionFeatureResult [08:36]
nbro [nbro!~nbro@2a02:aa13:3100:6000:482d:94d9:77:43c3] has joined ##java [08:36]
games_ java.lang.ClassCastException: cannot be cast to com.gaurage.user.User_Test_Main.promiseMethod [08:39]
games_ e.g, [08:40]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [08:45]
p[a]ddy [p[a]ddy!~paddyez@wikipedia/paddyez] has joined ##java [08:55]
theWhisper_ [theWhisper_!~quassel@unaffiliated/thewhisper/x-7482734] has joined ##java [09:03]
nbro_ [nbro_!~nbro@2a02:aa13:3100:6000:ddc9:7b23:92fe:1bb6] has joined ##java [09:04]
EgonX [EgonX!~Egon@2601:2c6:480:7235:750b:fe2b:10d:3612] has joined ##java [09:08]
theWhisper_ hi [09:22]
theWhisper_ any play framework channel [09:22]
theWhisper_ ? [09:22]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [09:36]
cheeser google play framework irc channel [09:39]
cheeser theWhisper_, [09:39]
theWhisper_ yeah [09:39]
theWhisper_ saw it [09:39]
theWhisper_ play is dead [09:39]
Xgc [Xgc!~Jon@] has joined ##java [09:40]
dj_pi [dj_pi!] has joined ##java [09:41]
xlxnnx [xlxnnx!~xlxnnx@] has joined ##java [09:54]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [09:55]
orbyt_ [orbyt_!~orbyt@] has joined ##java [09:57]
pr3d4t0r [pr3d4t0r!] has joined ##java [10:16]
tassee [tassee!] has joined ##java [10:35]
theWhisper__ [theWhisper__!~quassel@unaffiliated/thewhisper/x-7482734] has joined ##java [10:43]
chaterz [chaterz!~Ninjacode@unaffiliated/chaterz] has joined ##java [10:49]
chaterz hi [10:49]
nivU0r someone alive ? [10:52]
Masterph_ [Masterph_!~Masterphi@unaffiliated/masterphi] has joined ##java [10:53]
Xiti [Xiti!~Xiti-@unaffiliated/xiti] has joined ##java [10:54]
orbyt_ [orbyt_!~orbyt@] has joined ##java [10:55]
AMcBain [AMcBain!] has joined ##java [10:57]
wordsToLiveBy [wordsToLiveBy!~wordsToLi@unaffiliated/wordstoliveby] has joined ##java [11:01]
t2mkn [t2mkn!~t2mkn@] has joined ##java [11:09]
xlxnnx [xlxnnx!~xlxnnx@] has joined ##java [11:12]
SJr I am alive, nivU0r [11:24]
katiex7 [katiex7!] has joined ##java [11:25]
orbyt_ [orbyt_!~orbyt@] has joined ##java [11:25]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [11:29]
djhworld [djhworld!~djhworld@] has joined ##java [11:37]
sb35 [sb35!~sb35@] has joined ##java [11:48]