remove a handful of warnings

This commit is contained in:
Ben Fry
2014-02-06 23:31:58 -05:00
parent 9803d7958a
commit 434d8138cc
5 changed files with 21 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
@@ -47,6 +48,7 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
@@ -67,6 +69,7 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
@@ -75,7 +78,7 @@ org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
@@ -90,6 +93,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.6

View File

@@ -2364,7 +2364,7 @@ public class PGraphicsJava2D extends PGraphics {
if (primarySurface) {
// 'offscreen' will probably be removed in the next release
if (useOffscreen) {
raster = ((BufferedImage) offscreen).getRaster();
raster = offscreen.getRaster();
} else if (image instanceof VolatileImage) {
// when possible, we'll try VolatileImage
raster = ((VolatileImage) image).getSnapshot().getRaster();

View File

@@ -1644,10 +1644,10 @@ public class JSONObject {
return value.toString();
}
if (value instanceof Map) {
return new JSONObject((Map)value).toString();
return new JSONObject(value).toString();
}
if (value instanceof Collection) {
return new JSONArray((Collection)value).toString();
return new JSONArray(value).toString();
}
if (value.getClass().isArray()) {
return new JSONArray(value).toString();
@@ -1683,13 +1683,13 @@ public class JSONObject {
}
if (object instanceof Collection) {
return new JSONArray((Collection)object);
return new JSONArray(object);
}
if (object.getClass().isArray()) {
return new JSONArray(object);
}
if (object instanceof Map) {
return new JSONObject((Map)object);
return new JSONObject(object);
}
Package objectPackage = object.getClass().getPackage();
String objectPackageName = objectPackage != null
@@ -1732,9 +1732,9 @@ public class JSONObject {
} else if (value instanceof JSONArray) {
((JSONArray) value).write(writer, indentFactor, indent);
} else if (value instanceof Map) {
new JSONObject((Map) value).write(writer, indentFactor, indent);
new JSONObject(value).write(writer, indentFactor, indent);
} else if (value instanceof Collection) {
new JSONArray((Collection) value).write(writer, indentFactor,
new JSONArray(value).write(writer, indentFactor,
indent);
} else if (value.getClass().isArray()) {
new JSONArray(value).write(writer, indentFactor, indent);

View File

@@ -961,7 +961,7 @@ public class PJOGL extends PGL {
InputEvent.ALT_MASK);
char keyChar;
if ((int)nativeEvent.getKeyChar() == 0) {
if (nativeEvent.getKeyChar() == 0) {
keyChar = PConstants.CODED;
} else {
keyChar = nativeEvent.getKeyChar();

View File

@@ -6,12 +6,20 @@ X text looks lousy compared to the Apple JVM
X mess with rendering hints? (notes in PGraphicsJava2D)
X improvements made, but still not amazing.. just at level of Windows/Linux
_ default font fixes
_ https://github.com/processing/processing/issues/2331
_ https://github.com/processing/processing/pull/2338
fixed in 2.1
X draw() called again before finishing on OS X (retina issue)
X https://github.com/processing/processing/issues/1709
X get() not always setting alpha channel when used with point()
X https://github.com/processing/processing/issues/1756
A depth buffer shouldn't be cleared when depth mask is disabled
A https://github.com/processing/processing/issues/2296
A set pixels transparent by default in P2D/P3D
A https://github.com/processing/processing/issues/2207
_ saveFrame() with retina render is making black images
_ add print() method to other data types (not just IntList)