Ich habe einen Socketserver der eine dynamische Klasse entgegen nehmen sollen, wirft aber einen Error, wie fixe ich das?
Java:
@SuppressWarnings("unchecked")
Request<ProductA> req=(Request<ProductA>) in.readObject();
bye=req.isShutdown();
price=calc.newPrice(req.getPrice(), req.getType());
System.out.println("ProductA response!");
out.writeObject("Your ProductA "+req.getName()+" final price is "+price+".");
out.flush();