Permalink
Browse files

Merge pull request #1 from v17al/master

Few quick changes
  • Loading branch information...
2 parents c443324 + e7a98fb commit 648e1965a7018c1b38cab7b3270cf51e6aaf407d @genodeftest genodeftest committed Jun 13, 2012
@@ -124,7 +124,7 @@ public Socket createSocket(final String host, final int port, final InetAddress
*/
@Override
public boolean equals(Object obj) {
- return ((obj != null) && obj.getClass().equals(EasySSLProtocolSocketFactory.class));
+ return ((obj != null) && obj.getClass().equals(this.getClass()));
}
/*
@@ -1374,7 +1374,7 @@ String toString(int indentFactor, int indent) throws JSONException {
* @throws JSONException If the value is or contains an invalid number.
*/
public static String valueToString(Object value) throws JSONException {
- if (value == null || value.equals(null)) {
+ if (value == null) {
return "null"; //$NON-NLS-1$
}
if (value instanceof JSONString) {
@@ -801,7 +801,8 @@ private int getWorkspaceFormatVersion() {
try {
reader = new BufferedReader(new FileReader(getOldDBFormatFile()));
String text = reader.readLine();
- DBHelper.writeToFile(formatFile, text);
+ if (text != null)
+ DBHelper.writeToFile(formatFile, text);
formatFileExists = true;
} catch (IOException e) {
throw new PersistenceException(e);
@@ -112,7 +112,7 @@
fgEntityTable.put(entityName[i], new Character(entityVal[i]));
/* Special-case nbsp to a simple space instead of 0xa0 */
- fgEntityTable.put("nbsp", new Character(' ')); //$NON-NLS-1$
+ fgEntityTable.put("nbsp", Character.valueOf(' ')); //$NON-NLS-1$
}
/**

0 comments on commit 648e196

Please sign in to comment.