Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35737
| From | j4n bur53 <janburse@fastmail.fm> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Warning, bad Java |
| Date | 2016-10-07 22:37 +0200 |
| Organization | albasani.net |
| Message-ID | <nt912m$s1e$1@news.albasani.net> (permalink) |
| References | <988350a8-29b9-4340-81ca-cf5082dc05c7@googlegroups.com> |
Worst of all, the whole JNLP bloat doesn't seem
to offer many ways the break a deadlock.
For example through decompiling I find:
package com.sun.deploy.util;
public class SyncAccess {
[...]
private void acquireLock(int var1, int var2) {
Object var3 = this.syncObj;
synchronized(this.syncObj) {
while((this.lockedOP & var1) != 0) {
try {
this.syncObj.wait();
} catch (InterruptedException var6) {
;
}
}
this.lockedOP |= var2;
}
}
[...]
}
So basically an InterruptedException will just
be swallowed by the above code.
Making it impossible to write some supervisor that
gracefully stops a hanging code.
P.S.: The package com.sun.corba.se.impl.orbutil.concurrent;
looks slightly better, but I don't know why they need a
notify after a catch, we find throughout the following idiom:
try {
[...]
} catch (InterruptedException ex) {
notify();
throw ex;
}
I don't think the notify() is needed, since there is no
state change.
If the notify() is not needed the whole try/catch is not
needed, and they could just add the exception to the
method signature.
Eric Douglas schrieb:
> The JDK download page has 2 versions available, 101 and 102.
> Apparently there's a bug in 102 that's not in 101, and the bug report says it's been fixed but the fix is in the next release which is not yet available.
> The download page doesn't say which version to download, just that 102 has "some new features" which are not in 101, so I tried the 102 and it's been hanging.
>
> https://bugs.openjdk.java.net/browse/JDK-8161700
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Warning, bad Java Eric Douglas <e.d.programmer@gmail.com> - 2016-10-07 08:32 -0700
Re: Warning, bad Java j4n bur53 <janburse@fastmail.fm> - 2016-10-07 22:37 +0200
Re: Warning, bad Java j4n bur53 <janburse@fastmail.fm> - 2016-10-07 22:59 +0200
Re: Warning, bad Java Silvio <silvio@internet.com> - 2016-10-08 12:00 +0200
Re: Warning, bad Java Arne Vajhøj <arne@vajhoej.dk> - 2016-10-08 09:54 -0400
Re: Warning, bad Java Eric Douglas <e.d.programmer@gmail.com> - 2016-10-10 05:07 -0700
Re: Warning, bad Java Arne Vajhøj <arne@vajhoej.dk> - 2016-10-10 09:17 -0400
csiph-web