Close #859 - more favicon validation
This commit is contained in:
parent
5adc0000d8
commit
ddab9a84c4
@ -68,6 +68,8 @@ public class Configuration implements ProxyConfig
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
BufferedImage image = ImageIO.read( fav );
|
BufferedImage image = ImageIO.read( fav );
|
||||||
|
if ( image != null )
|
||||||
|
{
|
||||||
if ( image.getHeight() == 64 && image.getWidth() == 64 )
|
if ( image.getHeight() == 64 && image.getWidth() == 64 )
|
||||||
{
|
{
|
||||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||||
@ -82,6 +84,10 @@ public class Configuration implements ProxyConfig
|
|||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Server icon must be exactly 64x64 pixels" );
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Server icon must be exactly 64x64 pixels" );
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Could not load server icon for unknown reason. Please double check its format." );
|
||||||
|
}
|
||||||
} catch ( IOException ex )
|
} catch ( IOException ex )
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Could not load server icon", ex );
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Could not load server icon", ex );
|
||||||
|
Loading…
Reference in New Issue
Block a user