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

« 2018-12-05


2018-12-07 »

Nick Message Date
sauvin [sauvin!sauvin@about/linux/staff/sauvin] has joined ##java [12:01]
nurupo [nurupo!] has joined ##java [12:10]
Intelo [Intelo!~Intelo@gateway/tor-sasl/intelo] has joined ##java [12:12]
Intelo To scrape data from websites where you want to wait for few elements to load/appear on page and then get their value, handle page redirects etc. Which tools is advisable? (only java and javascript ones)? [12:12]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:91b5:c110:aee4:be03] has joined ##java [12:25]
srisri [srisri!~srisri@] has joined ##java [12:25]
kgrimes2 [kgrimes2!] has joined ##java [12:27]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [12:30]
BeerLover [BeerLover!~BeerBuddy@] has joined ##java [12:32]
aphxTWN [aphxTWN!~aphxTWN@] has joined ##java [12:38]
aphxTWN [aphxTWN!~aphxTWN@] has joined ##java [12:38]
srisri [srisri!~srisri@] has joined ##java [12:47]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [12:49]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [12:51]
bytespirit [bytespirit!~bytespiri@2001:7e8:c912:f500:acf5:1d2c:4456:630e] has joined ##java [01:01]
andai [andai!~andai@unaffiliated/andai] has joined ##java [01:04]
Masterphi [Masterphi!~Masterphi@unaffiliated/masterphi] has joined ##java [01:06]
dendazen [dendazen!] has joined ##java [01:07]
Rockpile [Rockpile!~Rockpile@unaffiliated/rockpile] has joined ##java [01:07]
bugzy_on_busy1 [bugzy_on_busy1!~Thunderbi@] has joined ##java [01:10]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [01:14]
acidjnk [acidjnk!] has joined ##java [01:20]
pawle [pawle!] has joined ##java [01:21]
chire [chire!] has joined ##java [01:27]
led_dark_1 [led_dark_1!] has joined ##java [01:33]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [01:35]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [01:36]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [01:36]
AMcBain [AMcBain!] has joined ##java [01:49]
sbalmos [sbalmos!] has joined ##java [01:50]
ericek111 [ericek111!] has joined ##java [01:51]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [01:58]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [02:06]
srisri [srisri!~srisri@] has joined ##java [02:07]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [02:07]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [02:12]
bytespirit [bytespirit!~bytespiri@] has joined ##java [02:13]
srisri [srisri!~srisri@] has joined ##java [02:14]
widp_ [widp_!] has joined ##java [02:23]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [02:25]
Atizs [Atizs!5dbabb76@gateway/web/freenode/ip.] has joined ##java [02:27]
Atizs Why does Long.valueOf(FFFFFFFFFFFFFFFF) throws a number format exception? [02:27]
Maldivia well, that's not legal code to begin with [02:29]
Atizs Long.valueOf(new String(canMessageData) [02:30]
Atizs I ahve this, and canMessageData is 0xFFFFFFFFFFFFFFFF [02:31]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [02:32]
Maldivia Long.valueOf("7FFFFFFFFFFFFFFF", 16) is the max -- long is signed [02:32]
acidjnk hello [02:32]
Maldivia Atizs: similar, Long.valueOf("-8000000000000000", 16) is the smallest number [02:33]
Atizs How do i fix it? BigInteger? [02:33]
Maldivia Atizs: Long.parseUnsignedLong("FFFFFFFFFFFFFFFF", 16) is valid [02:34]
Maldivia meaning, that will give you the same value as long l = oxFFFFFFFFFFFFFFFFL; [02:35]
Maldivia 0x* [02:35]
acidjnk Considering that Java REST services are a common occurance, and so is pessimistic locking: Why do we see so few REST services that have a retry-mechanism for OptimisticLockException? Not like it's hard to do, just surprised I haven't seen it before in my life, and I feel like a pioneer for something that should be very common. [02:35]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [02:36]
YaiqiongZhao [YaiqiongZhao!] has joined ##java [02:37]
Maldivia I don't see why this has anything to do with a REST services though -- seems more like something that should happen in the next layer [02:37]
Atizs Thanks,Maldivia! [02:38]
Maldivia acidjnk: but then again, it's a RuntimeException, so people tend to forget/ignore them since their IDEs don't force them to do something about it [02:38]
qwedfg [qwedfg!~adam@] has joined ##java [02:39]
acidjnk I was considering to do it directly in the REST service, because that is conveniently already outside the transaction. Otherwise, I'd have to make it call an EJB method with @TransactionAttribute NEVER that serves just this purpose of retrying. [02:40]
acidjnk or NOT_SUPPORTED might be better ... [02:41]
acidjnk It would be nice to have a single, generic method for doing the optimistic lock retries, something that takes a Function as parameter. But with EJB restrictions, it's a bit questionable to pass around the injected EJB stubs. [02:43]
acidjnk Any suggestions for a good design? [02:44]
acidjnk Option 1 would be to simply have the retry-code in every single REST method, and probably also in the JSF beans. [02:45]
Maldivia and how often aer you encountering this exception? [02:45]
ankk [ankk!b9dc98f9@gateway/web/freenode/ip.] has joined ##java [02:45]
ankk hi. [02:45]
acidjnk Option 2, every method that gets called from a REST service has a companion method with NOT_SUPPORTED just for the retries. Either in the same EJB, or in one huge OptimisticLockRetryBean with lots of little methods. [02:46]
ankk there is a List<> in an dto object and i want to add a helper method to add new members to this list, how can i do this? [02:46]
acidjnk Option 3: Have a generic method for retries that takes a Function, and hope that passing around the required EJB stub doesn't break anything. [02:47]
Maldivia ankk: you want to add something to a List in a DTO? [02:47]
acidjnk Very good question, ankk, I hope someone finds a better solution than "the hard way" :-) [02:48]
palasso [palasso!~palasso@unaffiliated/palasso] has joined ##java [02:48]
Maldivia as to how you can do this --- create a method for it -- void addSomething(T something) { list.add(something); } :D [02:49]
ankk ) ok... i rethink about tha [02:49]
ankk t [02:49]
Maldivia but why do you want to mutate a DTO? [02:49]
acidjnk The scenario I often have: There is a JPA entity Playground with a List<Child>. It is loaded and turned into PlaygroundValue referencing List<ChildValue>. So far, so good. But now, a website changes the List. It used to contain 112 Children, now it's 120, but it isn't even a super-set of the old one. Some removed, some added. And I need to persist the changes. [02:53]
ankk in fact, there isn't an almighty reason.. just to see more clean code but it seems not logical now [02:53]
acidjnk is that similar to your situation, ankk? [02:53]
ankk acidjnk: no, it is not.. i am just adding error details in a loop for each record and i want to add error like error.add(detail1, detail2,etc..) instead of error.add(new Error()) [02:56]
zulutango [zulutango!] has joined ##java [02:57]
Maldivia so you want a wrapper method like addError(TypeA argA, TypeB, argB) { list.add(new Error(argA, argB)); } [03:00]
forgottenone [forgottenone!~forgotten@] has joined ##java [03:01]
ankk yes.. but i couldn't be sure if it is correct way or not in a dto object [03:01]
Maldivia personally, I would say it's not -- but YMMV [03:02]
kgrimes2 [kgrimes2!] has joined ##java [03:03]
Maldivia mutating a DTO seems counter to its purpose [03:03]
coet [coet!~coet@wikipedia/coet] has joined ##java [03:05]
fanhako [fanhako!~fanhako@] has joined ##java [03:05]
ankk thank you [03:08]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [03:12]
mona_x [mona_x!~mona_x@] has joined ##java [03:13]
peteski [peteski!~peteski@unaffiliated/peteski] has joined ##java [03:15]
keep_learning Hi Everyone, I am trying to figure out about calling getRandomElement ( ) [03:15]
keep_learning keep_learning's title: "unicrypt/ at master bfh-evg/unicrypt GitHub" [03:15]
Maldivia ok? trying to figure out what? [03:16]
keep_learning But it's in abtract class so I am assuming there would be some concrete class or public interface from which I can call this function. Any help would be great. [03:16]
keep_learning Maldivia I am writing OCaml bindings for this library [03:17]
keep_learning keep_learning's title: "EncryptionSchulze/ at master mukeshtiwari/EncryptionSchulze GitHub" [03:17]
Maldivia keep_learning: yes, it's an abstract class, concrete implementation exists for instance in the math.algebra.general.classes package [03:18]
Maldivia keep_learning: example: [03:18]
Maldivia Maldivia's title: "unicrypt/ at master bfh-evg/unicrypt GitHub" [03:18]
keep_learning Maldivia Thank you very much [03:19]
Maldivia and you can call it form the abstract class; since the instance you have of it will always be of a concrete class implementing those abstract methods [03:20]
fanhako parted the channel: "Leaving" [03:21]
Chaterz [Chaterz!~osboxes@unaffiliated/chaterz] has joined ##java [03:21]
Chaterz hello. [03:21]
Chaterz [Chaterz!~osboxes@unaffiliated/chaterz] has joined ##java [03:23]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [03:25]
foul_owl [foul_owl!] has joined ##java [03:29]
kgrimes2 [kgrimes2!] has joined ##java [03:36]
Chaterz [Chaterz!~Ninjacode@unaffiliated/chaterz] has joined ##java [03:38]
Chaterz hello [03:38]
Maldivia hi [03:39]
javabot yawns [03:39]
acidjnk Here is an argument for NO automatic retry after optimistic lock attempt: Summary: Automatic retry defeats the purpose of optimistic locking. When an OptimisticLockException occurs, a the client should manually (by human) consider the new data. [03:40]
acidjnk And: If you don't care about blind overwrite, use "last transaction wins" instead of locking. [03:42]
Chaterz Maldivia, you know how to do this [03:43]
snql [snql!~snql@unaffiliated/snql] has joined ##java [03:46]
Maldivia yes [03:46]
Maldivia I know how to do that [03:47]
Chaterz mmm, ok help me if you are available [03:47]
Maldivia you get a reference to an instance of that class, call a method on it to get the list, that's it [03:47]
Maldivia if that other clss is a managed bean, you probably @Autowire it [03:48]
Maldivia this is java 101 [03:48]
Chaterz OKey [03:48]
Diablo-D3 I suspect its literally java 101 [03:48]
Diablo-D3 this channel has a strict no homework rule [03:48]
Maldivia not that strict :D [03:49]
Chaterz løl java 5 ,ok [03:49]
jvava [jvava!~ryan@] has joined ##java [03:51]
jvava is logback thread-safe? [03:51]
Maldivia yes [03:52]
jvava Maldivia, is it process-safe? [03:53]
Maldivia if a logging framework wasn't thread-safe it would not be used [03:53]
jvava I mean there many java processes are writing into the same file with logback. [03:53]
Maldivia no, not process safe in that regard [03:54]
Maldivia you DONT want multiple JVMs to write to the same log file [03:54]
jones432 [jones432!] has joined ##java [03:55]
jvava Maldivia, I have a java process, it will generate other java process, [03:55]
LaSombra Huh [03:55]
LaSombra Do you mean threads? [03:55]
jvava no, [03:56]
jvava process [03:56]
deavmi [deavmi!~deavmi@] has joined ##java [03:56]
Maldivia jvava: atually, logback has a prudent mode that should allow for safer writing to the same log file... but never tested it myseld [03:56]
Maldivia jvava: [03:56]
Maldivia Maldivia's title: "Chapter 4: Appenders" [03:56]
jvava thank you, Maldivia, I'm checking it [03:57]
Maldivia it degrades performance though [03:57]
yawkat (also, why?!) [03:57]
Diablo-D3 also re logback, if you ever think in the future that you might want to switch, use slf4j and use the logback backend for it [03:58]
yawkat does logback even have a non-slf4j frontend [03:58]
Diablo-D3 you can just call it directly, its the same API [03:58]
Diablo-D3 Im just mentioning slf4j because then you dont have to waste time worrying about shit [03:59]
Diablo-D3 if it suddenly doesnt do what you want, swap the backend [03:59]
Markow [Markow!~ejm@] has joined ##java [04:00]
yawkat how do you get the logback-internal logger without slf4j? [04:01]
magz [magz!] has joined ##java [04:01]
Diablo-D3 yawkat: uh, I swear Ive used it before [04:02]
Maldivia as far as I know, it implements the SLF4J API directly, so using logback directly actaully is using slf4j :D [04:02]
gareppa [gareppa!~gareppa@unaffiliated/gareppa] has joined ##java [04:02]
yawkat yea that was my impression too [04:02]
mona_x [mona_x!~mona_x@] has joined ##java [04:02]
lithium [lithium!~lithium@unaffiliated/lithium] has joined ##java [04:03]
Diablo-D3 ahh [04:03]
Diablo-D3 thats just hilarious then [04:03]
Diablo-D3 Maldivia: wait, do the logback jars dep slf4j? [04:03]
yawkat yes [04:04]
Diablo-D3 hah [04:04]
Maldivia yes [04:04]
Maldivia [04:04]
Maldivia Maldivia's title: "Maven Repository: ch.qos.logback logback-classic 1.2.3" [04:04]
Diablo-D3 I thought it was just the same api, not literally in the sense that its an impl of the interfaces or w/e [04:04]
yawkat logback-core exists but im not sure how useable it is [04:04]
mz` [mz`!~emerick@gandi/mz] has joined ##java [04:07]
computeiro [computeiro!~computeir@] has joined ##java [04:08]
DTZUZU [DTZUZU!] has joined ##java [04:08]
taxon [taxon!] has joined ##java [04:08]
Maldivia yawkat: btw, you let me down the other day :( I wanted to quickly check how kotlin generated continuation code for kotlinx.coroutines... but your javap site doesn't have that as a dependency :( [04:12]
yawkat hmm, could fix that probably [04:13]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [04:13]
Maldivia was just too lazy to download latest kotlin locally to compile and javap myself :D your site is too convenient for it :D [04:13]
mz` [mz`!~mz@gandi/mz] has joined ##java [04:19]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:91b5:c110:aee4:be03] has joined ##java [04:27]
PsyhoZOOM [PsyhoZOOM!~PsyhoZOOM@] has joined ##java [04:28]
themsay [themsay!~themsay@] has joined ##java [04:32]
ViralTaco [ViralTaco!~dork@unaffiliated/d-b/x-8688605] has joined ##java [04:34]
bakwods_ [bakwods_!~zikani@] has joined ##java [04:36]
PsyhoZOOM [PsyhoZOOM!~PsyhoZOOM@] has joined ##java [04:39]
pi0 [pi0!zeropi@gateway/shell/xshellz/x-drrsnxzqeopfputq] has joined ##java [04:41]
H-K [H-K!] has joined ##java [04:46]
H-K [H-K!] has joined ##java [04:50]
shirafuno [shirafuno!~shirafuno@] has joined ##java [04:55]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [04:57]
Robin___ [Robin___!] has joined ##java [04:59]
Robin___ pastebin [05:00]
Robin___ Please paste your code and any errors online. For runnable main-classes, try . For general code and errors, use for instance or [05:00]
fabiim [fabiim!~fabiim@] has joined ##java [05:01]
Robin___ I send a GET which triggers the following function, but it does not wait for the operations to finish before sending a response: what am I doing wrong? I use AsyncResponse :) [05:02]
nbro [nbro!~nbro@] has joined ##java [05:06]
localh0st Hey, I've been wondering if it's possible to reuse some thread pool after the application redployment on tomcat? [05:07]
frojnd parted the channel: "WeeChat 1.6" [05:13]
fabiim_ [fabiim_!~fabiim@] has joined ##java [05:14]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [05:17]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [05:20]
[twisti] why would that be something you would want ? [05:23]
localh0st [twisti]: in example I'd like to list running threads after redeployment [05:27]
Robin___ updated version, but still wont wait for operations to finish before sending a response: [05:27]
[twisti] but how would that differ if you just made a new thread pool ? what do you gain from reusing an old one ? [05:27]
absk007 [absk007!~absk007@unaffiliated/absk007] has joined ##java [05:28]
sonOfRa Robin___: I'm not sure how *exactly* jerseys async stuff works [05:28]
sonOfRa but isn't the *point* of async that you immediately get a response, instead of "when it's done"? [05:28]
Robin___ is it? i thought the opposite [05:29]
yawkat and wtf, youre using gson, org.json AND jersey? [05:30]
yawkat like... why? [05:30]
yawkat this code could be a single line [05:30]
[twisti] yawkat: war crimes in a past life [05:30]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [05:31]
yawkat i dont think that punishment is fair. [05:31]
Robin___ i like to appreciate all the work put in to all these libraries ;) [05:31]
sonOfRa Robin___: async is generally: "Hey server, do the thing please". "Okay I've started doing the thing. It'll be done some time" [05:31]
sonOfRa sync is: "Hey server, do the thing please"............ "Okay thing's done here you go" [05:32]
malen [malen!~malen@unaffiliated/malen] has joined ##java [05:32]
sonOfRa Unless you have a really good reason to do async (like asking external servers that are known to be slow), just don't [05:32]
sonOfRa "Do a database read and serialize json" is *not* a good reason to do async. [05:32]
Robin___ ok thx! [05:33]
waheedi [waheedi!~Waheedi@] has joined ##java [05:33]
waheedi I get an error trying to run a local documentation server for selenium The method getName() is undefined for the type Class [05:35]
waheedi and this same error, The type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files [05:35]
Chepra [Chepra!] has joined ##java [05:38]
enoq [enoq!~enoq@2a02:8388:6a87:b080:649f:9456:c1b1:28e4] has joined ##java [05:38]
nokdoot [nokdoot!~nokdoot@] has joined ##java [05:38]
Robin___ yawkat: could you please show me how I can make these 3 lines into 1? thx [05:41]
ultraod [ultraod!~ultraod@] has joined ##java [05:42]
yawkat asyncResponse.resume(Response.ok(ts.getAllTasks(), MediaType.APPLICATION_JSON).build();); [05:42]
Robin___ woweh! [05:42]
Robin___ Results in this: MessageBodyWriter not found for media type=application/json, type=class java.util.ArrayList, genericType=class java.util.ArrayList. [05:44]
yawkat then fix your jersey ser support [05:44]
OnceMe [OnceMe!~OnceMe@unaffiliated/onceme] has joined ##java [05:44]
yawkat [05:45]
yawkat yawkat's title: "Chapter 9. Support for Common Media Type Representations" [05:45]
Robin___ I also included this dependency: [05:47]
Robin___ Robin___'s title: "Maven Repository: com.sun.jersey jersey-json 1.19.4" [05:47]
Robin___ already* [05:47]
Robin___ is it not the fact that ts.getAllTasks() returns List<Task>... that it fails? [05:47]
sonOfRa com.sun.jersey is jersey1, you are probably (hopefully) using jersey2, which is glassfish [05:48]
yawkat no [05:48]
yawkat the whole point of jersey is that you dont need to call into a ser lib yourself [05:48]
Robin___ um [05:49]
sonOfRa Robin___: basically, in jersey you tell the controller method "this returns json", and when you return a List, and the http client asks for json, jersey will automatically serialize your list into json [05:50]
sonOfRa You just need to tell jersey where/how to find the serializer (and you want jackson) [05:50]
t2mkn [t2mkn!~t2mkn@] has joined ##java [05:50]
Robin___ alright. thank you. and how do i tell jersey where/how to find the serializer? [05:52]
sonOfRa read yawkat's jersey link [05:52]
yawkat it should do it by itself with spi [05:52]
sonOfRa just add the dependency [05:53]
Robin___ I did. both jackson and jersey [05:53]
malen [malen!~malen@unaffiliated/malen] has joined ##java [05:53]
Robin___ WAIT.STOP [05:53]
Robin___ moment. [05:53]
karab44 [karab44!~karab44@unaffiliated/karab44] has joined ##java [05:55]
Aquazi [Aquazi!uid312403@gateway/web/] has joined ##java [05:56]
ash_worksi [ash_worksi!] has joined ##java [05:59]
Robin___ funny. I added all the dependencies that is mentioned in yawkats link BUT still gives same message: [06:00]
Robin___ its not so important. I can do the ugly solution. what is more important is why this function (without async) does not wait for the operations before returning the response: [06:02]
yawkat because youre using org.json [06:02]
yawkat try removing jersey-json [06:03]
compengi [compengi!d95bfe34@gateway/web/freenode/ip.] has joined ##java [06:03]
Robin___ yawkat: woweh! that worked. [06:05]
Robin___ (sorry) it didnt [06:06]
sonOfRa what is "ts"? Is it also some asynchronous thing? [06:07]
Robin___ i shall show you. una momento senor [06:07]
Robin___ [06:10]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [06:14]
malen [malen!~malen@unaffiliated/malen] has joined ##java [06:20]
surial Robin___: async is slower and harder to program for. Unless you have the pretty exotic set of requirements that makes async a good idea, you shouldn't be doing that. If you're kinda new to programming, you... really, really shouldn't. [06:22]
surial Robin___: also, x.values().forEach(task -> tasks.add(task)) is rather silly. It's a mix of 2 styles. [06:22]
Robin___ netbeans suggested it :P [06:23]
surial Robin___: try either for (var task : x.values()) tasks.add(task); which is both shorter and a uniform style, or.. [06:23]
surial Robin___: x.values().stream().collect(Collectors.toList()); or probably the best one: new ArrayList<>(x.values()); [06:23]
Robin___ ah thanks :D [06:23]
surial Robin___: netbeans is more or less put out to pasture. [06:23]
Robin___ O what do people use? [06:24]
surial Robin___: THis is a bit tricky, but, a short history lesson on netbeans: Netbeans, for years, was the also-ran IDE. The less popular brother to Eclipse and IntelliJ; nevertheless, it WAS named in the top 3 and was generally assumed to be the #3, with a large distance between 1/2 (eclipse/intellij) and 3 (netbeans) but also a large distance between 3 and 4. Netbeans was perfectly servicable as an IDE, it had its warts (but so do [06:24]
surial eclipse and intellij), but also had some unique nice things. [06:24]
surial Robin___: then oracle bought sun, didn't know whate to do with it, fired the dev team, and netbeans started falling behind. The community clamoured for oracle to do something about it so... they 'donated' it to a large open source management entity. [06:25]
surial When large projects are donated like that, they usually die. [06:25]
surial So, I'd strongly recommend using something else. Eclipse or IntelliJ for example. [06:25]
Robin___ interesting. [06:26]
Robin___ do you have any idea why my operations wont finish before a response is sent as shown in above links? [06:26]
srisri [srisri!~srisri@] has joined ##java [06:27]
surial For some insights on why that's usually death: The open source entity now has to find a bunch of programmers who are wililng to work for free or for very little money on a project they do not own or imagined, which is a huge code b ase you have to learn and understand before you can do anything, and which has fallen behind quite a bit. Also, you do not get to ask much of the programmers who recently worked on it either. Even [06:28]
surial when there's tons of money around to try to make that work, that's hard. Let alone when nobody really cares about it, it's behind, and there isn't nearly as much money involved. [06:28]
surial Robin___: because you don't understand how async works, is my guess. [06:28]
Robin___ I removed the async part here: [06:28]
surial We can try to get into it. In which case you'll probably still be asking fairly basic questions and getting all confused about how java and programming works.. 1 whole year from now. [06:28]
surial Or, you ditch this platform and find something that's more commonly used and less confusing. [06:28]
surial I vote the latter. [06:28]
Robin___ cant really do that, since its a course i follow :( [06:29]
ash_worksi [ash_worksi!] has joined ##java [06:29]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7922:7b75:1a63:ca6f] has joined ##java [06:29]
Robin___ as it is now it should happen in sequence, because thats how it normally does. so operations should finish and then a response should be send with the data which the operations returned [06:30]
snql [snql!~snql@unaffiliated/snql] has joined ##java [06:36]
enoq [enoq!] has joined ##java [06:38]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [06:41]
surial Robin___: ah, fantastic. A course you follow. Either find another course, or, if that's not feasible, hey, somebody somewhere is getting paid. We aren't. I bet those who get paid to teach you are far more motivated and capable of helping you. Perhaps you should talk to them. And a reminder... [06:42]
surial homework [06:42]
surial Robin___, We don't answer homework-style questions here. Homework assignments intentionally ask you to produce bad code: You generally HAVE to use some mechanism even though it isn't the best tool for the job, and '.. just use this library that does all that in a very nice way!' is usually not acceptable. That makes them VERY frustrating questions. [06:42]
surial homework is off topic for this channel. [06:42]
pioto [pioto!~pioto@unaffiliated/pioto] has joined ##java [06:45]
Robin___ its not homework [06:46]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7922:7b75:1a63:ca6f] has joined ##java [06:47]
sakhd_ [sakhd_!~sakhd@] has joined ##java [06:49]
bsaboia [bsaboia!~bsaboia@] has joined ##java [06:49]
malen_ [malen_!~malen@unaffiliated/malen] has joined ##java [06:50]
X230t [X230t!x13@gateway/shell/suchznc/x-fmnusglrmizdjwzu] has joined ##java [06:51]
deavmi [deavmi!~deavmi@] has joined ##java [06:52]
pawle [pawle!] has joined ##java [06:57]
CAPITANOOO [CAPITANOOO!~CAPITANOO@] has joined ##java [06:58]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [07:06]
surial Robin___: of course it is; you're doing it for a course. Commentary about what libraries and styles are best suited to write the application get mowed down with 'but my course requires me to use this bad thing instead'. [07:12]
irdr [irdr!] has joined ##java [07:12]
surial Robin___: that's the channel's 'homework' standard. If you prefer the term 'coursework', feel free to imagine that's what we call it instead. [07:12]
gryffus [gryffus!~gryffus@unaffiliated/gryffus] has joined ##java [07:13]
Robin___ i dont need to hand in something but had some extra free time to try learning stuff. however, i want to do it in the same environment as the course use. how is that a homework? :( [07:14]
Robin___ if it was part of the course i would just look at literature reference for the answer [07:16]
mona_x_ [mona_x_!] has joined ##java [07:16]
dreamreal [dreamreal!~jottinger@unaffiliated/dreamreal] has joined ##java [07:20]
fyrril [fyrril!~fyrril@2605:a601:7012:7200:e4a5:11bc:7076:bc0d] has joined ##java [07:21]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7922:7b75:1a63:ca6f] has joined ##java [07:21]
bakwods_ [bakwods_!~zikani@] has joined ##java [07:21]
mlehmk [mlehmk!~mlehmk@unaffiliated/mlehmk] has joined ##java [07:22]
enoq [enoq!] has joined ##java [07:23]
malen [malen!~malen@unaffiliated/malen] has joined ##java [07:33]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [07:33]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7922:7b75:1a63:ca6f] has joined ##java [07:38]
H-K [H-K!] has joined ##java [07:42]
ogradyd [ogradyd!] has joined ##java [07:52]
ciaron [ciaron!~ciaron@] has joined ##java [07:53]
rwheadon [rwheadon!~rwheadon@2600:1700:17a0:58ef:91b5:c110:aee4:be03] has joined ##java [07:53]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7922:7b75:1a63:ca6f] has joined ##java [07:56]
Lengsdorfer2 [Lengsdorfer2!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [07:57]
computeiro [computeiro!~computeir@] has joined ##java [08:01]
ciaron [ciaron!~ciaron@] has joined ##java [08:03]
ash_worksi [ash_worksi!] has joined ##java [08:04]
dmlloyd "going to be homework" is the same as "is homework" for the same reasons [08:08]
dmlloyd why no homework [08:08]
dmlloyd We understand you aren't asking us to do your homework. That's not why we don't answer. We don't because 1) You usually don't comprehend the answer and we get stuck in an endless loop of 'why', 2) You will understand, but you'll retort with "my professor doesn't want me to do it this way'. That's frustrating. 3) Homework questions are boring questions. We don't get paid. Your prof does. [08:08]
dmlloyd that factoid could use an update I guess, but it gets to the gist of the problem [08:09]
dreamreal context? and what update would you suggest? [08:09]
dmlloyd maybe more emphasis on being forced to do things in weird ways... [08:12]
dreamreal well, it's not like the factoid is locked... how would you word it? [08:13]
H-K [H-K!] has joined ##java [08:15]
dreamreal We understand you aren't asking us to actually DO your homework. That's not why we don't answer. We don't answer because 1) homework tends to emphasize techniques that don't need to be written (or re-written) in the real world. We're in the real world, and don't rewrite things in the standard library. 2) Homework problems tend to be boring problems. We don't get paid. Your prof does. 3) We aren't in the [08:15]
dreamreal business of explaining basics to students. <-- better? [08:15]
dreamreal nope, too long [08:15]
dreamreal not even sure if that fits the requirement anyway [08:20]
surial dreamreal: gotta run, but maybe focus on why they are very frustrating questions. [08:23]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [08:24]
dreamreal I'm probably not the right one to write such emphasis. [08:25]
z3r0th [z3r0th!~z3r0th@gateway/tor-sasl/z3r0th] has joined ##java [08:25]
ogradyd [ogradyd!] has joined ##java [08:30]
dendazen [dendazen!~dendazen@] has joined ##java [08:34]
nokdoot [nokdoot!~nokdoot@] has joined ##java [08:39]
vdamewood [vdamewood!~vdamewood@unaffiliated/vdamewood] has joined ##java [08:44]
fabiim [fabiim!~fabiim@] has joined ##java [08:51]
noodlepie [noodlepie!] has joined ##java [08:55]
pzp [pzp!uid11754@gateway/web/] has joined ##java [08:56]
abf_ [abf_!~abf@2601:404:c101:234::533f] has joined ##java [08:58]
noodlepie [noodlepie!] has joined ##java [09:01]
limbo_ [limbo_!ar@] has joined ##java [09:05]
limbo_ Anyone know of a smali to java source code converter? Ideally CLI based. Everything I've found seems to operate on jars, class files, or .apks. (as well as generally being GUI based, like ClassyShark) [09:07]
cheeser limbo_: ask #android-dev [09:07]
limbo_ Is smali android specific? [09:08]
cheeser seems to be [09:08]
cheeser it's not a java thing at least. [09:08]
limbo_ ahh, dex specific. [09:10]
cheeser right. so not java and not ##java [09:11]
srisri [srisri!~srisri@] has joined ##java [09:11]
dreamreal limbo_: were you in ##java yesterday asking about smali? [09:11]
cheeser (all signs point to "yes") [09:12]
dreamreal indeed [09:12]
cheeser ah, that was weijunli [09:12]
dreamreal are we sure they're different people? [09:13]
nbro [nbro!~nbro@2a02:aa13:3100:6000:5009:f724:b26e:b71] has joined ##java [09:13]
cheeser different nickserv accounts at least [09:13]
Diablo-D3 smali is basically assembler for dex bytecode, so very android [09:13]
dreamreal hrm. Odd synchronicity then. [09:13]
Diablo-D3 it'd also not make sense to convert it to java, btw [09:13]
Diablo-D3 no more than it'd make sense to convert normal assembler to, say, C [09:14]
limbo_ dreamreal: No. [09:15]
Diablo-D3 java bytecode (either sun-style or dex) loses too much to be turned back into java [09:15]
Diablo-D3 so, that probably answers your question more realistically than what you originally asked [09:16]
cheeser uh... [09:16]
limbo_ dreamreal: nowhere documents what smali is very well, and android is java-heavy. I wouldn't be surprised if you get that a lot in here. [09:17]
cheeser we get a lot of android questions, yes. we push them all to #android-dev because android is not java. [09:17]
sonOfRa limbo_: the problem is that while android uses java-the-language, it doesn't use java-the-vm [09:18]
limbo_ Diablo-D3: Any specifics on what gets lost in the conversion process? (or links to some reading material) [09:18]
Diablo-D3 limbo_: someone has probably made a list [09:18]
sonOfRa This leads to a lot of subtle changes, and, more importantly, code style and library choices [09:18]
sonOfRa So things we would recommend to a regular java developer here simply don't apply to android developers [09:18]
cheeser limbo_: you can disregard Diablo-D3's comments on the topic as they're largely inaccurate [09:18]
Diablo-D3 cheeser: so generics ARE in bytecode? ;) [09:19]
cheeser yes [09:19]
Diablo-D3 you can say what you want, trying to decompile bytecode back into usable java will not yield what you want in most cases [09:19]
cheeser that's a different claim than your earlier assertion, though. [09:20]
Diablo-D3 smali is only useful for patching broken closed source binaries when rom transplanting on android [09:20]
limbo_ sonOfRa: you mean the JRE SE, surely? I've done more non-android java than I have android java. There's a bunch of language implementations, last I checked. [09:20]
Diablo-D3 thats literally why it was created [09:20]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [09:20]
Diablo-D3 so #android-dev is where you want to go [09:20]
limbo_ also, someone should probably fix // if they're in here. [09:20]
limbo_ Is there a smali equivilant for java SE bytecode? [09:21]
cheeser javac [09:21]
sb35 [sb35!~sb35@] has joined ##java [09:22]
Diablo-D3 limbo_: lilac or jasmin might be what you want [09:22]
Intelo [Intelo!~Intelo@gateway/tor-sasl/intelo] has joined ##java [09:23]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7559:2460:3728:384a] has joined ##java [09:23]
dreamreal limbo_: what's wrong with [09:23]
wodencafe [wodencafe!] has joined ##java [09:23]
cheeser 502 / Bad Gateway [09:23]
pawle [pawle!] has joined ##java [09:24]
Diablo-D3 something seems configured wrong on it anyways, www. doesnt go where it should [09:24]
dreamreal well, you know who owns it :) [09:25]
limbo_ cheeser: I mean the language/format. If there's one literally called "javac", that sounds very confusing. [09:25]
dreamreal one what called javac? [09:25]
cheeser limbo_: this isn't the place to discuss smali as you've been told multiple times now [09:25]
Guest321 Back` [09:26]
limbo_ cheeser: I no longer care about discussing smali, (least of all in here) I was just trying to figure out if you saying "javac" was snark or an actual suggestion. [09:28]
cheeser yes [09:28]
cheeser want to patch your app? use javac. deploying new jars. [09:28]
limbo_ Please stop trying to assume what I want to do. (or that I have some end-goal in finding this/any information) I find it very confusing. [09:32]
dreamreal well, do the programmer thing and restate what it is you want to do, because clearly it's being misunderstood by someone's perspective [09:32]
cheeser indeed. [09:33]
cheeser if your intent has changed since "i'm trying to solve my problems with smali" then state your new problem. [09:33]
srisri [srisri!~srisri@] has joined ##java [09:33]
CodingOtaku [CodingOtaku!~CodingOta@] has joined ##java [09:34]
Diablo-D3 I think hes just trying to disassemble bytecode, and didnt realize smali was dex-only [09:34]
dreamreal Diablo-D3: hey, I have an idea [09:34]
cheeser but you're asking about smali "language/format" issues which is entirely out of bounds here. [09:34]
dreamreal why don't we let him restate his problem, since he's the one who knows what it is [09:34]
conan [conan!~conan@] has joined ##java [09:35]
Diablo-D3 dreamreal: hey, Im just trying to give him the benefit of the doubt [09:36]
dreamreal me too [09:36]
cheeser but in the meantime you're not really adding any value [09:36]
cheeser *I* can speculate about his/her intent but clearly I'm missing it. [09:37]
yawkat people dont really alter java bytecode with smali like they do with, well, android [09:37]
yawkat java is not used in many places where you would want to reverse-engineer [09:38]
yawkat the best options are [09:38]
yawkat bytecode editor [09:38]
yawkat A bytecode editor lets you edit class files without decompiling them. JBE ( is an older one, Recaf ( is newer. [09:38]
yawkat asm [09:38]
yawkat yawkat, asm is a java library to read and write class files (as a bag of methods, fields, bytecode, and constant pool entries). Open source. INFO: DOWNLOAD: alternatives: ~javassist, ~bcel or for a visual editor, ~jbe. More info: ~bytecode [09:38]
yawkat (as an aside, android really lacks something like asm. i wrote my thesis on fixing that) [09:39]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [09:41]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [09:41]
Atizs I get Exception in thread "JavaFX Application Thread" java.lang.NullPointerException, but nowhere does it say which method exaclty did this. How can I find which line invoked the update that cause exception? I call it in many places [09:42]
cheeser you should have a stack trace, too [09:42]
Atizs yes, but it does not lead to anywhere in my code. see: [09:43]
cheeser well, there's a line of code right there. see what it's trying to do. [09:43]
Atizs What do you mean there is a line of code? [09:44]
qouwse [qouwse!] has joined ##java [09:44]
cheeser the stack trace points to a line of code. [09:46]
jesst_ [jesst_!~jesst@] has joined ##java [09:46]
Atizs in some 3rd party library yes [09:46]
cheeser yes [09:46]
lauris [lauris!~root@unaffiliated/lauris] has joined ##java [09:47]
cheeser there's still value in seeing what it's trying to use. that info likely comes from your app. so then you find out why fx doesn't have the info it needs. [09:47]
Atizs But it seems that I fixed it. I forgot that I can update GUI only form javaFX thread [09:47]
Atizs I think so at least [09:47]
ultraod [ultraod!~ultraod@] has joined ##java [09:47]
lauris hi, I have java application which used to run fine with jre7, but after migration to jre8 it started crashing on startup at random places. looks like memory allocation or GC problem. this only happens when running it inside docker container. jre8 works fine when running it on a host system (outside docker). any ideas? [09:49]
cheeser add some debug? attach a debugger? add some logging? [09:50]
cheeser use a profiler? [09:50]
dreamreal look at what the actual error is, maybe even set the memory limits [09:50]
lauris there are no limits set and system has enough of free memory. [09:50]
dreamreal lauris: docker sets its OWN limits on ram [09:51]
lauris crash stacktraces are non descriptive because everytime istart the app it crashes with different message [09:51]
dreamreal so if you're getting memory problems when running in docker, that's probably why; old java versions have a known issue with system memory in docker (they read system memory and not docker instance memory, which causes them to be aggressive with allocations) [09:51]
lauris for example: and [09:51]
lauris old java version didn't have any problems running it [09:52]
yawkat that is something that really shouldnt happen [09:52]
lauris but now vendor is forcing me to migrate to jre8 [09:52]
yawkat looks like a broken jdk [09:52]
dreamreal lauris: *shrug* [09:52]
surial That sniffs of a broken JRE. [09:52]
surial lauris: what's java -version give? [09:52]
lauris same JRE works without a problem on a host machine [09:52]
cheeser run your code outside docker and see. [09:52]
lauris I only have these problems when running it inside docker container [09:52]
dreamreal lauris: sounds like the docker instance's jre is mangled somehow [09:52]
yawkat awt... in docker? [09:53]
cheeser use a different docker image then [09:53]
lauris i tried different images from different creators [09:53]
lauris problem is not image-specific [09:53]
dreamreal yawkat: I kinda noticed the same thing. [09:53]
dreamreal lauris: is this a GUI app? [09:53]
lauris yes, this is guy app which i'm accessing via VNC [09:53]
yawkat tech support [09:53]
yawkat Hello, ##java is not a technical support channel for your Java apps or virtual machines; it's a development channel for enthusiasts to discuss programming with the Java language. Please ask the vendor of your software for support if you're having trouble with it. [09:53]
cheeser yep [09:53]
cheeser talk to that guy then. [09:54]
lauris gui app* [09:54]
dreamreal lauris: okay, so .. yeah, talk to the author(s), and running a GUI app from java in a docker instance is going to be odd [09:54]
lauris i don't see anything odd about it [09:54]
lauris docker is just a way of packaging it [09:54]
dreamreal I get that you said it worked fine in java 7, but .. eh, so what, fix the problem [09:54]
dreamreal shrugs. Thankfully, not my problem. Good luck. [09:54]
lauris sigh. [09:55]
dreamreal lauris: so contact the author and figure out what is going on [09:56]
dreamreal It wouldn't surprise me that java would struggle to establish window handles, etc., across the docker VM constraints [09:56]
lauris i what the answer will be - we don't support this platform. [09:56]
lauris i know* [09:56]
dreamreal but if you say it worked in jre7, well, okay, it worked in jre7, fix it [09:56]
mona_x [mona_x!~mona_x@] has joined ##java [09:56]
dreamreal so go to a supported platform [09:56]
lauris container is built by me [09:56]
yawkat your setup is sufficiently odd that we can do no better than guess [09:56]
lauris to run this java GUI application [09:56]
lauris on a server so that i don't have to run it on my computer [09:56]
lauris because it's cpu hungry app [09:57]
yawkat have you considered a vm [09:57]
dreamreal lauris: so... are you using X? [09:57]
lauris yes [09:57]
cheeser this is not a java problem anymore. talk to the app author. [09:57]
dreamreal have you CONFIGURED your app to use X as a server? [09:57]
lauris there's no need for additional configuration [09:58]
lauris it worked fine with jre8 [09:58]
dreamreal well, apparently there is. Good luck. [09:58]
lauris 7* [09:58]
lauris and it still starts with jre8 [09:58]
yawkat theres a very good reason why the vendor wont support setups like this :) [09:58]
lauris I see the app window [09:58]
lauris but then it crashes [09:58]
lauris 5-10secs after starting up [09:58]
cheeser enter [09:58]
cheeser lauris, Enter is not punctuation. Please don't press your Enter or Return key until you're finished typing your question, sentence, or idea. It is annoying to see that and hard to follow. [09:58]
lauris ok! :) [09:58]
cheeser but this channel is not the place for this question. [09:59]
noodlepie [noodlepie!] has joined ##java [09:59]
yawkat my advice is using a vm instead, but beyond that, we cant help [09:59]
lauris cheeser i thought it is, because i'm of opinion it's a java-specific issue, rather than docker issue [09:59]
dreamreal it is not [09:59]
dreamreal if it's running outside of the docker instance but failing inside, it's docker + your app, not java [09:59]
qwedfg [qwedfg!~adam@] has joined ##java [10:00]
lauris but it used to work fine with jre8 for 10+ years [10:00]
lauris sorryu, jre7 :) [10:00]
yawkat doesnt really matter [10:01]
dreamreal ^^^^^ [10:01]
cheeser lauris: it's a tech support problem running your 3rd party app in a wonky environment. we don't do tech support here. [10:01]
lauris every single detail matters [10:01]
yawkat maybe new jdk triggers some docker bug, but that doesnt mean it's a java problem [10:01]
dreamreal lauris: here's a detail that matters a lot: this is tech support, and it's not a ##java thing, for obvious reasons [10:01]
lauris cheeser, ok, I got it, looks like nobody here similar issues here, so I'll search for help somewhere else [10:01]
cheeser good luck out there. [10:01]
yawkat and really, do try a vm. theyre much better for reproduction of envs than docker. [10:02]
sonOfRa Also, it's worked for 10 years in a docker container? I somehow doubt that. [10:02]
lauris no point in trying a VM [10:02]
yawkat why not [10:02]
lauris it's gonna work, i'm pretty sure, just like it works on my host machine [10:02]
yawkat isnt that the point [10:02]
lauris the point is - i still don't know why it doesn't work inside the container and that's how I prefer running that application [10:02]
yawkat it works, runs on the server, and you get to go home. [10:02]
tashie [tashie!] has joined ##java [10:02]
yawkat sounds like a solution to me. [10:03]
Diablo-D3 sounds like you should take this to #docker [10:03]
lauris i will [10:03]
dreamreal lauris: docker's a wonky container for UI apps [10:03]
lauris thanks guys [10:03]
dreamreal good luck! [10:03]
dreamreal and if you DO find a solution, write it up somewhere where others can see what the problem was and what the solution could be [10:04]
dreamreal please [10:04]
Nicmavr [Nicmavr!~Nicmavr@unaffiliated/nicmavr] has joined ##java [10:05]
code_zombie [code_zombie!~code_zomb@2605:a601:aa1:da00:7499:232b:aa6:ba05] has joined ##java [10:06]
Aquazi anybody who's been unlucky enough to work on liferay 6 knows how to find where a portlet is used? [10:07]
dreamreal tech support [10:08]
dreamreal Hello, ##java is not a technical support channel for your Java apps or virtual machines; it's a development channel for enthusiasts to discuss programming with the Java language. Please ask the vendor of your software for support if you're having trouble with it. [10:08]
dreamreal liferay has its own forums, incidentally [10:08]
Aquazi where nobody ever answers [10:11]
dreamreal Sorry to hear that, not really much we can do about it [10:11]
fabiim [fabiim!~fabiim@] has joined ##java [10:13]
wordsToLiveBy [wordsToLiveBy!~wordsToLi@unaffiliated/wordstoliveby] has joined ##java [10:16]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [10:19]
MarkyC [MarkyC!~MarkyC@] has joined ##java [10:21]
lauris dreamreal, like where? [10:23]
dreamreal like where what [10:23]
noodlepie [noodlepie!] has joined ##java [10:24]
dreamreal oh. I dunno. Your blog, if you have one? stack overflow? quora? [10:24]
sonOfRa Sometimes I wish there was a Comparator-Esque interface for HashCode and Equality. Would be convenient for sets with custom equality [10:24]
sonOfRa Especially when dealing with annotated entities for hibernate/jpa [10:26]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [10:28]
goldstar [goldstar!~adm@unaffiliated/goldstar] has joined ##java [10:43]
waheedi [waheedi!] has joined ##java [10:44]
ash_worksi [ash_worksi!] has joined ##java [10:49]
noodlepie [noodlepie!] has joined ##java [10:50]
Aquazi why do we say "we", nobody would complain on js channel if one made a question on a specific js library or framework, why would this chan need to be different and why would you speak for anybody but urself [10:50]
Aquazi anyway I see the point of the chan message, so ok [10:51]
dreamreal tech support [10:52]
dreamreal Hello, ##java is not a technical support channel for your Java apps or virtual machines; it's a development channel for enthusiasts to discuss programming with the Java language. Please ask the vendor of your software for support if you're having trouble with it. [10:52]
dreamreal ^^^^ note how the channel blog and the bot, corporately written, kind of say the same thing [10:52]
dreamreal if someone in channel knows an answer, they'll usually offer it, but it's stupid to not be upfront about it [10:53]
bendem Aquazi, comparing channel policies won't get you very far when asking for help. Beside, it's not to forbid you to ask these kinds of questions, it's because you are not the first to ask those, and everybody here knows how it ends (spoilers in the bot's factoid) [10:57]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined ##java [10:57]
Aquazi I just wrote: "anyway I see the point of the chan message, so ok" [10:58]
tang^ [tang^!~tang^@] has joined ##java [10:58]
dreamreal we read it [11:00]
dreamreal and nobody COMPLAINED about you asking your question, in any event [11:00]
fabiim [fabiim!~fabiim@] has joined ##java [11:00]
Rockpile [Rockpile!~Rockpile@unaffiliated/rockpile] has joined ##java [11:00]
cheeser let's move on [11:00]
mindCrime [mindCrime!~mindCrime@] has joined ##java [11:03]
nbro [nbro!~nbro@2a02:aa13:3100:6000:7559:2460:3728:384a] has joined ##java [11:04]
nbro [nbro!~nbro@2a02:aa13:3100:6000:8cdb:5fd2:4fe4:bd5f] has joined ##java [11:10]
nbro_ [nbro_!~nbro@2a02:aa13:3100:6000:8cdb:5fd2:4fe4:bd5f] has joined ##java [11:15]
lauris parted the channel: "The Lounge -" [11:18]
gerontoSepp [gerontoSepp!~gerontose@] has joined ##java [11:21]
sonOfRa So, I have a List<Item> that I want to add to my database, but there's some uniqueness involved that *isn't* covered by Item's equals/hashCode implementation. What's the best way to do this? An anonymous DTO-like class that implements equals/hashCode according to my contract, and make a set of those? [11:22]
sonOfRa Not necessarily an anonymous class I guess, just any kind of DTO. [11:23]
funeral [funeral!] has joined ##java [11:24]
greggerz [greggerz!~greggerz@unaffiliated/greggerz] has joined ##java [11:25]
andai [andai!~andai@unaffiliated/andai] has joined ##java [11:26]
ianp a database constraint is one way, fixing the model is another [11:26]
ianp i would tend to prefer the latter [11:26]
cheeser indeed [11:26]
cheeser a db constraint would/should result in an exception when persisting. [11:26]
KeyJoo [KeyJoo!~KeyJoo@] has joined ##java [11:27]
conan [conan!~conan@] has joined ##java [11:28]
MarkyC [MarkyC!~MarkyC@] has joined ##java [11:29]
SerialSmile [SerialSmile!~SerialSmi@] has joined ##java [11:31]
pjs902 [pjs902!~quassel@] has joined ##java [11:36]
sonOfRa I do have a db constraint, but I found the information that the resulting exception gives me to be insufficient for a nicer error message [11:38]
gryffus_ [gryffus_!~gryffus@unaffiliated/gryffus] has joined ##java [11:38]
sonOfRa Fixing the model isn't easy, unless I start using *two* different models, one for the database layer that is then converted into another one for everything else, because with the whole jpa annotations, equals/hashcode is kinda flaky anyhow [11:39]
sonOfRa I would just *not use* hibernate, but that choice is currently not up to me [11:39]
sbalmos you kinda usually do have two models anyway, the JPA entities for server-internal, and then simplified DTOs for JSON/XML/whatever API controller-level request/response [11:41]
sonOfRa Currently those are the same. I guess I could split them up [11:42]
sbalmos sonOfRa: You'll definitely want to, lest you get into lazy-load messes and all sorts of unholiness during marshalling [11:42]
pjs902 [pjs902!~quassel@] has joined ##java [11:43]
sonOfRa Ah well. What's the general pattern for conversion here? Both having a constructor that accepts the other type? [11:44]
fabiim [fabiim!~fabiim@] has joined ##java [11:45]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [11:46]
sbalmos I typically have matching converter classes, because you could get quite "interesting" with what data you want to copy into/out of entities to DTO messages, implementing "views", filtering, etc etc etc [11:47]
sbalmos plus remember that entities are loaded through the EntityManager, and are managed, so constructor conversion wouldn't really work [11:47]
ash_worksi parted the channel: [11:49]
bakwods_ parted the channel: [11:50]
sonOfRa is modelmapper any good [11:51]
sonOfRa It seems to be geared for this exact purpose, but I'm wary of such magic libraries [11:51]
mitch0 [mitch0!] has joined ##java [11:53]
gryffus [gryffus!~gryffus@unaffiliated/gryffus] has joined ##java [11:58]
fabiim_ [fabiim_!~fabiim@] has joined ##java [12:03]
gryffus_ [gryffus_!~gryffus@unaffiliated/gryffus] has joined ##java [12:05]
bobek [bobek!~bobek@unaffiliated/bobek] has joined ##java [12:07]
Markow [Markow!~ejm@] has joined ##java [12:08]
jesst_ [jesst_!~jesst@] has joined ##java [12:12]
oft_gegong [oft_gegong!c6003c8e@gateway/web/freenode/ip.] has joined ##java [12:14]
oft_gegong how can people not like java? the documentation is sound [12:14]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [12:18]
dreamreal oft_gegong: *shrug* it's unsuited for some things, and some people demand those things [12:19]
mitch0 [mitch0!] has joined ##java [12:23]
EgonX [EgonX!] has joined ##java [12:27]
Intelo [Intelo!~Intelo@gateway/tor-sasl/intelo] has joined ##java [12:27]
pawle [pawle!] has joined ##java [12:35]
callMeBaby [callMeBaby!~callMeBab@] has joined ##java [12:36]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [12:38]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [12:38]
ArcherL [ArcherL!~ArcherL@unaffiliated/archerl] has joined ##java [12:39]
acidjnk [acidjnk!] has joined ##java [12:46]
mitch0 [mitch0!] has joined ##java [12:54]
iam730 [iam730!~iam730@] has joined ##java [12:56]
mitch0 [mitch0!] has joined ##java [01:09]
Unicorn437 [Unicorn437!] has joined ##java [01:10]
horatiohb [horatiohb!~horatiohb@] has joined ##java [01:11]
Unicorn437 I'm probably silly right now, but whats the correct syntax for "public interface OrderedDictionary<K> implements Comparable, V>" , K and V being different generic types? [01:12]
dreamreal not to close the angle brackets after K [01:13]
Unicorn437 still doesn't know how to resolve V [01:13]
dreamreal Unicorn437: what are you trying to actually do [01:14]
Unicorn437 Defining an interface for OrderedDictionaries, which hold key and value pairs [01:15]
Unicorn437 keys need to be comparable to order them [01:15]
Unicorn437 This interface will later be implemented using a skiplist [01:15]
Unicorn437 thats about it [01:16]
dreamreal interface OrderedDictionary<K extends Comparable<K>, V> {} [01:16]
wtflux [wtflux!] has joined ##java [01:17]
pawle [pawle!] has joined ##java [01:17]
Unicorn437 That works, thanks! [01:17]
mitch0 [mitch0!] has joined ##java [01:22]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [01:26]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [01:27]
mitch0 [mitch0!] has joined ##java [01:28]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [01:30]
poorbast [poorbast!] has joined ##java [01:36]
ultraod [ultraod!] has joined ##java [01:38]
sigdk [sigdk!~sigdk@2a02:a210:2300:a180:5a50:3be:91b2:4736] has joined ##java [01:39]
mitch0 [mitch0!] has joined ##java [01:39]
basiclaser [basiclaser!uid10861@gateway/web/] has joined ##java [01:40]
swordbeta I want to call a .dll (C SDK for my RGB keyboard) from java. If I understand correctly, I have to create native functions, generate a C header file, write C code to call the existing SDK, compile it to a dll and then load that dll? [01:47]
ernimril jna [01:47]
ernimril ernimril, jna is Java Native Access, an alternative means of using native code from within Java. See - it uses JNI on the inside though, so don't expect miracles. [01:47]
Aqo [Aqo!~Aqo@] has joined ##java [01:48]
sonOfRa swordbeta: that's the JNI approach, yes. But you can also do JNA, which goes quite a ways to make the process less careful. [01:49]
swordbeta Thanks, will look into it [01:50]
plarsen [plarsen!~plarsen@redhat/jboss/pdpc.professional.plarsen] has joined ##java [01:53]
cheeser jna is also slower, apparently [01:53]
sonOfRa Yes, by quite a bit, if you're doing CPU intensive work [01:55]
sonOfRa But that's very likely not the case here [01:55]
Xgc [Xgc!~Jon@] has joined ##java [01:56]
Essadon [Essadon!] has joined ##java [01:57]
sonOfRa Most of that is *calling overhead*. If you call one method 100 times, that will be very slow in JNA compared to JNI. If you call that one method just one time, and it just *takes long to finish* it will not be much slower in JNA [01:58]
mitch0 [mitch0!] has joined ##java [01:58]
malen [malen!~malen@unaffiliated/malen] has joined ##java [02:02]
Intelo parted the channel: "Leaving" [02:02]
goldstar I am using jsoup to parse html. It appears that jsoup isn't cleaning up after itself and this is causing memory leaks. Is there anything I can do on my part to force it's clearance ? maybe set the value to null after using it ? [02:03]
sonOfRa Are you sure it's actually leaking memory, and java is not just deciding that it has no reason to gc yet because there's sufficient free memory? [02:04]
tachoknight [tachoknight!~tachoknig@] has joined ##java [02:05]
ernimril goldstar, how did you decide that jsoup is the cause of the leak? maybe you open sockets and do not close them? [02:06]
goldstar sonOfRa: The memory is just growing, even if I set Xms and eventually crashes the machine because there is no memory left. When doing a dump of the heap with jmap, the byte[] region is increasing significantly and all the references are pointing to html [02:06]
goldstar ernimril: there were some HttpUrlConnections that werent being closed; fixing that, did reduce the rate of growth quite significantly, but it's still leaking at a slower rate [02:07]
Sasazuka [Sasazuka!~Sasazuka@unaffiliated/sasazuka] has joined ##java [02:07]
malen [malen!~malen@unaffiliated/malen] has joined ##java [02:07]
ernimril goldstar, any heap dumps you can share? [02:07]
conan [conan!~conan@] has joined ##java [02:08]
goldstar ernimril: could do, but it might leak sensitive data, and they are 200mb each [02:08]
mitch0 [mitch0!] has joined ##java [02:09]
gryffus [gryffus!~gryffus@unaffiliated/gryffus] has joined ##java [02:09]
noodlepie [noodlepie!] has joined ##java [02:11]
ernimril goldstar, find the owners of the byte[] and see what is holding them in memory [02:11]
Regon [Regon!~Regon@unaffiliated/regon] has joined ##java [02:13]
gelignite [gelignite!] has joined ##java [02:13]
goldstar ernimril: okay, let me try that [02:14]
mitch0 [mitch0!] has joined ##java [02:14]
Tobbi [Tobbi!~Tobbi@supertux/tobbi] has joined ##java [02:15]
ultraod_ [ultraod_!] has joined ##java [02:15]
orbyt_ [orbyt_!~orbyt@] has joined ##java [02:16]
Squarism does maven require that the modules (<module>... members) of a parent A have their parent (<parent>...<groupId>.. <artifactId> ..</parent>) set to parentA? If so, all artifacts of a multimodule project must share the same bom? [02:23]
squeakytoy [squeakytoy!] has joined ##java [02:23]
squeakytoy Hey all. I haven't coded java for maybe 2 years, and I am thinking of testing it for a web backend. Last I touched Java was Java 8, now I see 11 is out. For a new project, is Java 11 what is prefered? [02:25]
mitch0 [mitch0!] has joined ##java [02:25]
Zarthus squeakytoy: considering Java 11 is a LTS, I'd say yes. [02:30]
Zarthus though if you depend on something old, you might dig yourself a hole [02:31]
squeakytoy I have to find a list of all changes between 8 to 11 =) [02:31]
mitch0 [mitch0!] has joined ##java [02:32]
squeakytoy its cool if i install jdk 11, but I still use java 8 code =/ [02:32]
squeakytoy write java 8 code* [02:32]
squeakytoy i hope the leap between 8 and 11 isn't large [02:32]
kgrimes2 [kgrimes2!] has joined ##java [02:36]
mitch0 [mitch0!] has joined ##java [02:39]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [02:39]
GraysonBriggs [GraysonBriggs!~GraysonBr@unaffiliated/graysonbriggs] has joined ##java [02:39]
jesst_ [jesst_!~jesst@] has joined ##java [02:42]
slamzy [slamzy!~slamzy@2a06:1700:1::7] has joined ##java [02:45]
mitch0 [mitch0!] has joined ##java [02:45]
Avaray [Avaray!Avaray@gateway/vpn/privateinternetaccess/avaray] has joined ##java [02:49]
malen [malen!~malen@unaffiliated/malen] has joined ##java [02:52]
mitch0 [mitch0!] has joined ##java [02:52]
dj_pi [dj_pi!] has joined ##java [02:54]
coet [coet!~coet@wikipedia/coet] has joined ##java [02:54]
noodlepie [noodlepie!] has joined ##java [02:56]
mitch0 [mitch0!] has joined ##java [02:58]
cheeser it's not large. that's kinda the point of the quicker releases. [02:59]
cheeser granted, you'll have missed the modules transition but that's an opt in thing so you'd be ok for a while. [03:00]
rippa [rippa!] has joined ##java [03:00]
tang^^ [tang^^!~tang^@] has joined ##java [03:00]
Goplat [Goplat!~Goplat@reactos/developer/Goplat] has joined ##java [03:01]
ArcherL [ArcherL!~ArcherL@unaffiliated/archerl] has joined ##java [03:02]
slamzy [slamzy!~slamzy@gateway/tor-sasl/slamzy] has joined ##java [03:02]
Lengsdorfer2 [Lengsdorfer2!~Lengsdorf@unaffiliated/lengsdorfer] has joined ##java [03:03]
mitch0 [mitch0!] has joined ##java [03:09]
sigdk Hello. In a statement like this: LOGGER.debug(foobar()); it seems that foobar() will be evaluated nevertheless. Is there any way to avoid it in case the log level is set to INFO for instance? [03:16]
pawle [pawle!] has joined ##java [03:16]
mr_lou [mr_lou!] has joined ##java [03:18]
sigdk I guess I could wrap it within a isDebugEnabled() but this tends to become ugly in my code [03:20]
cheeser that's pretty idiomatic [03:22]
mitch0 [mitch0!] has joined ##java [03:22]
SJr Ah cheeser, here is a case where I think method references being something other than lambdas would be good. The example is changed but if in an exception I want to tell users to call another method first, it would be cool if I could just do "Implementations must call " + Class::someMethod.getName() + " before calling this method", and not hard code the method name in a string. [03:24]
cheeser um. ok? [03:25]
cheeser method references *aren't* lambdas. [03:25]
SJr Aren't they? [03:26]
cheeser no [03:26]
SJr "Method references ... are compact, easy-to-read lambda expressions for methods that already have a name." ( [03:27]
SJr SJr's title: "Method References (The Java Tutorials > Learning the Java Language > Classes and Objects)" [03:27]
immibis [immibis!] has joined ##java [03:27]
mitch0 [mitch0!] has joined ##java [03:28]
cheeser i think that maybe there's some semantic nuances involved. afaik a method reference compiles to a MethodHandle in the bytecode which is distinct from an actual lambda. [03:31]
cheeser they are also using the term "lambda expression" which, to me, is also slightly different than a lambda proper. [03:31]
SJr Can a MethodHandle be used in any other context than as an implementation for a functional interface? [03:32]
cheeser sure [03:32]
cheeser you can collect them for a form of dynamic dispatch if you'd like [03:32]
cheeser String -> MethodHandle [03:32]
SJr I'm not sure what that means [03:33]
sigdk <cheeser> that's pretty idiomatic <-- what do you mean? [03:33]
cheeser Map<String, MethodHandle>() map; map.get("foo").invoke() // grievously glossing over many details [03:33]
SJr Oh there actually is a class called MethodHandle. [03:33]
cheeser sigdk: exactly that [03:34]
sigdk cheeser, I don't understand [03:35]
cheeser which part? [03:35]
sigdk how does it answer my question? [03:36]
SJr Oh interesting, you can go from a MethodHandle to a ReflectionMethod. [03:37]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [03:37]
SJr All is well in the world! [03:37]
nbro [nbro!~nbro@2a02:aa13:3100:6000:8cdb:5fd2:4fe4:bd5f] has joined ##java [03:38]
cheeser sigdk: you didn't have a question. you had a comment. i had one in response. [03:38]
SJr Errr, but I can't do this MethodHandle m = this::toString; [03:38]
cheeser no? [03:38]
acidjnk [acidjnk!] has joined ##java [03:39]
SJr Not in Java 8, it says that MethodHandle is not a functional interface. [03:39]
cheeser huh. interesting. [03:39]
tachoknight [tachoknight!~tachoknig@] has joined ##java [03:39]
mitch0 [mitch0!] has joined ##java [03:39]
cheeser javadoc MethodHandle [03:40]
cheeser cheeser: [JDK: java.lang.invoke.MethodHandle] [03:40]
cheeser TIL [03:40]
SJr And thinking about it more, I'm not sure how that would work, because you can do: Supplier<String> foo = this::toString; [03:40]
cheeser openjdk 11 responds the same [03:40]
slamzy1234 [slamzy1234!~slamzy@gateway/tor-sasl/slamzy] has joined ##java [03:40]
cheeser nods. [03:41]
sigdk cheeser, of course there was a question. See my message at XX:16:05 [03:41]
SJr So I go back to my original conjecture that as far as the JLS is concerned, Method References are just lambda shortcuts, and implemented perhaps more smartly underneath. [03:41]
slamzy12345 [slamzy12345!~slamzy@gateway/tor-sasl/slamzy] has joined ##java [03:41]
cheeser sigdk: ah, well. i was responding to your comment. [03:41]
cheeser SJr: i'm not expert enough on the subject to argue against that assertion at this point. [03:42]
cheeser i've not use MethodHandles in anger, really [03:42]
mitch0 [mitch0!] has joined ##java [03:45]
nbro [nbro!~nbro@2a02:aa13:3100:6000:8cdb:5fd2:4fe4:bd5f] has joined ##java [03:48]
Squarism Its kind of interesting to compare non DI vs DI. It almost feels as if started to work against you. More of a burden than a help [03:48]
Suchorski [Suchorski!~regex@unaffiliated/suchorski] has joined ##java [03:49]
mitch0 [mitch0!] has joined ##java [03:50]
cheeser what? [03:50]
dreamreal Squarism: which one is more of a burden than a help? [03:51]
conan [conan!] has joined ##java [03:53]
Squarism with Dependency injection. [03:53]
dreamreal how so? [03:53]
Squarism to know all your executions have correct dependency injection you have to run them right. Often caught with tests sure, but some scenarios take ages to run so you avoid running them. [03:55]
dreamreal um... wouldn't that be the case regardless of DI usage? [03:55]
dreamreal And DI at least gives you the option of injecting mocks [03:55]
mitch0 [mitch0!] has joined ##java [03:56]
dreamreal or test-only instances that act like mocks but aren't necessarily the same thing [03:56]
Squarism If all configuration would be compile time then you would have the compiler just point out where you've gone wrong [03:56]
dreamreal ... [03:56]
dreamreal okay, let's back up just a bit: what do you mean by "DI"? [03:57]
shyftr [shyftr!~krek@] has joined ##java [03:57]
slamzy1234 [slamzy1234!~slamzy@gateway/tor-sasl/slamzy] has joined ##java [03:58]
cheeser fwiw, dagger is DI that can be compile time checked. [03:58]
Squarism dagger? [04:00]
Squarism dreamreal, binding resolved at runtime? [04:00]
dreamreal okay, that's one way to look at DI, it's an implementation approach [04:01]
dreamreal but that clears up why you were feeling about it the way you did [04:01]
Squarism So i have gotten the definition wrong? [04:02]
dreamreal no, but you're looking at it and using it a certain way [04:02]
Squarism cheeser, This ? [04:04]
[twisti] zes [04:05]
[twisti] zes [04:05]
[twisti] wtf [04:05]
[twisti] yes [04:06]
Squarism Is it gaining momentum? [04:07]
dreamreal it's popular on android [04:07]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:f5eb:2eab:b104:f542] has joined ##java [04:08]
enoq [enoq!~enoq@2a02:8388:6a87:b080:3f30:9f7d:611e:7eef] has joined ##java [04:13]
mitch0 [mitch0!] has joined ##java [04:22]
Rockpile [Rockpile!~Rockpile@unaffiliated/rockpile] has joined ##java [04:23]
Squarism Any guess why its not winning ground on typical server spring projects? [04:24]
dreamreal because spring is easy and well known and not invasive [04:26]
cheeser it's biggest usage is on android where the perks it offers over others are more important [04:26]
dreamreal i.e., spring's good enough and far older [04:26]
pawle [pawle!] has joined ##java [04:28]
spl33n [spl33n!~spl33n@unaffiliated/spl33n] has joined ##java [04:28]
codecutter [codecutter!] has joined ##java [04:36]
codecutter parted the channel: "Textual IRC Client:" [04:36]
Techcable [Techcable!] has joined ##java [04:49]
kgrimes2 [kgrimes2!] has joined ##java [04:50]
Techcable [Techcable!] has joined ##java [04:58]
pjs902 [pjs902!~quassel@] has joined ##java [04:59]
guacjack [guacjack!~textual@2a01:4b00:e80c:c200:bca7:e22c:143d:1213] has joined ##java [05:04]
tazle [tazle!] has joined ##java [05:05]
Techcable [Techcable!] has joined ##java [05:05]
Techcable [Techcable!] has joined ##java [05:18]
LKoen [LKoen!] has joined ##java [05:21]
Eksekk [Eksekk!Ex@gateway/shell/elitebnc/x-xnwxjcumzlbbdpru] has joined ##java [05:23]
AnatoBot [AnatoBot!~AnatoBot@] has joined ##java [05:24]
Techcable [Techcable!] has joined ##java [05:25]
iam730 [iam730!~iam730@] has joined ##java [05:31]
navy_seal9614 [navy_seal9614!] has joined ##java [05:31]
sbalmos [sbalmos!] has joined ##java [05:34]
pjs902 [pjs902!~quassel@] has joined ##java [05:38]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:f5eb:2eab:b104:f542] has joined ##java [05:41]
dmlloyd omg everything is stupid [05:43]
dmlloyd okay so here's my latest brain-buster [05:43]
dmlloyd I have a bunch of JAR files and their dependencies are a mess [05:43]
dmlloyd stuff missing etc. [05:43]
dmlloyd so I think to myself "I can sort this out with jdeps" [05:43]
dmlloyd okay cool so I switch to Java 8 and fire up jdeps on all the JARs [05:44]
dmlloyd uh oh "Exception in thread "main" Warning: blah.jar is a multi-release jar file" [05:44]
dmlloyd and then: "java.lang.InternalError: Missing message: warn.skipped.entry" [05:44]
dmlloyd brilliant \o/ [05:44]
dmlloyd but it's not over yet [05:44]
dmlloyd so I decide maybe this is fixed in a newer version [05:45]
dmlloyd switch to 11, and run it again [05:45]
dmlloyd this time I get an error because one of the JARs is an MR JAR, and I have to specify the version I want [05:45]
dmlloyd now I can't specify anything earlier than 9 for some dumbass reason, but let's leave that aside [05:45]
dmlloyd so I add --multi-release 9 [05:46]
dmlloyd now it complains about another JAR [05:46]
dmlloyd here's the killer: you can't specify it for each JAR [05:46]
dmlloyd you can only specify it once on the command line for all [05:46]
dmlloyd but it ignores it for any JAR after the first one with a problem apparently! [05:46]
dmlloyd smash all [05:47]
lowryder [lowryder!] has joined ##java [05:48]
lowryder parted the channel: "WeeChat 2.1-dev" [05:48]
dmlloyd here we go [05:50]
dmlloyd "xxx.jar is not a multi release jar but --multi-release option is set" [05:51]
dmlloyd WHO THE HELL CARES [05:51]
dmlloyd some pedantic asshole apparently [05:51]
Jantz [Jantz!] has joined ##java [05:52]
ricky_clarkson [ricky_clarkson!~rjclarkso@unaffiliated/rickyclarkson/x-000000001] has joined ##java [05:53]
iam730 [iam730!~iam730@] has joined ##java [05:58]
Eksekk [Eksekk!Ex@gateway/shell/elitebnc/x-fvwyixrjwqpyhwtt] has joined ##java [05:59]
dmlloyd damn I thought I was clever by passing in -J-Djdk.util.jar.enableMultiRelease=false but apparently jdeps itself relies on things in MR JARs [06:07]
H-K [H-K!] has joined ##java [06:08]
Buliarous [Buliarous!~gypsydang@unaffiliated/buliarous] has joined ##java [06:10]
Hanii [Hanii!] has joined ##java [06:10]
iam730 [iam730!~iam730@] has joined ##java [06:19]
ExtraCrispy [ExtraCrispy!~ExtraCris@gateway/tor-sasl/extracrispy] has joined ##java [06:24]
wordsToLiveBy [wordsToLiveBy!~wordsToLi@unaffiliated/wordstoliveby] has joined ##java [06:35]
junktext [junktext!~junktext@fsf/member/junktext] has joined ##java [06:36]
junktext [junktext!~junktext@fsf/member/junktext] has joined ##java [06:42]
katiex7 [katiex7!] has joined ##java [06:49]
paddyez [paddyez!~paddyez@wikipedia/paddyez] has joined ##java [06:54]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [06:59]
Rockpile [Rockpile!~Rockpile@unaffiliated/rockpile] has joined ##java [07:01]
SpiceWork [SpiceWork!~DonSpice@unaffiliated/spiceman] has joined ##java [07:01]
SpiceWor1 [SpiceWor1!~DonSpice@unaffiliated/spiceman] has joined ##java [07:10]
Masterphi [Masterphi!~Masterphi@unaffiliated/masterphi] has joined ##java [07:16]
DLSteve [DLSteve!~DLSteve@] has joined ##java [07:16]
shicks2525 [shicks2525!] has joined ##java [07:20]
sb35 [sb35!] has joined ##java [07:24]
graphene [graphene!~graphene@] has joined ##java [07:25]
kicked graphene (Banned: please fix your connection. you're bouncing in and out.. this ban will expire after 30d) [07:25]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [07:29]
themsay [themsay!~themsay@] has joined ##java [07:32]
j3kyl_ [j3kyl_!~user@2804:7f3:8383:bbe1:962f:ba2e:fa3:f9c7] has joined ##java [07:42]
impy [impy!] has joined ##java [07:50]
impy hey, I recently upgraded to java11 from java8. And the following code Channels.newChannel(url.openConnection().getInputStream()).read(buffer); would fill up the entire ByteBuffer [07:52]
impy however, that doesn't seem to be the case anymore [07:52]
SJr The method signature of read seems to offer pretty weak guarantees: [07:54]
SJr I don't know much about that API, but I suspect that you might need to dig into it more, as it might have been an implementation detail that has changed. [07:54]
H-K [H-K!] has joined ##java [08:01]
pressure679 [pressure679!] has joined ##java [08:10]
impy SJr: thanks. I think I was also to quick on the conclusion that in java8 it would fill up the ByteBuffer. And my issue lies elsewhere [08:17]
mitch0 [mitch0!] has joined ##java [08:18]
thebope [thebope!~thebope@pdpc/supporter/student/thebope] has joined ##java [08:20]
iam730 [iam730!~iam730@] has joined ##java [08:23]
iam730 [iam730!~iam730@] has joined ##java [08:31]
keepLearning512 [keepLearning512!~keepLearn@] has joined ##java [08:42]
hapyt0wn [hapyt0wn!~jesse@2600:8804:1980:b0b0:c5b2:9086:43a9:58ca] has joined ##java [08:45]
chens [chens!~user@] has joined ##java [08:46]
hapyt0wn hey has anyone messed with ws-notification? [08:46]
Rockpile [Rockpile!~Rockpile@unaffiliated/rockpile] has joined ##java [08:46]
thebope [thebope!~thebope@pdpc/supporter/student/thebope] has joined ##java [08:57]
zeden [zeden!~user@unaffiliated/zeden] has joined ##java [09:07]
athidhep [athidhep!~sb35@unaffiliated/athidhep] has joined ##java [09:09]
mr_lou [mr_lou!] has joined ##java [09:10]
SpiceWork [SpiceWork!~DonSpice@unaffiliated/spiceman] has joined ##java [09:17]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [09:34]
Unicorn437 [Unicorn437!] has joined ##java [09:35]
Unicorn437 I'm attempting to create a generic class for SkipLists using a generic interface I've written, and am getting confusing errors: "public void put(K key, V value){" throw "'put( K, V' in 'SkipList' clashes with 'put(K,V' in 'OrderedDictionary'; both methods have the same erasure, yet neither overrides the other. [09:37]
Unicorn437 What does that mean? [09:37]
Unicorn437 (Sorry for not closing the " at the end [09:38]
Unicorn437 ) [09:38]
Nightwing52 [Nightwing52!] has joined ##java [09:38]
dj_pi [dj_pi!] has joined ##java [09:41]
warrshrike [warrshrike!18105181@gateway/web/freenode/ip.] has joined ##java [09:41]
warrshrike hey [09:42]
warrshrike Arraylist.subList gives a list, I want a sub Arraylist [09:42]
warrshrike what can be done? [09:42]
dreamreal warrshrike: why do you care what the type of the sublist is [09:42]
dreamreal Unicorn437: show the code, but I'm not looking at it tonight [09:43]
dreamreal if you want to show me tomorrow, I'll try to look at it, but not tonight, I'm about to go away from my desk [09:44]
ilikecrunch [ilikecrunch!~ilikecrun@] has joined ##java [09:44]
dreamreal okay, good night [09:44]
Unicorn437 I kinda need to solve this right now. For some reason this error came up when I changed it to K and V from Comparable and Object, K extending Comparable and V being a generic object [09:44]
dreamreal parted the channel: "WeeChat 2.2" [09:44]
Kundry_Wag [Kundry_Wag!~Kundry_Wa@] has joined ##java [09:48]
rruizt [rruizt!] has joined ##java [09:48]
warrshrike draget: the method down the line accepts an arraylist [09:52]
warrshrike dreamreal: [09:53]
t2mkn [t2mkn!~t2mkn@] has joined ##java [09:57]
erratic [erratic!] has joined ##java [09:58]
pressure679 [pressure679!] has joined ##java [09:59]
RedSoxFan07 [RedSoxFan07!~Thunderbi@] has joined ##java [10:00]
Jantz [Jantz!] has joined ##java [10:13]
tristianc [tristianc!] has joined ##java [10:15]
bugzy_on_busy [bugzy_on_busy!~Thunderbi@] has joined ##java [10:16]
realSnoo [realSnoo!~hythy@2601:500:8301:65af::35d7] has joined ##java [10:18]
realSnoo if i wrote a 2d platformer with javafx, can i still say i wrote it from scratch [10:18]
realSnoo since it's not in vanilla java [10:18]
mike802 are you using a graphics library in fx? [10:20]
j3kyl_ [j3kyl_!~user@2804:7f3:8383:bbe1:962f:ba2e:fa3:f9c7] has joined ##java [10:23]
upgrdman [upgrdman!~upgrdman@blender/artist/upgrdman] has joined ##java [10:24]
upgrdman parted the channel: [10:24]
realSnoo isn't javafx a graphics library [10:25]
realSnoo i used canvas [10:25]
mike802 i'd recommend ##law for a discussion of copyright law [10:27]
mike802 ip law, etc [10:27]
realSnoo ah im not worried about copyright law, just curious what counts as write from scratch [10:28]
mike802 you're worried about the size of the libraries you import? [10:29]
realSnoo no just want to be accurate in [10:29]
mike802 maybe if you focus on be thorough [10:30]
mike802 this is a "thorough" description of what i am accomplishing [10:30]
crackin [crackin!~crackin@] has joined ##java [10:31]
Nightwing52 [Nightwing52!] has joined ##java [10:31]
surial realSnoo: yes, you can say that. [10:32]
Jantz [Jantz!] has joined ##java [10:35]
waz [waz!~waz@pdpc/supporter/active/waz] has joined ##java [10:36]
sb35 [sb35!~sb35@] has joined ##java [10:40]
tassee [tassee!] has joined ##java [10:46]
srisri [srisri!~srisri@] has joined ##java [10:48]
computeiro [computeiro!~computeir@] has joined ##java [10:55]
Willis [Willis!Willis@] has joined ##java [10:55]
Nightwing52 [Nightwing52!] has joined ##java [10:57]
kgrimes2 [kgrimes2!] has joined ##java [10:58]
srisri [srisri!~srisri@] has joined ##java [11:01]
white_lilies [white_lilies!] has joined ##java [11:06]
__0x277F [__0x277F!] has joined ##java [11:07]
t2mkn [t2mkn!~t2mkn@] has joined ##java [11:12]
fortruce [fortruce!47693abd@gateway/web/freenode/ip.] has joined ##java [11:14]
fortruce If I want to finish waiting for a future even if I get an InterrruptedException, how would I do that? [11:15]
malen [malen!~malen@unaffiliated/malen] has joined ##java [11:16]
kgrimes2 [kgrimes2!] has joined ##java [11:16]
dmlloyd some futures have an awaitUninterruptibly() method [11:17]
dmlloyd but if it doesn't, the idiom is generally: boolean intr=false; for (;;) try { future.await(); break; } catch (InterruptedException e) { intr=true; } finally { if (intr) Thread.currentThread().interrupt(); } [11:18]
fortruce oh cool, didn't think about just wrapping it in a loop, thanks [11:18]
dmlloyd just make sure you restore interrupt status on your way out [11:19]
fortruce what if I was already requested to be interrupted before I start, should I set intr = Thread.getCurrent().isInterrupted()? [11:21]
surial fortruce: if the interrupt flag is up, calling await will instantly trigger an INterruptedException. [11:23]
surial Therefore; no, don't do that. No need. [11:23]
fortruce oh okay, thanks [11:24]
surial every thread has an interrupt flag. There are 2 ways to clear it: [A] call Thread.interrupted(). This returns the value of the flag and clears it. [B] call any method which handles interrupts. They almost always handle it by clearing the flag and throwing InterruptedException. Such methods will immediately do so if the flag is up. [11:24]
surial fortruce: generally if you want to 'uninterruptibly' await, that's.. fucked up. [11:25]
surial fortruce: the interrupt system is there specifically to tell threads to get a move on. These are only invoked by code. [11:25]
surial This isn't like 'oh the user pressed CTRL+C but lets wait'. That's not what interruptedexceptions are about. [11:25]
surial some code explicitly want: YO! Thread! End! [11:25]
surial so, writing code to ignore this request is a bit dubious; you're ignoring your own code. [11:26]
surial CTRL+C will just kill your thread dead, even if you have this uninterrupted thing going on. [11:27]
fortruce yea, this isn't a production use case, it's a script embedded in a game and I want to ensure my api calls to update my db at the end are finished (or time out at least) [11:27]
surial if there's stuff that needs doing upon CTRL+C/kill, use Runtime.addShutdownHook, but mostly: Don't rely on this. People trip over power cables. It happens. Write your software to work well even if you hard crash. [11:27]
surial example, for DB shit: Use transactions. voila. problem solved. [11:27]
surial it just woudln't do for your game to cease to run unless you hard-reset the entire DB and with it all saves and such whenever the game/computer hardcrashes at an unfortunate point in time. [11:28]
surial At any rate, trying to do things 'unintrruptibly' here is going to do jack fuck. [11:28]
fortruce it's a single atomic write already, so a transaction won't make a difference, I just want to ensure it actually goes through -- though maybe it will anyway considering at that point the request is already in flight [11:28]
surial What you are looking for is addShutdownHook. That DOES do something (but I argue that what it does, is misguided). [11:29]
metrixx [metrixx!~metrixx@unaffiliated/metrixx] has joined ##java [11:29]
surial As I said, only one thing causes InterruptedExceptions: Some code that specifically calls someThread.interrupt(). That's it. That is the only way. [11:29]
surial gotta run. Good luck! [11:29]
fortruce My code is running as a script inside of a script runner, so the script runner is asking me to stop, but I want to fire off a database write onStop and ensure it completes. I don't really care that it wants me to stop right away. [11:31]
fortruce thanks for the explanations though [11:31]
forgottenone [forgottenone!~forgotten@] has joined ##java [11:33]
Jantz [Jantz!~IceChat9@2407:7000:8d04:100:f5eb:2eab:b104:f542] has joined ##java [11:38]
Smarticles101 [Smarticles101!Smarticles@gateway/shell/firrre/x-fmbxydapsorpbtpq] has joined ##java [11:40]
Jantz [Jantz!] has joined ##java [11:50]
crackin [crackin!~crackin@] has joined ##java [11:50]
white_lilies [white_lilies!] has joined ##java [11:53]
SJr fortruce the thread interruption process is happening because the person who owns your thread is asking you to stop nicely. A shutdown hook is basically a different thread that will run to completion before being shutdown, so it has basically the same guarantees as what you are doing. [11:55]
deavmi [deavmi!~deavmi@] has joined ##java [11:55]
SJr well not person, but whatever framework owns the thread you are submitting to. [11:55]
ArcherL [ArcherL!~ArcherL@unaffiliated/archerl] has joined ##java [11:57]