Fixed some issues

This commit is contained in:
Christian Basler 2017-01-27 23:25:49 +01:00
parent 4fff06e345
commit cd50e9440c
2 changed files with 4 additions and 2 deletions

View File

@ -63,6 +63,8 @@ public class MPFloat implements MPType<Double> {
out.write(0xCB);
out.write(ByteBuffer.allocate(8).putDouble(value).array());
break;
default:
throw new IllegalArgumentException("Unknown precision: " + precision);
}
}

View File

@ -43,6 +43,8 @@ public class MPString implements MPType<String>, CharSequence {
private static Charset encoding = Charset.forName("UTF-8");
private final String value;
/**
* Use this method if for some messed up reason you really need to use something else than UTF-8.
* Ask yourself: why should I? Is this really necessary?
@ -55,8 +57,6 @@ public class MPString implements MPType<String>, CharSequence {
MPString.encoding = encoding;
}
private final String value;
public MPString(String value) {
this.value = value;
}