Skip to content

Commit

Permalink
Small bug fixed in the parsing of the hex mask/value when reading thi…
Browse files Browse the repository at this point in the history
…s value from the preferences.
  • Loading branch information
jawi committed Oct 25, 2011
1 parent a099f84 commit 257471e
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,15 @@ private static GridBagConstraints createConstraints( final int x, final int y, f
*/
private static String maskToHexString( final String aMask )
{
final int value = ( int )Long.parseLong( aMask, 2 );
return Integer.toHexString( Integer.reverse( value ) );
try
{
final int value = ( int )Long.parseLong( aMask, 2 );
return Integer.toHexString( Integer.reverse( value ) );
}
catch ( NumberFormatException exception )
{
return "";
}
}

/**
Expand Down

0 comments on commit 257471e

Please sign in to comment.