--- a/jdk/src/share/classes/sun/java2d/pipe/RenderingEngine.java Mon Jul 18 18:21:31 2011 +0400
+++ b/jdk/src/share/classes/sun/java2d/pipe/RenderingEngine.java Wed Jul 27 22:42:19 2011 -0700
@@ -127,12 +127,8 @@
try {
Class cls = Class.forName(ductusREClass);
return cls.newInstance();
- } catch (ClassNotFoundException x) {
+ } catch (ReflectiveOperationException ignored) {
// not found
- } catch (IllegalAccessException x) {
- // should not reach here
- } catch (InstantiationException x) {
- // should not reach here
}
}
--- a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Mon Jul 18 18:21:31 2011 +0400
+++ b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Wed Jul 27 22:42:19 2011 -0700
@@ -30,6 +30,8 @@
extern "C" {
#endif
+#include <stddef.h>
+
#include "java_awt_AlphaComposite.h"
#include "SurfaceData.h"
@@ -484,7 +486,9 @@
#define ArraySize(A) (sizeof(A) / sizeof(A[0]))
#define PtrAddBytes(p, b) ((void *) (((intptr_t) (p)) + (b)))
-#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, (y)*(yinc) + (x)*(xinc))
+#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, \
+ ((ptrdiff_t)(y))*(yinc) + \
+ ((ptrdiff_t)(x))*(xinc))
/*
* The function to call with an array of NativePrimitive structures
--- a/jdk/src/solaris/classes/sun/font/FontConfigManager.java Mon Jul 18 18:21:31 2011 +0400
+++ b/jdk/src/solaris/classes/sun/font/FontConfigManager.java Wed Jul 27 22:42:19 2011 -0700
@@ -347,6 +347,11 @@
name = name.toLowerCase();
initFontConfigFonts(false);
+ if (fontConfigFonts == null) {
+ // This avoids an immediate NPE if fontconfig look up failed
+ // but doesn't guarantee this is a recoverable situation.
+ return null;
+ }
FcCompFont fcInfo = null;
for (int i=0; i<fontConfigFonts.length; i++) {