Changed all NullPointerException in ShaderSource to IllegalArgumentException
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10063 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
ec95e50f85
commit
17b53db1aa
@ -101,7 +101,7 @@ public final class Shader extends NativeObject {
|
|||||||
super(ShaderSource.class);
|
super(ShaderSource.class);
|
||||||
this.sourceType = type;
|
this.sourceType = type;
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
throw new NullPointerException("The shader type must be specified");
|
throw new IllegalArgumentException("The shader type must be specified");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ public final class Shader extends NativeObject {
|
|||||||
|
|
||||||
public void setLanguage(String language) {
|
public void setLanguage(String language) {
|
||||||
if (language == null) {
|
if (language == null) {
|
||||||
throw new NullPointerException("Shader language cannot be null");
|
throw new IllegalArgumentException("Shader language cannot be null");
|
||||||
}
|
}
|
||||||
this.language = language;
|
this.language = language;
|
||||||
setUpdateNeeded();
|
setUpdateNeeded();
|
||||||
@ -141,7 +141,7 @@ public final class Shader extends NativeObject {
|
|||||||
|
|
||||||
public void setSource(String source){
|
public void setSource(String source){
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
throw new NullPointerException("Shader source cannot be null");
|
throw new IllegalArgumentException("Shader source cannot be null");
|
||||||
}
|
}
|
||||||
this.source = source;
|
this.source = source;
|
||||||
setUpdateNeeded();
|
setUpdateNeeded();
|
||||||
@ -149,7 +149,7 @@ public final class Shader extends NativeObject {
|
|||||||
|
|
||||||
public void setDefines(String defines){
|
public void setDefines(String defines){
|
||||||
if (defines == null) {
|
if (defines == null) {
|
||||||
throw new NullPointerException("Shader defines cannot be null");
|
throw new IllegalArgumentException("Shader defines cannot be null");
|
||||||
}
|
}
|
||||||
this.defines = defines;
|
this.defines = defines;
|
||||||
setUpdateNeeded();
|
setUpdateNeeded();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user