kirillrakhman
12/22/2016, 2:35 PMclass Producer implements Runnable {
private final BlockingQueue queue;
Producer(BlockingQueue q) { queue = q; }
public void run() {
try {
while (true) { queue.put(produce()); }
} catch (InterruptedException ex) { ... handle ...}
}
Object produce() { ... }
}
- no public
on the class
- constructor body in the same line as signature
- single line while
- single line catch
- missing @Overrides