Fixing potential NullPointerException
Dieser Commit ist enthalten in:
Ursprung
ea1bee9474
Commit
0c236bfabe
@ -35,8 +35,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>steamwar</groupId>
|
<groupId>steamwar</groupId>
|
||||||
<artifactId>FAWE</artifactId>
|
<artifactId>WorldEdit</artifactId>
|
||||||
<version>1.14</version>
|
<version>1.15</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.sql.Blob;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
@ -158,7 +159,10 @@ public class Schematic {
|
|||||||
ResultSet rs = SQL.select("SELECT SchemData FROM Schematic WHERE SchemID = " + schemID);
|
ResultSet rs = SQL.select("SELECT SchemData FROM Schematic WHERE SchemID = " + schemID);
|
||||||
try {
|
try {
|
||||||
rs.next();
|
rs.next();
|
||||||
InputStream is = rs.getBlob("SchemData").getBinaryStream();
|
Blob schemData = rs.getBlob("SchemData");
|
||||||
|
if(schemData == null)
|
||||||
|
throw new IOException("SchemData is null");
|
||||||
|
InputStream is = schemData.getBinaryStream();
|
||||||
switch(Core.getVersion()){
|
switch(Core.getVersion()){
|
||||||
case 8:
|
case 8:
|
||||||
return Schematic_8.getClipboard(is);
|
return Schematic_8.getClipboard(is);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren