From 61d365bd7c352262bff711b3954731e7928c203f Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sun, 27 Feb 2011 02:07:37 +0100 Subject: code review using findbugs keyset iterations, typos, @Override, synchronization, varargs --- src/com/jogamp/opencl/CLProgramBuilder.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/com/jogamp/opencl/CLProgramBuilder.java') diff --git a/src/com/jogamp/opencl/CLProgramBuilder.java b/src/com/jogamp/opencl/CLProgramBuilder.java index 00d4dab9..ece9ba36 100644 --- a/src/com/jogamp/opencl/CLProgramBuilder.java +++ b/src/com/jogamp/opencl/CLProgramBuilder.java @@ -55,7 +55,7 @@ import java.util.Set; * @see #loadConfiguration(java.io.ObjectInputStream, com.jogamp.opencl.CLContext) * @author Michael Bien */ -public final class CLProgramBuilder implements CLProgramConfiguration, Serializable { +public final class CLProgramBuilder implements CLProgramConfiguration, Serializable, Cloneable { static final long serialVersionUID = 42; @@ -185,8 +185,10 @@ public final class CLProgramBuilder implements CLProgramConfiguration, Serializa @Override public CLProgramBuilder withDefines(Map defines) { - for (String name : defines.keySet()) { - defineSet.add(CLProgram.define(name, defines.get(name))); + for (Map.Entry define : defines.entrySet()) { + String name = define.getKey(); + Object value = define.getValue(); + defineSet.add(CLProgram.define(name, value)); } return this; } @@ -319,10 +321,12 @@ public final class CLProgramBuilder implements CLProgramConfiguration, Serializa return builder; } + @Override public CLProgram getProgram() { return program; } + @Override public CLProgramBuilder setProgram(CLProgram program) { this.program = program; return this; -- cgit v1.2.3