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

« 2019-09-10


2019-09-12 »

Nick Message Date
Janhouse [Janhouse!] has joined ##java [12:05]
Diablo-D3 [Diablo-D3!] has joined ##java [12:05]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [12:17]
Diablo-D3 [Diablo-D3!] has joined ##java [12:25]
johndoe231 [johndoe231!~johndoe@] has joined ##java [12:39]
tassee [tassee!] has joined ##java [12:41]
nokdoot [nokdoot!~nokdoot@] has joined ##java [12:45]
realtime_ [realtime_!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [12:47]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [12:55]
nullniverse [nullniverse!~dkovalev@unaffiliated/nullniverse] has joined ##java [12:57]
rorx [rorx!] has joined ##java [01:05]
paws_ [paws_!uid89121@gateway/web/] has joined ##java [01:08]
g00s [g00s!~g00s@unaffiliated/g00s] has joined ##java [01:17]
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [01:21]
tracks [tracks!~tracks@2600:1700:ade0:4400:d90d:a6cd:d645:783a] has joined ##java [01:38]
puppy_za [puppy_za!uid277586@gateway/web/] has joined ##java [01:48]
progart [progart!~kamee@] has joined ##java [01:53]
progart [progart!~kamee@] has joined ##java [01:55]
BluesBoy [BluesBoy!] has joined ##java [01:57]
Jantz [Jantz!] has joined ##java [01:57]
LtHummus [LtHummus!] has joined ##java [02:01]
tracks [tracks!~tracks@2600:1700:ade0:4400:d90d:a6cd:d645:783a] has joined ##java [02:02]
abclove making android app using java vs making youtube video using recorder, which is more easier? [02:02]
deebo there is no java on android so it's ruled out as impossible [02:03]
abclove android app is made by java? [02:04]
Diablo-D3 [Diablo-D3!] has joined ##java [02:05]
cnsunyour [cnsunyour!~cnsunyour@2408:8207:18e9:3f70:cd61:5447:ee5e:55cb] has joined ##java [02:06]
ravenousmoose [ravenousmoose!] has joined ##java [02:06]
Diablo-D3 [Diablo-D3!] has joined ##java [02:15]
learningc [learningc!] has joined ##java [02:16]
moeng00 [moeng00!~moeng@2001:41d0:1:ff97::1] has joined ##java [02:16]
royal_screwup21 [royal_screwup21!5c62a718@gateway/web/cgi-irc/] has joined ##java [02:21]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:22]
zikani03 [zikani03!~zikani03@] has joined ##java [02:35]
Albright [Albright!~Albright@2001:19f0:6001:1b15:6bb0:5525:8a7d:60f5] has joined ##java [02:37]
abclove public void takeRisk() throw BadException {? } <? how throw BadException can be added to function? it is correct? [02:39]
bnyio [bnyio!] has joined ##java [02:43]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [02:48]
TomyWork [TomyWork!~TomyLobo@] has joined ##java [02:55]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [02:58]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [03:03]
sdu [sdu!] has joined ##java [03:05]
immibis [immibis!] has joined ##java [03:07]
acidjnk_new [acidjnk_new!] has joined ##java [03:10]
Quick_Wango [Quick_Wango!] has joined ##java [03:12]
newbieG [newbieG!~bhaskar@] has joined ##java [03:21]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [03:22]
hojang [hojang!hojang@nat/redhat/x-rclgburzjxmcgxxk] has joined ##java [03:25]
exonity01 [exonity01!uid364582@gateway/web/] has joined ##java [03:27]
ipe [ipe!~ipe@] has joined ##java [03:35]
hojang [hojang!hojang@nat/redhat/x-bfjrkuhiiibjefxc] has joined ##java [03:40]
Bombe abclove, can you clarify what you?re asking? [03:43]
abclove public void takeRisk() {} <? method must be end like this [03:44]
abclove but there is something in the method [03:44]
Bombe abclove, if you want to throw an exception, ?throw new BadException(?)? is the way. If you want to declare that a method can throw an exception the correct syntax would be ?throws BadException?. [03:44]
abclove like this : public void takeRisk() throw BadException {? } [03:44]
johndoe231 [johndoe231!~johndoe@] has joined ##java [03:49]
Bombe abclove, if you want to throw an exception that is not a RuntimeException (or a subclass) you _have_ to declare it; no way around that. [03:51]
abclove ok Bombe [03:52]
minos_ [minos_!] has joined ##java [03:58]
johndoe231 Spring security seems to have a Bcrypt.hashpw() function and a BcryptPasswordEncoder to hash passwords. Which one should i be using? [04:06]
enoq [enoq!] has joined ##java [04:10]
immibis [immibis!] has joined ##java [04:12]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [04:12]
Chernabog__ [Chernabog__!] has joined ##java [04:21]
Diablo-D3 [Diablo-D3!] has joined ##java [04:25]
johndoe231 [johndoe231!~johndoe@] has joined ##java [04:34]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [04:34]
Diablo-D3 [Diablo-D3!] has joined ##java [04:36]
Chernabog_ [Chernabog_!] has joined ##java [04:45]
Diablo-D3 [Diablo-D3!] has joined ##java [04:56]
Diablo-D3 [Diablo-D3!] has joined ##java [05:07]
dreamreal abclove: have you considered doing the java tutorial? [05:09]
dreamreal I know we've suggested it to you multiple times, but.. have you ever considered following the advice? [05:09]
abclove i m reading hf2 now [05:10]
abclove ( [05:10]
dreamreal Yeah, that's not what I asked, and we've already pointed out the flaws in what you're doing [05:10]
abclove hf2 is not good? [05:10]
dreamreal As we've said multiple times, it's very badly outdated. No, it's not good. [05:11]
abclove 382 / 701 [05:11]
abclove now [05:11]
dreamreal don't care. [05:11]
dreamreal You have 382 pages of stuff that's barely useful at all, compared to a free tutorial that's pretty much 100% useful. [05:11]
abclove then i must start java from start [05:11]
abclove ( [05:11]
Bombe That?s where you usually start, nothing bad about that. [05:11]
dreamreal no, because you MIGHT be able to apply what you know already, although you seem to have few basics mastered for someone over halfway through HF2. [05:12]
tracks_droid [tracks_droid!~androirc@2600:100d:b144:8f8b:0:1f:e728:e01] has joined ##java [05:12]
dreamreal Programming is programming, although you seem to have learned *java* and not much about *programming*. [05:12]
Bombe What?s HF2, anyway? [05:12]
abclove i will master hf2 till end anyway [05:12]
dreamreal head First Java 2 [05:12]
dreamreal abclove: dear god, why [05:12]
Bombe Ah. [05:12]
dreamreal see, this is why I wonder about your aptitude for this [05:12]
dreamreal I admire the commitment but teh commitment is stupid [05:13]
abclove if i stop reading it, then it mean that i waste time [05:13]
Bombe No but if you keep reading you are wasting your time. [05:13]
dreamreal You aren't *wasting* your time, exactly... you're wasting probably 80% of it, but not all of it [05:14]
dreamreal being a decent programmer often means exploring a technique and evaluating it. When you find out it fails to do what you need, you don't... keep on going to the end just for the heck of it. You abandon it. You find something better. [05:15]
abclove i m reading gui now almost gone [05:15]
dreamreal yet you've learned almost nothing. [05:15]
dreamreal sighs [05:15]
dreamreal why'd you buy HF2 anyway? It's from 2005. It's 2019. [05:15]
quadsar [quadsar!~quadsar@unaffiliated/quadsar] has joined ##java [05:15]
abclove dreamreal: i read it for free because it is pdf [05:15]
abclove no money to buy book now [05:16]
abclove so i find free something [05:16]
dreamreal oh. Like the tutorial? [05:16]
abclove yeah [05:16]
dreamreal Which has always been free and, like, comes up #1 on google searches for "java tutorial"? [05:16]
abclove pdf from web [05:16]
dreamreal BTW, I *believe* HF2 is not gratis [05:17]
dreamreal so you're kinda telling us you stole it [05:17]
abclove youtube video :( [05:17]
Diablo-D3 [Diablo-D3!] has joined ##java [05:17]
dreamreal also BTW: there are published authors on ##java, for whom stealing books is a bad thing [05:17]
dreamreal tutorial [05:17]
dreamreal 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. [05:17]
dreamreal ^^^^ we've shown you THIS multiple times as well [05:17]
abclove it is pdf that is shared by all people [05:18]
progart [progart!~kamee@] has joined ##java [05:18]
dreamreal don't care [05:18]
dreamreal if everyone steals it, it's still stolen [05:18]
puppy_za that awkward moment when the book author or publishers might be here :p [05:19]
abclove dreamreal: i will go with hf2 anyway [05:20]
puppy_za why "anyway" [05:20]
puppy_za because you invested in 50% of the time already? [05:20]
sonOfRa Does HF2 cover a version of java that has generics? [05:20]
sonOfRa Or is it older than generics? [05:20]
dreamreal abclove: you will have no future as a programmer unless you learn to be smarter than that [05:20]
abclove puppy_za: yeah correct [05:20]
dreamreal abclove: that's really, really stupid [05:20]
dreamreal abclove: you have 0 reason to finish HF2 [05:21]
dreamreal there's no investment to lose in switching to something far better [05:21]
abclove anyway i can do coding of java [05:21]
abclove don?t worry [05:21]
dreamreal (you stole HF2 so you aren't losing money, but the good tutorials are free) [05:21]
puppy_za it's JDK 5 [05:21]
sonOfRa You can do coding of java to a standard that's soon to be 20 years old [05:21]
dreamreal abclove: you... uh... can't code java [05:21]
dreamreal you've done 382 pages of HF2 and still ask really dumb basic questions [05:21]
dreamreal either HF2 is a TERRIBLE tutorial or you ain't learning shit [05:22]
atslash [atslash!] has joined ##java [05:22]
abclove i will read it only one time dont? worry [05:22]
puppy_za uh let's not go there [05:22]
abclove i must know bad thing also [05:22]
sonOfRa abclove: by the way the "not switching because you're halfway through" is known as the "Sunk cost fallacy". Because you have already invested in a bad idea makes you think you should invest even more into it. But the idea is still bad. [05:22]
dreamreal you really don't "must" [05:22]
puppy_za Head First Java 2 is not about Java 2 but Java 5. So it's not too bad [05:22]
dreamreal puppy_za: java 5 IS java 2! [05:23]
dreamreal j2se 1.5 <-- the "j2" is "java 2!" [05:23]
puppy_za the naming convention is confusing [05:23]
dreamreal yes, it really is [05:23]
abclove i will finish it till 2 more days [05:23]
abclove ( [05:24]
Bombe There?s just no helping some people. [05:24]
dreamreal it's java 2, standard edition, called "java 2 se 5" but the version of everything was 1.5... [05:24]
kicked abclove (not here, you won't) [05:24]
puppy_za well I was hoping to be more gentle to the absolute newbies [05:24]
puppy_za but anyway... [05:25]
dreamreal It's funny, he diminishes desire to help him with almost everything he says. He stole the book; he's committed to stupid practices; he's not even *learning* [05:25]
Bombe Well, they have shows remarkable resistance to reason? [05:25]
dreamreal puppy_za: he's been around for a long time, he's no longer an absolute newbie. [05:25]
puppy_za ok I agree with that [05:25]
puppy_za oh ok [05:25]
dreamreal When you remain a newbie for months or years, you're a cancer, not a newbie. [05:25]
sonOfRa dreamreal: to be fair, it's easy to think a book is free if the third hit on google for the book's name is a university website hosting a pdf [05:25]
hypc1 [hypc1!~Thunderbi@] has joined ##java [05:25]
dreamreal sonOfRa: yeah, that's why the books have stuff in them saying "this is who owns this, this ain't free, thanks" [05:26]
puppy_za google should down rank those sites [05:26]
puppy_za anyway [05:26]
dreamreal besides, I TOLD him it wasn't free. You can only skate by on ignorance until someone enlightens you. [05:26]
dreamreal I didn't even blame him for stealing it. [05:27]
Diablo-D3 [Diablo-D3!] has joined ##java [05:27]
puppy_za maybe that's why he didn't learn anything from the book. [05:27]
Bombe Obviously you can refuse being enlightened. [05:28]
dreamreal Bombe: yeah, but you don't get endured by ME when you do that [05:28]
Bombe Fair. [05:28]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [05:28]
dreamreal damn it, oracle. Defend your fscking copyrights. [05:30]
progart [progart!~kamee@] has joined ##java [05:30]
puppy_za wait, what's Oracle doing wrong now? [05:30]
dreamreal Nothing big. Just reported a violation to them and they're like ", it's only java" [05:31]
deebo forward that to the google lawyers re: api copyrights [05:31]
dreamreal (github site archiving java releases for use in docker without going through oracle's processes) [05:31]
puppy_za oh ok [05:32]
dreamreal deebo: bwahahaha, that's a good idea :) [05:32]
dreamreal "Look, I made a point out of reporting this to oracle, they ain't defending it, have fun" [05:32]
dreamreal Sometimes I feel like a jerk for reporting DMCA violations on github, but... [05:32]
deebo you mean installing oracle jdk via some hack of bypassing the cookies for accepting terms? [05:32]
sonOfRa honestly the worst thing about that archive is is that it enables swathes of people to download vulnerable versions [05:32]
deebo or binaries of jdk? [05:33]
dreamreal sonOfRa: which one are YOU referring to? [05:33]
sonOfRa The same one I think? We had it in this or -talk last week or so with a bunch of ancient versions [05:33]
puppy_za I also assumed it's the installers being "archived" [05:33]
dreamreal deebo: it's basically an archive of the downloaded JDKs [05:33]
deebo oh right oracle gated all oracle jdk releases? [05:33]
dreamreal sonOfRa: I don't remember. github, frekele [05:33]
puppy_za older ones, yeah [05:33]
puppy_za you need to login to download JDK 8 [05:33]
baiguai [baiguai!] has joined ##java [05:34]
sonOfRa Some guy in here was looking for a very specific version of JDK8, we told him not to, they linked a github repo that had all the old releases [05:34]
deebo that's really annoyng, same bullshit if you want any release of oracle jdbc driver [05:34]
dreamreal sonOfRa: I want to say that was older than a week for ME - same process, though [05:34]
sonOfRa May very well have been. [05:34]
deebo probably illegally uploaded it to the project maven repo to not go insane [05:34]
dreamreal deebo: the answer, though, is to switch away from oracle, not "find a way around it" [05:34]
deebo yeah for jdk thats easy, for oracle db jdbc drivers, not so much :) [05:35]
dreamreal it's an investment, yes, but that's what happens when you have a jerk vendor [05:35]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [05:35]
dreamreal ( [05:35]
puppy_za well, I can see why Oracle is not too bothered by the archive [05:36]
puppy_za too much efforts to call their lawyers [05:36]
dreamreal they OWN their lawyers [05:36]
puppy_za they are probably busy suing someone, somewhere in the world right now :p [05:37]
dreamreal "Slave! SLAAAAAVE!" "Yeth, mathter?" "Another violation. Attack." "On our way, mathter! Yeth! On our way!" [05:37]
sonOfRa Heh. A former colleague works for an it consulting biz that works for the shipyard that built larry's yacht. They *never* do oracle. They had to make an exception :D [05:37]
dreamreal See? It's another day in paradise for them! (All they'd have to do is send github a note saying "you realize we're oracle and you're not and THAT IS OUR SHIT.") [05:37]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [05:57]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@] has joined ##java [06:15]
intellect [intellect!uid258908@gateway/web/] has joined ##java [06:20]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [06:20]
ravenousmoose [ravenousmoose!~ravenousm@] has joined ##java [06:21]
somazero [somazero!~somazero@2600:8805:100:112:f075:c2de:e39d:79e4] has joined ##java [06:35]
whaley [whaley!~whaley@] has joined ##java [06:43]
Me4502 [Me4502!~quassel@unaffiliated/me4502] has joined ##java [06:50]
dendazen [dendazen!] has joined ##java [06:50]
minos_ [minos_!] has joined ##java [06:50]
conan [conan!] has joined ##java [06:54]
minos_ [minos_!] has joined ##java [06:56]
rruizt [rruizt!] has joined ##java [07:05]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [07:09]
mitch0 [mitch0!] has joined ##java [07:11]
enoq [enoq!] has joined ##java [07:12]
very_sneaky hi guys, I'm writing my first spring boot app for a university assignment. We've been given startup code, and it appears like the project configuration is contained in a file named `app/src/main/resources/`. Is it standard practice to store config here? I haven't been able to find any resources discussing the configuration options in this file/how it's read, so if so can someone point me at some resources? [07:20]
cheeser for spring boot, yes, for the most part. [07:20]
cheeser you should probably hit up the spring boot website and read the tutorials [07:21]
very_sneaky lol, yeah probably not a bad idea [07:22]
exonity01 [exonity01!uid364582@gateway/web/] has joined ##java [07:22]
very_sneaky idk what i was thinking, a gogle for `spring boot` immediately gave me what i was looking for [07:22]
dreamreal and if you wait two weeks there's a new book about spring boot! [07:23]
dreamreal (and yes, is where you put external configuration) [07:23]
very_sneaky lol two weeks might be pushing it, assignment due in 4 [07:23]
dreamreal of course :) but spring boot's pretty easy once you accept the conventions [07:23]
very_sneaky yeah, i'm sure it is. Most of my exposure to api's has been with python's flask; it doesn't look _too_ dissimilar [07:24]
very_sneaky from a syntax perspective anyway [07:24]
dreamreal I don't remember flask well enough to judge, but remember that java's a lot stricter/saner about types than python, and a lot more explicit in a lot of ways [07:25]
very_sneaky yeah that's accurate [07:25]
very_sneaky but annotations and decorators seem pretty functionally similar, and they both use that to maintain endpoints [07:26]
dreamreal the "saner" part is debatable but I think it's accurate nonetheless [07:26]
very_sneaky okay so i'm about to start reading the docs, but one of my team mates was specifying the db connection details in `` - just to cut some time working it out from the docs, I want to be able to specify a database to connect to at run time for unit testing purposes [07:26]
dreamreal spring boot's testing stuff will default to an in-memory db of h2 if it's in the classpath and not specified in [07:27]
very_sneaky i.e., i want my unit tests to connect to a local dev database and do appropriate set up/tear down when the CI tool i'm using runs the tests [07:27]
very_sneaky but run on production otherwise [07:27]
dreamreal and of course you can have an in ./src/test/resources that overrides it [07:27]
stryek [stryek!uid332574@gateway/web/] has joined ##java [07:28]
dreamreal also, look for schema.sql and data.sql references (and these can be scoped to specific platforms like h2 as well) [07:28]
very_sneaky dreamreal: right - i think that's what the start up code is doing [07:28]
very_sneaky I'm reading through the JPA docs right now to get my head around java's ORMs [07:28]
dreamreal so you can have h2-schema.sql in src/test/resources and spring boot will apply the SQL to the h2 db (assuming that's what you're using); h2-data.sql will be run to load data for it as well [07:28]
dreamreal ah! Well... note that spring data abstracts a lot of the JPA stuff away [07:29]
very_sneaky yeah, that's what's making it more confusing to me i think [07:29]
dreamreal (you don't have to use spring data, but if you're using spring boot, it ain't a bad idea) [07:29]
very_sneaky is spring data spring boots orm? [07:29]
codecutter [codecutter!] has joined ##java [07:30]
dreamreal well, use spring data and the repository stuff to do everything, the JPA stuff ends up being hidden behind the scenes [07:30]
dreamreal no [07:30]
dreamreal spring data [07:30]
dreamreal dreamreal, what does that even *mean*? [07:30]
ravenous_ [ravenous_!] has joined ##java [07:31]
Bombe Yeah, dreamreal, what does that mean? Does spring-data relieve me from @Entitys and @JoinColumns and shit? [07:31]
dreamreal Spring data is Spring's data abstraction; it can leverage JPA, mongodb, redis, whatever. It abstracts the CRUD operations so they happen idiomatically behind the scenes, and it also provides an automatic query generation mechanism based on method names... but "idiomatic" here means "to the level of the common abstraction." It's not perfect. [07:31]
dreamreal OK, dreamreal. [07:31]
dreamreal Bombe: no. The model is still up to you, but there ARE spring data annotations to help relieve SOME dependency. [07:31]
dreamreal There's a spring data @Id annotation, for example, but if you want better control.. use the JPA annotations [07:32]
Bombe Ah, @Id isn?t part of JPA? [07:32]
cheeser uh. yes it is? [07:33]
dreamreal It is. Like I said, Spring has its OWN @Id annotation. [07:33]
Bombe Oh, okay? [07:33]
hojang [hojang!hojang@nat/redhat/x-xbxnrzaibdbfjbkm] has joined ##java [07:33]
very_sneaky okay, noted. I'll look into it and probably ask back here when i'm trying to implement it [07:33]
dreamreal The Spring annotation will *act like* the JPA annotation *for spring data* but because it's a general abstraction, there are features that it can't provide because some datastores... don't provide it [07:34]
very_sneaky dreamreal: so for switching between a prod/dev db, how would you suggest going about that? [07:34]
dreamreal points to src/main/resources and src/test/resources [07:34]
very_sneaky right, so different `` files in each of those locations? [07:34]
dreamreal prod config goes into src/main, test config goes into src/test [07:34]
dreamreal right, like I already pointed out [07:34]
very_sneaky was just trying to clarify, i wasn't 100% clear on what you meant [07:34]
dreamreal no worries [07:35]
very_sneaky that's much more straight forward than i thought it would be [07:35]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [07:35]
dreamreal BTW: a hint: don't use a lot of autowiring and stuff. Use Java configurations. [07:36]
dreamreal Unless your app is *super* simple, java config is muuuuch more powerful [07:36]
very_sneaky I'm not 100% sure what that means yet [07:36]
newbieG [newbieG!~bhaskar@] has joined ##java [07:37]
mitch0 dreamreal: you mean the @Configuration stuff? [07:37]
dreamreal mitch0: yeah [07:37]
cheeser in the 4 days (s)he has to do this project, i don't think that'll be a problem. [07:37]
mitch0 yeah, that's kinda weird [07:37]
mitch0 (that it works ;) [07:37]
very_sneaky (weeks) [07:37]
codecutter Need keep track of a piece of data globally (spring mvc app)? I have method called updateFoo(Object obl) thats called by clients in intervals. I need a way to keep track by setting a flag to indicate if the object is in the process of updating or has finished? Sometimes multiple clients come along at the same time and both run method causing duplicate to be stored to the db. I'm trying to avoid this. [07:38]
dreamreal very_sneaky: well, is external configuration; you also have an internal configuration. People used to use application.xml and stuff like that, but they also can have spring autodiscover and inject dependencies (autowiring) -- or you can manually construct the references (spring will still look up the dependencies, but you have a lot more control that way.) [07:38]
dreamreal codecutter: sounds like you want a semaphore... and maybe a transaction manager. [07:39]
very_sneaky dreamreal: ahh, so this is my first attempt at a unit test on the api: Should I avoid using the @Autowired annotation then? [07:40]
very_sneaky I think i probbaly just need to do more reading before i can have an intelligent conversation about this [07:40]
cheeser yep [07:40]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [07:40]
dreamreal very_sneaky: well, if it works, it's probably fine, it's for school anyway, yeah? but in practice, autowiring tends to create more problems than it solves. [07:40]
codecutter how would transaction manager work in this scenario? [07:41]
very_sneaky dreamreal: cheers, noted. I'll make sure i pay attention when reading the docs about it [07:41]
dreamreal codecutter: "I'm going to 'hold on' or 'lock' this object while it's being updated, and release the object when I'm done updating it." [07:41]
codecutter use ketword synchronized? [07:42]
dreamreal i.e., tx.begin(); updateTheObject(foo); tx.commit(); // with tx being serializable ("serializable" in transactions' context means "executes serially") [07:42]
dreamreal uh no [07:42]
dreamreal I guess synchronized could work if it's a toy app [07:43]
codecutter its not a toy!!! [07:43]
codecutter real time app [07:44]
codecutter url? [07:44]
frymaster [frymaster!~frymaster@] has joined ##java [07:45]
codecutter synchronized will lock the whole method, i need a more subtle solution, I have for more than 1 object type [07:46]
dreamreal sighs [07:46]
dreamreal gee, if only I'd mentioned semaphores or transactions. [07:46]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [07:47]
dreamreal Have you considered hiring a programmer to do this for you? [07:47]
dreamreal codecutter: note quite gently that I said that synchronized could work IF it's a toy app, and if it's not a toy app, logically I was saying synchronized wasn't the solution. [07:48]
mitch0 harsh [07:48]
dreamreal mitch0: inaccurate? [07:49]
mitch0 dreamreal: nah, I was lagged, was a response to the earlier sentence ;) [07:49]
mitch0 (and that is not innaccurate ;) [07:50]
dreamreal reality doesn't give a flying fuck about peoples' feelings [07:50]
mitch0 I know. too bad some of colleagues don't [07:50]
mitch0 meh [07:50]
mitch0 (on the plus side, now I at least have colleagues ;) [07:51]
dreamreal "I'm starving, waaaah" "Eat your feelings, you have a ton of those" [07:51]
dreamreal "That makes me feel bad" "Well, now you're no longer focused on being starving, congrats" [07:52]
very_sneaky how do you implement a semaphore without synchronised out of curiosity? [07:53]
very_sneaky i thought that was how you did it [07:53]
very_sneaky synchronise a resource [07:53]
dreamreal very_sneaky: java has multiple semaphore abstractions, some of them even NAMED semaphores outright [07:53]
very_sneaky oh, i supposed a semaphore is a bit more complex. synchronised doesn't maintain a queue [07:53]
dreamreal right [07:53]
dreamreal jcip [07:53]
dreamreal dreamreal, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. You can read more at and buy a copy at [07:53]
very_sneaky yeah cool, cheers [07:54]
dreamreal ^^^ also, look up database transaction models, which is probably what he'll end up using [07:54]
abclove [abclove!~moretz@] has joined ##java [07:55]
dreamreal there are probably hundreds of ways to address their problem, really, they really haven't given enough detail to offer real help apart from "consider this stuff" [07:55]
abclove button.addActionListener(this) <? can i know what is 'this'? [07:56]
dreamreal and it's slightly amusing - in a noncaustic way, of course - that they chose to consider a solution that WAS NOT offered as a valid option instead [07:56]
codecutter parted the channel: "Textual IRC Client:" [07:56]
dreamreal abclove: yes. Please stop asking. [07:56]
abclove ( [07:56]
dreamreal abclove: do the java tutorial. It answers all of that for you. [07:56]
x256 [x256!~Jace@2001:638:60f:1000:94c9:99ed:d50e:4e06] has joined ##java [07:57]
cheeser ffs, abclove. remember how i warned you'd exhaust the good will of those here willing to help? situation critical right now. [07:57]
cheeser less asking. more reading. [07:57]
abclove i think that this is my last question :( [07:58]
dreamreal yay! [07:58]
cheeser there's a really good it's your penultimate one... [07:58]
cheeser good *chance* [07:58]
dreamreal too bad they didn't say "Do you think that was my last question?" :) [08:00]
xeno_ [xeno_!~xeno@unaffiliated/xeno] has joined ##java [08:02]
very_sneaky this is my first time using maven as well, is it standard practice to install packages by editing pom.xml directly? or is there an equivelant to `pip install` or `npm install` that manages this file? [08:02]
very_sneaky my guess is that editing directly is the way to do it given that's what most of the documentation suggetss, just want to clarify [08:02]
dreamreal nope, pom.xml mods it is, although if you use eclipse the pom editor's actually pretty nice [08:03]
very_sneaky yeah okay cheers [08:03]
enoq [enoq!] has joined ##java [08:05]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [08:05]
manualcrank [manualcrank!] has joined ##java [08:14]
progart [progart!~kamee@] has joined ##java [08:15]
progart [progart!~kamee@] has joined ##java [08:16]
abclove <? why it don?t work? [08:16]
dreamreal doesn't work [08:18]
dreamreal dreamreal, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions) [08:18]
dreamreal and do the tutorial [08:18]
abclove and strange main is static method, how main can call non static method? [08:20]
dreamreal It cannot. Have you considered doing the java tutorial? [08:20]
kicked abclove (abclove) [08:21]
sonOfRa "I think this is my last question" Narrator: It was not. [08:21]
dreamreal sonOfRa: I was being polite enough to not point that out, myself. [08:21]
anirban [anirban!~anirban@unaffiliated/apostasy] has joined ##java [08:23]
zikani03 parted the channel: [08:24]
puppy_za a good starting point is to do the Java tutorial. Start with the basic "Hello! World!" [08:26]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [08:28]
dreamreal they're no longer here and rarely will be welcomed until their social capital is restored [08:30]
dreamreal too many tedious questions along with absolute dedication to outdated and inferior source material along with a persistent lack of understanding [08:31]
minos_ [minos_!] has joined ##java [08:37]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [08:44]
minos_ [minos_!] has joined ##java [08:45]
ravenous_ [ravenous_!] has joined ##java [08:46]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [08:49]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:cd58:8f38:6fb4:979b] has joined ##java [08:55]
wedr [wedr!~tom_mai78@] has joined ##java [08:55]
wedr morning [08:55]
wedr Question? For private static final variables, why you can't access the variable if you're calling it from the inside of the class? [08:59]
cheeser doesn't work [09:00]
cheeser wedr, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions) [09:00]
wedr I did [09:00]
cheeser you pasted an error? [09:00]
cheeser checks again [09:00]
wedr The error is a syntax error. Not sure how to put that in the hatebin [09:01]
cheeser well, that results in a compiler error, right? [09:01]
cheeser it's in the form of text on your screen much like your source code... [09:01]
wedr oh... After I rechecked... I realized there was a typo in the name [09:02]
wedr the private static variable has two underscores [09:02]
wedr not one [09:02]
wedr it was declared with two underscores in the production code... [09:03]
cheeser blinks [09:03]
wedr There is a super class that has DEFAULT_INTEGER, and a subclass that has DEFAULT__INTEGER [09:03]
cheeser that's stupid [09:03]
wedr I know. [09:04]
wedr anyway, thanks for your help [09:04]
cheeser yep [09:05]
conan [conan!] has joined ##java [09:10]
mitch0 hrmp. idea is a memory hog... [09:13]
cheeser [09:18]
cheeser cheeser's title: "Let Me Be Your Hog - YouTube" [09:18]
q9929t [q9929t!~Thunderbi@] has joined ##java [09:19]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [09:20]
davlefou [davlefou!~davlefou@unaffiliated/davlefou] has joined ##java [09:24]
bn_work [bn_work!uid268505@gateway/web/] has joined ##java [09:27]
very_sneaky hey guys, i'm having trouble understanding an error I'm getting. This is my project structure:, and this is the error I'm getting: The import I'm using in `` is `import;` [09:35]
wedr I'm probably the only developer here who set the font colors of all Java keywords to be #ff00ff. [09:35]
very_sneaky This is probably a simple problem, but i've been staring at it for 20 mins now and i can't work out why it wouldn't import the class [09:35]
surial very_sneaky: that just means that it can't find it. [09:36]
surial very_sneaky: probably a classpath issue, or a typo. [09:37]
very_sneaky surial: yeah, I'm confused about why it wouldn't be able to find it given the import i have [09:37]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [09:37]
surial very_sneaky: import "java.util.List;" means only: Anytime 'List' shows up in this source file, assume it meant 'java.util.List'. [09:37]
surial very_sneaky: it doesn't magically fix your classpath. [09:37]
very_sneaky surial: how can I check what _is_ on my classpath? [09:38]
tachoknight_ [tachoknight_!~tachoknig@] has joined ##java [09:38]
very_sneaky shouldn't maven handle that for me? [09:40]
very_sneaky I assumed there would be some package discovery when running `mvn package` [09:40]
surial very_sneaky: sure. are you compiling it with maven? Did you include the thing that contains this class in your dependencies list? [09:41]
very_sneaky surial: I am compiling with maven; the package is in my src tree, i just wrote it - do I need to register that package somewhere that maven can find it? I can't see the other packages in my src tree registered in pom.xml anywhere [09:43]
cheeser all your source is under src/main/java ? [09:43]
very_sneaky yeah, the path of what i'm trying to import is src/main/java/com/sept/rest/webservices/resfulwebservices/comment/ [09:44]
very_sneaky all of the source is in src/main/java/com/sept/rest/webservices/resfulwebservices/* [09:44]
very_sneaky the full tree: [09:44]
dreamreal show us the pom.xml [09:45]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [09:45]
dreamreal and where are you getting this error? [09:45]
very_sneaky pom.xml: [09:45]
very_sneaky I'm getting this when I try to run `mvn package`, when it tries to run `` [09:46]
very_sneaky the tests inside that [09:46]
dreamreal is the project on github? [09:47]
very_sneaky it is, but it's a private org repo unfortunately [09:47]
dreamreal hmm [09:47]
dreamreal I don't see anything esp out of the ordinary in the pom.xml, although java 8 is EOLed [09:48]
very_sneaky yeah, that was a teaching staff decision :\ [09:48]
dreamreal "Let's make sure to teach people stuff that is years out of date, wooo!" .. *sigh* [09:49]
very_sneaky yeah, i faced similar problems with them still delivering python 2.7 [09:49]
dreamreal neither here nor there, shouldn't be relevant [09:49]
dreamreal The IDE doesn't flag the error, but the compilation does? [09:51]
very_sneaky I'm just using a text editor, but my linter does flag it [09:52]
very_sneaky there are a number of false positives though, so I wasn't taking that as gospel [09:52]
mindCrime_ [mindCrime_!~mindCrime@] has joined ##java [09:52]
dreamreal This is probably something that someone with experience could solve in about ten seconds, but it'd require access to see [09:52]
very_sneaky yeah i figured that would be the case [09:53]
dreamreal It's probably something really obvious. src/test/java will have src/main/java in the classpath at compilation. [09:53]
very_sneaky dreamreal: what files can i show you? [09:53]
x256 try `mvn clean package` just to be sure there is no garbage in the target folders [09:53]
dreamreal very_sneaky: I don't know, offhand - pom.xml is the most likely culprit but it looks fine. [09:54]
very_sneaky actually, that was it [09:54]
very_sneaky x256: thanks for that, noted as a future troubleshooting step [09:54]
dreamreal x256 ++ [09:54]
dreamreal x256 has a karma level of 5, dreamreal [09:54]
x256 Also there are class files in your src directory ... [09:54]
very_sneaky x256: yeah, i think it might be a byproduct of my linter using javac; it's something i'll have to look into [09:55]
x256 very_sneaky: Just use eclipse or intellij. vim is nice and all, but for java development, you really should use a real IDE. [09:56]
very_sneaky i'm using sublime text actually [09:56]
wedr I don't even know how to set up Java development environment using vim... let alone me having to use any text editor. [09:56]
dreamreal don't use sublime text for java either. eclipse or IDEA. [09:57]
wedr well, visual studio code has some Java integration support [09:57]
wedr so I was able to easily use that instead. [09:57]
freeone3000 That's still not Eclipse or IDEA. [09:57]
wedr yeah, I'm just saying that compared to vim, VS Code is simpler to setup Java [09:58]
very_sneaky point taken, i don't love the idea of learning how to use an IDE though [09:58]
puppy_za *gasp* [09:58]
freeone3000 You managed to learn Sublime. [09:58]
x256 There will be some learning period and eclipse/idea are not as fast and lean as sublime, but the productivity boost will be huge. Trust us ;) [09:58]
mbooth Eh, the VS Code tooling is Eclipse in different clothes, might as well cut out the middle man... [09:58]
wedr Yes, especially when you're using Java EE stuffs [09:58]
very_sneaky sublime is a text editor, lol; i do all of the project management myself - i don't love the idea of handing off a lot of that to the IDE [09:58]
puppy_za but you use maven... [09:59]
wedr Good thing Redhat has this plugin that allows JUnit and Maven to run in VS Code [09:59]
dreamreal very_sneaky: x256 ain't lying to you for once [09:59]
very_sneaky a good point, this is the first project i've used maven :P [09:59]
wedr but I still vouch for Eclipse / IntelliJ for most projects [09:59]
very_sneaky I'm not dismissing it out of hand, just expressing reticence [09:59]
dreamreal very_sneaky: idiomatic java coding is eclipse or idea + maven or gradle :) [09:59]
wedr Because of team code formatting consolidation, you still want eclipse / intellij [10:00]
mbooth very_sneaky: It's not "project management" that is primary benefit of an IDE.... [10:00]
very_sneaky dreamreal: what are the benefits they provide over what i'm doing atm, aside from not littering my src dir with .class files? [10:00]
wedr I would shudder if someone uses a different code formatter and checked that into the repository [10:00]
dreamreal very_sneaky: and aside from showing you where your code is obviously broken, helping you complete the code, helping you see the structure of your code, providing dozens of tools to help you write smarter, better, more reliable code, saving you hours? Not much [10:01]
wedr and that also means swallowing my pride and have to use spaces for indentation when I really loved using tabs with tab size of 3 for HTML / JSP / frontend development [10:01]
very_sneaky the biggest reason i do it this way is that i write in a number of different languages so keeping my dev environment consistent seems simpler, but if there's a good reason to use another ide i'd consider it [10:01]
freeone3000 I'm partial to the "fix my code" button. [10:01]
freeone3000 very_sneaky: I do python, js, java, and kotlin from within IDEA. [10:01]
dreamreal very_sneaky: also, if you do python, idea ultimate's easily the best python dev environment [10:02]
very_sneaky better than pycharm? [10:02]
freeone3000 It *is* pycharm. [10:02]
very_sneaky oh, lel [10:02]
wedr Yeah, Eclipse was planned to have Python integration, but somehow dropped? [10:02]
wedr Or I was wrong. [10:02]
freeone3000 wedr: No, it has python integration. It's just not very good. [10:02]
dreamreal I don't touch JS because ew, gross, I leave that to ... people who live in places that speak french [10:02]
mbooth wedr: PyDev works well as a Eclipse plug-in [10:02]
wedr ah [10:03]
wedr ok [10:03]
wedr dreamreal, JS is required because you need to communicate with other servers [10:03]
very_sneaky dreamreal: the first three points are all provided by sublime [10:03]
dreamreal very_sneaky: idea ultimate is pycharm community plus a bunch of stuff. I imagine pycharm's commercial variant's the same. [10:03]
dreamreal very_sneaky: not like they are in idea or eclipse [10:03]
very_sneaky it's just perhaps "additional tools" that would be the delta? [10:03]
dreamreal want proof? Look at your error. [10:03]
puppy_za well you can always try the Intellij community version (free) [10:04]
very_sneaky i mean i guess so, that would have just been handled in the background though wouldn't it? [10:04]
dreamreal You have that error because something in your configuration was wrong and your environment didn't tell you. In IDEA or eclipse... the environment tells you. They're designed to do that. [10:05]
very_sneaky is it a config thing? or just that the target wasn't cleaned? [10:05]
dreamreal Yes. [10:05]
very_sneaky what config would cause something like that? [10:05]
dreamreal heh [10:05]
mbooth There's a great deal of benefit to be had by your tooling having a deep understanding of the language you are writing [10:05]
x256 your linter, probably, barfing class files all over your src directory. [10:06]
very_sneaky I'm not being facetious; part of the benefit that i get out of doing it this way is that i learn about these idiosyncratic errors [10:06]
dreamreal very_sneaky: they're only idiosyncratic because of the way you're doing it, though [10:06]
very_sneaky perhaps, and maybe that's a reason to change [10:06]
puppy_za but after learning it, will you switch? [10:06]
dreamreal idiomatic developers wouldn't even run into it because idiom avoids the problem [10:06]
very_sneaky but either way, I've learnt more about how it all works haha [10:06]
dreamreal nods [10:07]
very_sneaky i mean, i wouldn't have known otherwise that .class files in source dir would cause problems [10:07]
very_sneaky if that's what it was [10:07]
very_sneaky maybe that's not a lesson worth learning [10:07]
dreamreal they shouldn't, though [10:07]
very_sneaky yeah, hm [10:08]
puppy_za sometimes it feels like telling people not to grow their own wheat if they just want to make a cake [10:08]
dreamreal the classes in the classpath should, but src/main/java is not itself part of the classpath, the .class files generated from there should be [10:08]
x256 very_sneaky: Learning it the hard way is only an option if you have infinite time to learn, which you do not have. Every minute you spend fixing bugs or writing code that an IDE would have helped you with, is a minute you cannot use to learn something actually useful. [10:08]
very_sneaky puppy_za: don't confuse my discussion of the topic with being stubborn - i'm just trying to explore the issue :) [10:08]
johndoe231 [johndoe231!~johndoe@] has joined ##java [10:09]
dreamreal "I'm going to get a tattoo that says 'no regerts' just like everyone else, so I can be unique" :) [10:10]
dreamreal "I'm unique, I got a chinese symbol tattoo that means 'soup'" [10:10]
very_sneaky x256: yeah, that's probably true. I guess my general feeling is that goes both ways though. Importing projects in eclipse is probably a trivial thing, but i do it so infrequently that every time i do have to do it i spend a lot of time working it out [10:10]
very_sneaky as an example [10:10]
very_sneaky nothing insurmountable [10:10]
puppy_za there are always problems to be solved, but as x256 said, some problems are more valuables to solve than others. [10:11]
puppy_za but anyway. it's getting philisophical now [10:11]
very_sneaky puppy_za: i consider IDE operation problems to be the least significant of problems, which is why i have some aversion to them [10:11]
very_sneaky but yeah, there's a tradeoff there [10:12]
x256 If the project is already a maven project, most of the pain goes away. Eclipse understand maven projects and configures almost everything from that single pom.xml file. That's the benefit of doing it the standard way: It just works and tooling is great. [10:13]
very_sneaky yeah I can appreciate that [10:13]
very_sneaky like i said, this is my first maven project [10:13]
x256 One step at a time, but maven was an important step :) [10:14]
x256 Next, switch to an IDE :D [10:14]
very_sneaky haha yeah i'll probably try one out when i get time [10:14]
dreamreal if you know pycharm IDEA will be trivial [10:15]
dreamreal if you hate yourself eclipse is great [10:15]
puppy_za lol [10:16]
mbooth dreamreal: I feel personally attacked! [10:16]
dreamreal mbooth: stop attacking yourself, then. You deserve love, too. I wouldn't know why, but I'm pretty sure your mom might love you. [10:16]
minos_ [minos_!] has joined ##java [10:16]
jimender2 [jimender2!uid320657@gateway/web/] has joined ##java [10:17]
AmVarPG [AmVarPG!] has joined ##java [10:17]
very_sneaky all of my experience has been with eclipse [10:19]
very_sneaky i've tried pycharm very briefly, but sublime has been my goto for most things [10:20]
xeno [xeno!~xeno@unaffiliated/xeno] has joined ##java [10:20]
dreamreal *nod* I like ST3 myself... just not for java or python [10:20]
very_sneaky where do you find it deficient for python? [10:22]
xoke [xoke!sid184609@gateway/web/] has joined ##java [10:22]
xoke Hello [10:22]
cheeser somewhere other than ##java i'm sure [10:22]
x256 I have access to IDEA unlimited and I'm still using eclipse for my day to day work. ECJ is a selling point, my stubbornness another. PyCharm is nice, though. [10:22]
xoke Anybody new to java like me [10:22]
very_sneaky fair point lol [10:22]
cheeser xoke: if you have java questions, ask them. [10:23]
newbieG Can someone provide me(beginner) good resource to learn about File Handling (not using *nio*) [10:24]
dreamreal tutorial [10:24]
dreamreal 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. [10:24]
dreamreal just avoid the NIO bits, which probably wouldn't apply anyway. [10:25]
cheeser io [10:25]
cheeser For information on handling input/output in java see [10:25]
sonOfRa what's your reasoning for not wanting to use nio? [10:25]
sonOfRa nio doesn't necessarily mean async fuckery. It just means a lot better API for everything surrounding files [10:25]
cnsunyour [cnsunyour!~cnsunyour@2408:8207:18e9:3f70:e4b9:eb87:c78:f0e8] has joined ##java [10:26]
newbieG sonOfRa: Android don't support [10:26]
wedr ah, just finally figured out what the "n" stands for in NIO. = blocking I/O. java.nio = Non-blocking I/O. [10:27]
freeone3000 wedr: The "n" stands for "new" [10:27]
wedr doubts a bit. [10:27]
dreamreal wedr: no, it's new. [10:27]
cheeser don't doubt. [10:27]
dreamreal newbieG: so why... are you not... asking #android-dev? [10:28]
wedr for real? I will have to change then.. [10:28]
sonOfRa Also, android does support it. At least Paths and stuff is part of their apidoc [10:28]
cheeser android is irrelevant [10:28]
newbieG dreamreal: because I thought it was the right channel [10:29]
dreamreal if you want to know how to handle files on the android vm, ask an android channel. This is ##java. Android isn't java. [10:29]
sonOfRa Fair enough, easy mistake to make, but essentially, android is: java-the-language but not java-the-platform [10:29]
newbieG dreamreal: I know [10:29]
dreamreal What works in the JVM might work on android, but there's probably some magic android API and idiom that Java doesn't and shouldn't know about. [10:29]
dreamreal So: ask #android-dev. [10:30]
newbieG First I wanted to know the java basics how it handle Files [10:30]
sonOfRa Especially for things like interacting with the file system: The android file system is a bit special. I would bet android has special APIs [10:30]
sonOfRa I think both nio as well as the old File api are the wrong thing to use on android [10:30]
cheeser take this to #android-dev [10:30]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [10:31]
Chernabog__ [Chernabog__!] has joined ##java [10:33]
learningc [learningc!~learningc@] has joined ##java [10:33]
newbieG dreamreal: sonOfRa: cheeser: I apologize for asking offtopic thing .... but I got confused with this doc ... as it says [10:33]
newbieG newbieG's title: " | Android Developers" [10:33]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [10:33]
conan [conan!~conan@] has joined ##java [10:33]
dreamreal newbieG: irrelevant. It's on android. it uses the java packaging structure. Ask #android-dev. [10:34]
freeone3000 newbieG: Not a Java question. It's been made clear file handling differs on Android than on regular Java, and you should be asking in #android-dev. [10:34]
anirban [anirban!~anirban@unaffiliated/apostasy] has joined ##java [10:37]
learningc [learningc!~learningc@] has joined ##java [10:39]
Chernabog_ [Chernabog_!] has joined ##java [10:44]
mgrech_ so... intellij keeps shitting itself on wildcard imports [10:56]
mgrech_ what's going on :/ [10:56]
mgrech_ maven project compiles just fine [10:56]
dreamreal shitting itself how, answer in #idea-users [10:56]
RedSoxFan07 [RedSoxFan07!] has joined ##java [10:57]
mgrech_ [10:57]
tang^ that answer wasn't in #idea-users [10:57]
dreamreal I fail to see how.. that answer was in #idea-users *or* the shit-itself aspect [10:57]
dreamreal foo.a.* does NOT include foo.a.b.* [10:58]
cheeser tl;dr: don't use * imports [10:59]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [11:01]
minos_ [minos_!] has joined ##java [11:06]
Diablo-D3 [Diablo-D3!] has joined ##java [11:07]
Chernabog [Chernabog!] has joined ##java [11:09]
Chernabog_ [Chernabog_!] has joined ##java [11:10]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [11:13]
Guest90483 [Guest90483!~Jigsy@unaffiliated/jigsy] has joined ##java [11:17]
Diablo-D3 [Diablo-D3!] has joined ##java [11:18]
tracks [tracks!~tracks@2600:1700:ade0:4400:4965:b301:cc24:be39] has joined ##java [11:20]
atrament666 [atrament666!] has joined ##java [11:21]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [11:22]
CookieM [CookieM!] has joined ##java [11:25]
mgrech_ btw, if anyone knows a better approach than ripping the javac sources out and putting them into a maven project, i'm listening [11:27]
mgrech_ but so far it seems to work fine. had to also move the resources files around, but now it works [11:27]
mgrech_ well, and add some compiler flags to get access to jdk internal stuff [11:28]
dreamreal mgrech_: write a processor instead of a new compiler? [11:28]
cheeser i still contend on what you're doing is dumb and that there's a better way [11:29]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [11:29]
cheeser fuck, even lombok doesn't go full stupid like this. [11:29]
LaSombra lol [11:29]
mgrech_ the language changes i'm making are too deep to really work without modifying the compiler [11:30]
dreamreal lombok's a good example of a better approach IMO [11:30]
cheeser then stop using java? [11:30]
mgrech_ D [11:30]
learningc [learningc!~learningc@] has joined ##java [11:31]
sbalmos start learning LLVM bytecode [11:31]
surial mgrech_: [11:32]
mgrech_ i already know llvm ir :p [11:32]
surial mgrech_: just javac -cp disable-those-things.jar and it'll work, where contains, for example: public void test() /* I thhrow nothing! */ { new FileInputStream("/foo"); /* but how??? */ } public void bar() { try { System.out.println("I dont throw..."); } catch (IOException e) { /* and yet this is not an error either, egads! */ }} [11:33]
surial mgrech_: Haven't actually looked at the POC for years and years, but, I see no reason why it wouldn't work, or at least, why the principle wouldn't. [11:33]
mgrech_ i mean, all that does is access compiler-internal apis right? [11:33]
rajrajraj [rajrajraj!uid72176@gateway/web/] has joined ##java [11:33]
mgrech_ because the standard javac plugin api does not support mutation [11:33]
mgrech_ at that point, i'm not sure that's such a big win [11:33]
surial what the lombok approach cannot really do is allow syntax errors. What lombok does just fine is allow semantic errors. [11:34]
surial mgrech_: ... lombok does do the mutations. [11:34]
surial what you're doing, THAT is fucking useless. [11:34]
mgrech_ right, via compiler internal apis [11:34]
surial programming life goes a little further than javac.exe [11:34]
intellect [intellect!uid258908@gateway/web/] has joined ##java [11:34]
surial there's IDEs, introspection tools, other annotation processors, and eighteen million more things. [11:34]
surial If you don't support anything except command line invocation of javac.exe... congrats. You are now usable by 0.0005% of the java community and no more than that. [11:35]
rajrajraj Rude [11:35]
mgrech_ surial: i don't really care [11:35]
cnsunyour [cnsunyour!~cnsunyour@2408:8207:18e9:3f70:e4b9:eb87:c78:f0e8] has joined ##java [11:35]
surial mgrech_: If you don't care about something, maybe don't mention it. [11:35]
mgrech_ and frankly, if lombok had some documentation i'd take a look, but it's not there [11:35]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [11:35]
cheeser the source code is the documentation! [11:35]
surial mgrech_: it's a bit fucking nuts if you first go: "I'm not sure that's such a big win", and then when informed on the 'win' involved here, go: "Oh, actually, nevermind, I don't care". [11:35]
surial mgrech_: projectlombok does not have docs on how it works internally, no. Which project does? [11:36]
mgrech_ surial: yeah, i don't care about those other things. coulda told you that in advance [11:36]
surial projectlombok has lots of nice documentation on what it does. [11:36]
nova99 [nova99!~thelounge@] has joined ##java [11:36]
surial mgrech_: I pointed you at the disable-checked-ex thing because it's very standalone. Easy to get into and understand just that bit of the source. [11:37]
mgrech_ surial: the repo link is dead. [11:37]
cheeser in the end, if you want to do something as stupidly as possible in spite of all the advice to the contrary, it's your life. just don't expect much sympathy along the way. [11:37]
nova99 Is it possible to use the $ velocity variables in struts2? [11:37]
cnsunyour [cnsunyour!~cnsunyour@2408:8207:18e9:3f70:e4b9:eb87:c78:f0e8] has joined ##java [11:37]
nova99 I can't for the life of me find a tutorial [11:37]
cheeser nova99: join us in the 21st centry [11:37]
nova99 How do I do that? [11:38]
mgrech_ cheeser: just because you decided based on limited information that it's stupid, doesn't mean it's stupid [11:38]
cheeser not using struts2 for starters [11:38]
cheeser mgrech_: it doesn't mean it's not. but it is. [11:38]
mgrech_ fact is, i want to get my bachelors thesis over with, and i don't really care if anyone uses it. if you want IDE support, pay me [11:38]
cheeser you want java to not be java and are trying to shoehorn its tools to fit your needs. [11:38]
nova99 Fine, I'm stupid. Don't bother responding to me then. [11:38]
cheeser nova99: no one said you were stupid. just that struts is old and outdated. [11:39]
rajrajraj Should there be a separate channel to discuss something that is not part of standard java [11:39]
mgrech_ cheeser: extending the language has nothing to do with trying to shoehoern anything [11:39]
cheeser rajrajraj: feel free to start whatever channel you want. [11:39]
cheeser of course [11:39]
nova99 I mean is there a java we app channel? Then I'd go there [11:39]
nova99 web app* [11:39]
rajrajraj cheeser: i was asking for suggestions [11:40]
cheeser there's a struts channel. or there was 15 years ago. no idea if it's still active. [11:40]
rajrajraj What i meant was that it should be subsidiary of this channel [11:40]
rajrajraj Not something arbitrary [11:41]
cheeser this channel has not reall association with anyother channel. if you want it, start it. [11:41]
rajrajraj Nvm [11:41]
nova99 Well then mr cheeser what do you recommend? [11:41]
cheeser i'd build with a vue frontend and java on backend, personally. [11:42]
nova99 I meant what framework to use for the java backend [11:42]
nova99 Nor particularly concerned with front end atm [11:43]
nova99 Not [11:43]
rajrajraj Spring? [11:43]
cheeser dropwizard probably. (or ktor but that's not java.) vert.x. etc. [11:43]
nova99 Till now I was using plain old servlets [11:43]
sbalmos did you just wake up from a 20 year coma? [11:43]
nova99 No, I'm just starting out so I wanted to start from the basic [11:44]
nova99 basics [11:44]
cheeser yikes. you went from servlets to struts 2? today? [11:44]
sbalmos oooooookay... [11:44]
nova99 are ya'll done with your witty remarks so we could get down to adult talk? [11:44]
tang^ that seems unlikely [11:44]
cheeser i believe i gave you some. [11:44]
nova99 you have much more juvenile remarks though [11:45]
nova99 gave* [11:45]
tang^ so ignore them and focus on the good bits [11:45]
rajrajraj Strange no one suggested spring [11:45]
cheeser i did. if you want full on grown up, professional results pay for them like the adult you are. but you're asking for free help which you got. plus some. [11:45]
nova99 tang^: that really seems to be the best thing to do on IRC [11:45]
nova99 Give free help if you want, or don't. Are you implying you're gonna be a dick necessarily as well? [11:46]
cheeser i'm not being a dick. but you are being super sensitive. [11:46]
cheeser i gave you solid answers. use them. but stop whining so much. [11:46]
cheeser if you don't like all extra bits, feel free to ignore them. [11:47]
nova99 Lol, your responses were totally uncalled for. [11:47]
cheeser what? ffs, dude. uncalled for? how? [11:47]
mbooth interesting [11:47]
mbooth this is all very interesting (not really) but please take it somewhere else. [11:47]
cheeser mbooth: stfu [11:47]
cheeser mbooth: not your job [11:48]
nova99 Meh, whatever [11:48]
nova99 Enjoy your miserable life [11:48]
nova99 parted the channel: "The Lounge -" [11:48]
x256 nova99: java communities tend to bit a lot harsher than, say, python or js communities for various reasons. If you want help, then get yourself some thick skin. [11:48]
cheeser next [11:48]
cheeser Another satisfied customer. Next! [11:48]
x256 too late [11:48]
cheeser there was nothing harsh about any of that! incredulous, yes, but whatever. [11:48]
mgrech_ not having a good day huh? [11:49]
surial mgrech_: Hmm, I guess I killed that branch :( It's still there when you saearch: [11:49]
surial surial's title: "lombok/ at 577ce94facde1092ab2eec9de12270183e8048bc rzwitserloot/lombok GitHub" [11:49]
cheeser me? my day is fine. [11:49]
sbalmos just another normal day [11:49]
bberry [bberry!uid126853@gateway/web/] has joined ##java [11:50]
bberry parted the channel: [11:50]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [11:53]
minos_ [minos_!] has joined ##java [11:55]
rippa [rippa!] has joined ##java [11:55]
wedr As all should be. [11:56]
rippa [rippa!] has joined ##java [12:00]
learningc [learningc!~learningc@] has joined ##java [12:05]
surial wedr: the n in nio definitely stands for new. Note that many classes in the nio package are explicitly blocking, so if it stood for non-blocking (and it does not; officially and practically!) it'd be one hell of a misnomer. [12:05]
cheeser wow. way to resurrect a topic. [12:05]
cheeser D [12:05]
cheeser heads out [12:05]
surial and separate: non-blocking is almost always a stupid waste of time which unfortunately is bogged down by an unusually large amount of clueless cheerleading, which makes me want to give this unsollicited: Don't believe the hype missive. [12:05]
wedr thanks surial [12:06]
surial cheeser: I vaguely recalled that wedr asked something and I didn't get to it so I scrolled up. And then my 'fight the non-blocking hype' button got pushed. I apologize. [12:06]
wedr I wasn't asking, I was stating my (incorrect at the time) opinion that the "n" in "java.nio" stands for "non-blocking" [12:06]
dreamreal apology accepted, and while the "fight the hype" isn't necessarily wrong - nonblocking IS used a lot more than maybe it should be - please suppress it or mitigate it, because there are circumstances in which it's appropriate [12:07]
surial I wasn't answering. I was correcting :P ? I just can't resist commenting on non-blocking. Personal flaw. [12:07]
dreamreal notes the flaw [12:07]
deavmi [deavmi!~deavmi@] has joined ##java [12:09]
deavmi [deavmi!~deavmi@] has joined ##java [12:14]
DTZUZO [DTZUZO!] has joined ##java [12:19]
alwyn [alwyn!~alwyn@unaffiliated/alwyn] has joined ##java [12:20]
alwyn I'm using an application that uses Liquibase for tracking database schema changes, and I'm having struggling with rolling back some change sets. No matter what I try, I always get empty SQL (if I do rollbackSQL, rollbackCount, etc.) [12:22]
alwyn None of the change sets are tagged in the database, so I tried manually setting a tag. tagExists recognises it, but I still get empty SQL if I try rollbackSQL <tagname> [12:24]
freeone3000 liquibase requires that the rollback command actually be input for certain schema changes. does your liquibase xml actually contain rollback instructions? [12:25]
sdu [sdu!] has joined ##java [12:25]
alwyn I was under the impression that most changes can automatically create rollback statemenents [12:29]
alwyn The change sets do not have rollback commands, but pretty much only use create table, add column [12:30]
sonOfRa Pretty sure liquibase won't automagically try to guess what is needed to rollback things [12:30]
dreamreal yeah, it'd need to roll forward to known points unless you specifically tell it how to roll back [12:30]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [12:31]
alwyn I see [12:31]
alwyn The problem I'm having is that we somehow ended up using a version where a new version updated existing schema files [12:31]
alwyn So updating from that point on fails as some of those changes have already been applied [12:32]
alwyn I figured it should be relatively easy to rollback, either automatically or manually, but of course it's not as easy as that :) [12:32]
johndoe231 [johndoe231!~johndoe@] has joined ##java [12:38]
mohsen_1 [mohsen_1!uid289573@gateway/web/] has joined ##java [12:38]
freeone3000 DDL instructions can't be rolled back safely. [12:39]
freeone3000 It'll autogenerate for insert and select and delete, but for anything involving table changes you'll need to write the inverse, because DDL changes can result in data loss. [12:40]
hexyul [hexyul!~omonk@unaffiliated/omonk] has joined ##java [12:45]
CombatVet [CombatVet!~c4@gateway/tor-sasl/combatvet] has joined ##java [12:49]
learningc [learningc!~learningc@] has joined ##java [12:53]
learningc [learningc!~learningc@] has joined ##java [12:53]
mindCrime [mindCrime!~mindCrime@] has joined ##java [12:55]
conan [conan!] has joined ##java [12:58]
minos_ [minos_!] has joined ##java [01:02]
q9929t [q9929t!~Thunderbi@] has joined ##java [01:02]
alwyn I'll try :) [01:16]
conan [conan!] has joined ##java [01:17]
mindCrime_ [mindCrime_!~mindCrime@] has joined ##java [01:23]
Human_G33k [Human_G33k!~HumanG33k@] has joined ##java [01:23]
Wixy [Wixy!~mplabs@unaffiliated/mplabs] has joined ##java [01:23]
ogradyd [ogradyd!~Thunderbi@2a02:8070:88bf:9df0::20e] has joined ##java [01:27]
enoq parted the channel: [01:27]
johndoe231 Hi, I have made a custom ConstraintValidator for validating passwords using bean validation which checks if the password doesn't contain the user's name or email address. Since I cannot use variables to pass the values in annotations, is there a way I can pass those variables to validate the password? [01:36]
grumble [grumble!~grumble@freenode/staff/grumble] has joined ##java [01:37]
seventwo [seventwo!] has joined ##java [01:38]
wedr Can you pass a ConstraintValidator object instead? Just throwing ideas. [01:43]
learningc [learningc!~learningc@] has joined ##java [01:45]
royal_screwup21 [royal_screwup21!5661e695@gateway/web/cgi-irc/] has joined ##java [01:49]
progart [progart!~kamee@] has joined ##java [01:55]
wedr Is it the right way to test multithreaded functions by intentionally thread-sleeping a JUnit test case? [02:07]
dreamreal Um... it depends [02:09]
wedr production code has set a hard limit of 20 seconds for SQL transactions, and this is running on a separate thread. So, I should be able to make a JUnit test that waits for 21 seconds, and test the result like that. [02:09]
wedr oh ok [02:09]
conan [conan!~conan@] has joined ##java [02:10]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:11]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [02:17]
ravenous_ [ravenous_!] has joined ##java [02:17]
Kol [Kol!] has joined ##java [02:17]
deavmi [deavmi!~deavmi@] has joined ##java [02:21]
rruizt [rruizt!] has joined ##java [02:23]
sdu_ [sdu_!] has joined ##java [02:24]
viju [viju!~viju@] has joined ##java [02:40]
puppy_za [puppy_za!uid277586@gateway/web/] has joined ##java [02:40]
johndoe231 [johndoe231!~johndoe@] has joined ##java [02:43]
ModusPwnens [ModusPwnens!] has joined ##java [02:52]
ModusPwnens Is the adapter pattern appropriate when there are no underlying interfaces or is there a different pattern that should be applied? [02:52]
livepan if there is no underlying interface, what are you "adapting" to [02:56]
livepan from memory, the adapter pattern is used to easily implement an interface with a bunch of default behavior supplied for that interface (often no-ops) [02:57]
livepan e.g. i want to implement a listener interface and implement only one of the callbacks, but if offers 100 methods i must override to compile [02:57]
livepan thats the only situation i remember using it in java, not sure if the pattern is meant to be broader than that [02:58]
livepan yeah, i think that is a specific concrete example of an adapter, here is another more generic one that is probably more appropriate: [02:59]
sdu [sdu!] has joined ##java [03:03]
kupi [kupi!uid212005@gateway/web/] has joined ##java [03:08]
rruizt [rruizt!] has joined ##java [03:11]
gelignite [gelignite!] has joined ##java [03:17]
ravenous_ [ravenous_!] has joined ##java [03:22]
Sheilong [Sheilong!uid293653@gateway/web/] has joined ##java [03:28]
whaley [whaley!] has joined ##java [03:28]
minos_ [minos_!] has joined ##java [03:33]
pmercado [pmercado!~pmercado@] has joined ##java [03:45]
realtimer [realtimer!~realtime@unaffiliated/realtime] has joined ##java [03:53]
realtime_ [realtime_!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [04:08]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [04:09]
realtime [realtime!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [04:09]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@unaffiliated/peste-bubonica/x-4612396] has joined ##java [04:10]
realtime_ [realtime_!realtime@gateway/vpn/privateinternetaccess/realtime] has joined ##java [04:13]
somazero_ [somazero_!~somazero@2600:8805:100:112:55fb:1b87:6d4a:f595] has joined ##java [04:13]
cixx [cixx!~user@] has joined ##java [04:14]
Gazooo [Gazooo!~Gazooo@] has joined ##java [04:15]
progart [progart!~kamee@] has joined ##java [04:18]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@] has joined ##java [04:20]
mgrech__ [mgrech__!] has joined ##java [04:36]
led_dark_1 [led_dark_1!~Thunderbi@] has joined ##java [04:47]
dtrott [dtrott!] has joined ##java [04:54]
kupi does "str" get allocated on the heap if I write optinal.orElse("str")? [04:59]
kupi optinal.orElseGet(()->"str") is a better solution? [05:00]
dreamreal why are you worried about this? [05:01]
dreamreal It doesn't get *allocated* - it's a constant. But seriously: why are you worried about this? [05:01]
dreamreal The time you have taken writing the question has consumed more time and memory than any such allocation could ever take [05:02]
kupi true, but only if that allocation ran only one time [05:03]
kupi I write a program which makes a long calculation [05:03]
kupi it can run for half a day [05:03]
dreamreal if it ran thousands or millions of times, so what [05:03]
dreamreal this is faptimization [05:04]
dreamreal even if it allocated 5m times, it's short-term and constant, the GC would clean it up and you'd never ever ever notice [05:04]
kupi if thrashing the heap doesn't matter why project valhalla is so much faster? [05:05]
kupi >this is faptimization [05:05]
dreamreal kupi: in java, *don't worry about performance*. Seriously. If you have an SLA, try to meet it by writing the simplest code you can... and if the SLA isn't being met, THEN you *measure*. Don't guess about this stuff. The JVM is smarter than you are. [05:05]
kupi that may be true, but I have no life :> [05:05]
dreamreal well, you waste it however you want. [05:05]
kupi >THEN you *measure*. [05:06]
kupi that is a great point [05:06]
kupi what's the advantage the java flight profiler over the async profiler? [05:06]
kupi *advantage of [05:06]
whaley [whaley!~whaley@] has joined ##java [05:07]
zikani03 [zikani03!~zikani03@] has joined ##java [05:11]
freeone3000 java flight profiler records offline, async profiler you still have to be attached. [05:17]
whaley [whaley!~whaley@] has joined ##java [05:17]
kupi is there any way to know what method allocated how much of heap which cannot be collected? [05:23]
Jigsy [Jigsy!~Jigsy@unaffiliated/jigsy] has joined ##java [05:25]
bolt [bolt!~r00t@unaffiliated/bolt] has joined ##java [05:26]
dtrott kupi you might want to read a few articles on profiling Java memory usage, it will probably give you a better handle on whats important and whats not. [05:29]
dtrott dtrott, what does that even *mean*? [05:29]
iam730 [iam730!] has joined ##java [05:31]
LearnAllTheTime [LearnAllTheTime!~LearnAllT@] has joined ##java [05:54]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [06:04]
somazero [somazero!~somazero@2600:8805:100:112:dd84:e616:e92b:a71] has joined ##java [06:07]
tomboy64 [tomboy64!~tomboy64@gateway/tor-sasl/tomboy64] has joined ##java [06:08]
RoriconKnight [RoriconKnight!~RoriconKn@] has joined ##java [06:09]
RoriconKnight [RoriconKnight!~RoriconKn@] has joined ##java [06:16]
Renari [Renari!] has joined ##java [06:16]
somazero [somazero!~somazero@2600:8805:100:112:dd84:e616:e92b:a71] has joined ##java [06:26]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [06:43]
_xor [_xor!~xor@] has joined ##java [06:55]
Byteflux [Byteflux!] has joined ##java [06:56]
Kol [Kol!~Kol@] has joined ##java [06:56]
zalt [zalt!~lambda443@unaffiliated/lambda443] has joined ##java [07:13]
shugz [shugz!] has joined ##java [07:15]
shugz On line 7. Why is there ans =Math.max(ans, j-i); should it not be (j-i)+1; [07:17]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [07:44]
conan [conan!~conan@] has joined ##java [07:47]
bitwinery [bitwinery!] has joined ##java [07:57]
surial well, that's fucking dumb. [08:05]
surial import static*; is illegal. [08:05]
surial The reasoning behind this: \_(?)_/ ?????? [08:05]
dtrott [dtrott!] has joined ##java [08:08]
Bebef [Bebef!] has joined ##java [08:22]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [08:23]
yawkat [yawkat!] has joined ##java [08:23]
ravenous_ [ravenous_!] has joined ##java [08:40]
synaptech [synaptech!] has joined ##java [08:47]
ideaPlus [ideaPlus!~Username@] has joined ##java [09:16]
rajrajraj [rajrajraj!uid72176@gateway/web/] has joined ##java [09:18]
learningc [learningc!] has joined ##java [09:31]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [09:38]
shugz [shugz!~shugz@2605:e000:fd42:8a00:4dd:e03f:11f3:d30e] has joined ##java [09:51]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:15]
hypc1 [hypc1!~Thunderbi@] has joined ##java [10:25]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [10:28]
tassee [tassee!] has joined ##java [10:32]
Jigsy` [Jigsy`!~Jigsy@unaffiliated/jigsy] has joined ##java [10:33]
Jantz [Jantz!] has joined ##java [10:39]
shugz [shugz!~shugz@2605:e000:fd42:8a00:4dd:e03f:11f3:d30e] has joined ##java [10:40]
Anthaas [Anthaas!~Anthaas@unaffiliated/anthaas] has joined ##java [10:52]
very_sneaky how do you guys write unit tests for floats? [10:57]
very_sneaky i'm suffering from floating point error with `assertEquals` [10:57]
cheeser in junit, iirc, there's an override that takes an epsilon [10:59]
very_sneaky ahhhh, that's what that is [10:59]
very_sneaky perfect, thanks [10:59]
cheeser yep [10:59]
karstensrage if you take a stream of CompletableFuture and map CompletableFuture::join onto them, how is that different than CompletableFuture.allOf [11:08]
karstensrage i mean it is really different [11:09]
karstensrage in the first case its like the futures complete sequentially [11:09]
karstensrage in the 2nd they work as you would expect [11:09]
fstd_ [fstd_!~fstd@unaffiliated/fisted] has joined ##java [11:14]
shugz [shugz!~shugz@2605:e000:fd42:8a00:4dd:e03f:11f3:d30e] has joined ##java [11:14]
very_sneaky what's the philosophy behind exceptions in java? Is it better to use the inbuilt exceptions or write your own? I'm looking at the list of `Exception`'s subclasses, and they don't seem to be exhaustive [11:14]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [11:18]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [11:27]
very_sneaky so, I'm trying to test a method that throws exceptions. It seems like I can test whether the exception is successfully thrown using `assertThrows`, but when I try to test the method without a try-catch block i get `unreported exception must be caught or declared to be thrown` - how do I deal with this? This SO answer suggests using a try catch block is incorrect: [11:43]
very_sneaky very_sneaky's title: "java - How to test that no exception is thrown? - Stack Overflow" [11:43]
very_sneaky n-is-thrown [11:43]
very_sneaky unless i'm misinterpreting it [11:43]
very_sneaky to fix broken link: [11:43]
cheeser declare your test method throws that exception [11:45]
veegee [veegee!] has joined ##java [11:47]
very_sneaky yeah, i tried that - got the same error [11:47]
very_sneaky ahhh. nevermind, you're right [11:48]
very_sneaky i had misread the error message; i had other instances of the same error [11:48]
Wixy [Wixy!~mplabs@unaffiliated/mplabs] has joined ##java [11:50]