package org.usfirst.frc330.wpilibj;

import edu.wpi.first.wpilibj.DoubleSolenoid;

public class BBDoubleSolenoid extends DoubleSolenoid {
	DoubleSolenoid.Value value;
	public BBDoubleSolenoid(int moduleNumber, int forwardChannel,
			int reverseChannel) {
		super(moduleNumber, forwardChannel, reverseChannel);
		value = get();
	}

	public BBDoubleSolenoid(int forwardChannel, int reverseChannel) {
		super(forwardChannel, reverseChannel);
		value = get();
	}

	@Override
	public void set(Value value) {
		this.value = value;
		super.set(value);
	}

	@Override
	public Value get() {
		return value;
	}
	
	public int getInt() {
		return value.ordinal();
	}

}

@@ -615,24 +615,33 @@
  getInt() %7B%0A
+%09%09try %7B%0A%09
 %09%09return val
@@ -653,15 +653,72 @@
 dinal();
+ %0A%09%09%7D catch (NullPointerException ex) %7B%0A%09%09%09return -1;%0A%09%09%7D
 %0A%09%7D%0A%0A%7D%0A

Fix NPE