Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix couple of issues that FindBugs brings up.

Still serialization and inefficient new Integer() callse
  • Loading branch information...
commit 053e5ed1fd85bf84d7dc4d43bb243b9eb8660b8c 1 parent 515630d
@rolfl rolfl authored
View
10 core/src/java/org/jdom2/adapters/AbstractDOMAdapter.java
@@ -54,6 +54,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
package org.jdom2.adapters;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.jdom2.DocType;
@@ -130,8 +131,13 @@ protected void setInternalSubset(DocumentType dt, String s) {
Method setInternalSubset = dtclass.getMethod(
"setInternalSubset", String.class);
setInternalSubset.invoke(dt, s);
- }
- catch (Exception e) {
+ } catch (InvocationTargetException e) {
+ // ignore
+ } catch (IllegalAccessException e) {
+ // ignore
+ } catch (SecurityException e) {
+ // ignore
+ } catch (NoSuchMethodException e) {
// ignore
}
}
View
2  core/src/java/org/jdom2/output/Format.java
@@ -430,7 +430,7 @@ public Format clone() {
* to query the JDK 1.4 CharsetEncoder class for unknown charsets.
* If JDK 1.4 isn't around, default to no special encoding.
*/
- class DefaultEscapeStrategy implements EscapeStrategy {
+ private final static class DefaultEscapeStrategy implements EscapeStrategy {
private final int bits;
private final CharsetEncoder encoder;
Please sign in to comment.
Something went wrong with that request. Please try again.