diff options
author | Jiri Vanek <[email protected]> | 2013-12-13 10:47:07 +0100 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-12-13 10:47:07 +0100 |
commit | 25f307d98cb0ba4698318c6a1a4e738ee81f6e55 (patch) | |
tree | e869f4d7ea537ba2d4508f71edbafdccecd0f375 /netx/net/sourceforge/jnlp/splashscreen | |
parent | 6256aac59275df0edd0feb4950272aa33573be9f (diff) |
itw itself warning cleanup: fixed rawtypes and unchecks, added braces and Override
After this clean up only "internal proprietary API and may be removed in a future release" warnings remain fro make check. Please keep itw in this way :)
remaining issues:
icedtea-web/netx/net/sourceforge/jnlp/cache/ResourceTracker.java:357: warning: [deprecation] toURL() in File has been deprecated
icedtea-web/netx/net/sourceforge/jnlp/cache/CacheUtil.java:128: warning: [deprecation] toURL() in File has been deprecated
icedtea-web/netx/net/sourceforge/jnlp/runtime/Boot.java:261: warning: [deprecation] toURL() in File has been deprecated
There have been a lot of work around cach x file x url escaping, and as main difference between file.tourl and file.touri.tourl is escapin, I rather left it.
icedtea-web/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:804: warning: [deprecation] Ref in sun.misc has been deprecated
icedtea-web/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:121: warning: [deprecation] Ref in sun.misc has been deprecated
What can be done?
icedtea-web/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java:205: warning: [fallthrough] possible fall-through into case
icedtea-web/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java:211: warning: [fallthrough] possible fall-through into case
This have to be fixed
Diffstat (limited to 'netx/net/sourceforge/jnlp/splashscreen')
3 files changed, 11 insertions, 13 deletions
diff --git a/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java index a9e38a2..fb55dc4 100644 --- a/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java +++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java @@ -46,7 +46,6 @@ import net.sourceforge.jnlp.splashscreen.parts.BasicComponentErrorSplashScreen; public final class DefaultErrorSplashScreen2012 extends BasicComponentErrorSplashScreen { - private final DefaultErrorSplashScreen2012 self; private final ErrorPainter painter; private final DefaultSplashScreens2012Commons commons; @@ -55,22 +54,21 @@ public final class DefaultErrorSplashScreen2012 extends BasicComponentErrorSplas //setSplashHeight(height); //setSplashWidth(width); //to have this in inner classes - self = this; setLoadingException(ex); setSplashReason(splashReason); - painter = new ErrorPainter(self, true); + painter = new ErrorPainter(this, true); addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - if (((ErrorPainter) painter).getErrorCorner() != null - && e.getX() > ((ErrorPainter) painter).getErrorCorner().x - && e.getY() > ((ErrorPainter) painter).getErrorCorner().y) { + if ((painter).getErrorCorner() != null + && e.getX() > (painter).getErrorCorner().x + && e.getY() > (painter).getErrorCorner().y) { raiseExceptionDialog(); } } }); - commons = new DefaultSplashScreens2012Commons(painter, self); + commons = new DefaultSplashScreens2012Commons(painter, this); } @Override diff --git a/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java index 43bda84..8fe3516 100644 --- a/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java +++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java @@ -115,7 +115,7 @@ public class NatCubic extends ControlCurve { Cubic[] Y = calcNaturalCubic(pts.npoints - 1, pts.ypoints); /* very crude technique - just break each segment up into steps lines */ Polygon p = new Polygon(); - p.addPoint((int) Math.round(X[0].eval(0)), (int) Math.round(Y[0].eval(0))); + p.addPoint(Math.round(X[0].eval(0)), Math.round(Y[0].eval(0))); for (int i = 0; i < X.length; i++) { for (int j = 1; j <= STEPS; j++) { float u = j / (float) STEPS; diff --git a/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java index 0f18fe9..c5c165e 100644 --- a/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java +++ b/netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java @@ -153,24 +153,24 @@ public class SplinesDefs { return polygonizeControlPoints(mainLeafArray, scalex, scaley); } - static Polygon polygonizeControlPoints(Point[] pp, Double scalex, double scaley) { + static Polygon polygonizeControlPoints(Point[] pp, double scalex, double scaley) { Polygon r = new Polygon(); for (int i = 0; i < pp.length; i++) { Point p = pp[i]; - r.addPoint((int) ((double) p.x * (double) scalex), (int) ((double) p.y * (double) scaley)); + r.addPoint( (int) ((double) p.x * scalex), (int) ((double) p.y * scaley)); } return r; } - public static Polygon getSecondLeaf(Double scalex, double scaley) { + public static Polygon getSecondLeaf(double scalex, double scaley) { return polygonizeControlPoints(smallLeafArray, scalex, scaley); } - public static Polygon getSecondLeafStalk(Double scalex, double scaley) { + public static Polygon getSecondLeafStalk(double scalex, double scaley) { return polygonizeControlPoints(smallLeafStalkArray, scalex, scaley); } - public static Polygon getMainLeafStalk(Double scalex, double scaley) { + public static Polygon getMainLeafStalk(double scalex, double scaley) { return polygonizeControlPoints(mainLeafStalkArray, scalex, scaley); } |