提交 b60f73ea 编写于 作者: L lancea

7132879: address Findbugs issue in WebRowSetXmlWriter

Reviewed-by: forax
上级 517f1c9b
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -48,7 +48,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable {
* for this field is set with the <code>java.io.Writer</code> object given
* as the second argument to the <code>writeXML</code> method.
*/
private java.io.Writer writer;
private transient java.io.Writer writer;
/**
* The <code>java.util.Stack</code> object that this <code>WebRowSetXmlWriter</code>
......@@ -205,16 +205,11 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable {
//Changed to beginSection and endSection for maps for proper indentation
beginSection("map");
java.util.Map<?,?> typeMap = caller.getTypeMap();
if (typeMap != null) {
Iterator<?> i = typeMap.keySet().iterator();
Class<?> c;
String type;
while (i.hasNext()) {
type = (String)i.next();
c = (Class)typeMap.get(type);
propString("type", type);
propString("class", c.getName());
Map<String, Class<?>> typeMap = caller.getTypeMap();
if(typeMap != null) {
for(Map.Entry<String, Class<?>> mm : typeMap.entrySet()) {
propString("type", mm.getKey());
propString("class", mm.getValue().getName());
}
}
endSection("map");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册