Closed pitschr closed 5 years ago
Can you supply a quickstart project (GitHub or zip) that replicates/reproduces the problem?
More details (Java version, Pippo version, ...) help me find the problem faster.
Hi Decebals.
Sure. My details: Java 11.0.2, Pippo 1.12.0.
I now committed my project to GitHub and can confirm that the warning is raised in Travis as well (line 530): https://travis-ci.org/pitschr/knx-link/builds/522303944
The implementation (line 70): https://github.com/pitschr/knx-link/blob/master/src/main/java/li/pitschmann/knx/daemon/HttpDaemonApplication.java
Let me know if you need more details.
KR, Christoph
The fast fix is to add SuppressWarnings
annotation like
public class HttpDaemonApplication extends ControllerApplication {
@SuppressWarnings("unchecked")
protected void onInit() {
// your business
}
}
Yes, this is the way I have to go, I suppose. I just was wondering that it is per design. But, thank you for your clarification. KR, Christoph
p.s. pippo is a great project! well done!
Closed this thread as it is not critical and when resolving that in second version it would be great!
Hello.
Today I implemented the first pippo web service and everything are fine. However, I just noticed a warning message in IntelliJ:
Warning:(71, 23) java: unchecked generic array creation for varargs parameter of type java.lang.Class<? extends ro.pippo.controller.Controller>[]
My code is more&less same as suggested in official documentation:
addControllers(HttpDaemonController.class);
(my created controller just extends the
ro.pippo.controller.Controller
, nothing special)Sure, it is only a warning and we can ignore it, but do you see an opportunity to get rid off it? If you need more details, I'm happy to provide it.
KR, Christoph