Warum geht das mit dem offer nicht? Bekomme eine NullPointerException.
Java:
public class QueueTest {
public static BlockingQueue<Fall> queue;
/**
* @param args
*/
public static void main(String[] args) {
Fall f = new Fall();
try {
f.setSpecialURL(new SpecialURL(new URL("http://www.einewebseite.de/bla/"),0));
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(f.getSpecialURL(());
boolean bool = queue.offer(f); //HIER: NullPointerException
System.out.println(bool);
}
}