diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2006-12-27 15:39:00 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2006-12-27 15:39:00 +0000 |
commit | 5ff3305b7d503af0196bc74bcce4c4c4dd3ef604 (patch) | |
tree | 6641a1bb52d560c3fffa6e5e285266d9b9865f20 /src/com/itmill | |
parent | eafa4107a20af969b708ce340521324a6a85b73f (diff) | |
download | vaadin-framework-5ff3305b7d503af0196bc74bcce4c4c4dd3ef604.tar.gz vaadin-framework-5ff3305b7d503af0196bc74bcce4c4c4dd3ef604.zip |
Fixed a lot of warns about unused code
svn changeset:166/svn branch:toolkit
Diffstat (limited to 'src/com/itmill')
7 files changed, 10 insertions, 47 deletions
diff --git a/src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java b/src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java index d54a824e80..4b21f699be 100644 --- a/src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java +++ b/src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java @@ -69,12 +69,8 @@ import com.itmill.toolkit.ui.Window; public class AjaxApplicationManager implements Paintable.RepaintRequestListener, Application.WindowAttachListener, Application.WindowDetachListener { - private static String GET_PARAM_VARIABLE_CHANGES = "changeVariables"; - private static String GET_PARAM_REPAINT_ALL = "repaintAll"; - private static String GET_PARAM_UI_CHANGES_FORMAT = "format"; - private static int DEFAULT_BUFFER_SIZE = 32 * 1024; private static int MAX_BUFFER_SIZE = 64 * 1024; diff --git a/src/com/itmill/toolkit/terminal/web/AjaxPaintTarget.java b/src/com/itmill/toolkit/terminal/web/AjaxPaintTarget.java index 5d5598bb40..62183609bf 100644 --- a/src/com/itmill/toolkit/terminal/web/AjaxPaintTarget.java +++ b/src/com/itmill/toolkit/terminal/web/AjaxPaintTarget.java @@ -59,19 +59,12 @@ public class AjaxPaintTarget implements PaintTarget { /* Document type declarations */ private final static String UIDL_XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; - private final static String UIDL_DOCTYPE_DECL = "<!DOCTYPE uidl PUBLIC \"-//MILLSTONE//DTD UIDL//EN\" \"http://millstone.org/xml/3.0/UIDL.dtd\">"; - - /* commonly used tags and argument names */ - private final static String UIDL_TAG_VARIABLE = "var"; - private final static String UIDL_ARG_NAME = "name"; private final static String UIDL_ARG_VALUE = "value"; private final static String UIDL_ARG_ID = "id"; - private final static String UIDL_ARG_TYPE = "type"; - private Stack mOpenTags; private boolean mTagArgumentListOpen; @@ -82,11 +75,7 @@ public class AjaxPaintTarget implements PaintTarget { private boolean closed = false; - private OutputStream output; - private AjaxApplicationManager manager; - - private String paintableId; private boolean trackPaints = false; @@ -108,9 +97,6 @@ public class AjaxPaintTarget implements PaintTarget { // Set the variable map this.variableMap = variableMap; - // Set the output stream - this.output = output; - // Set the target for UIDL writing try { this.uidlBuffer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(output,"UTF-8"))); diff --git a/src/com/itmill/toolkit/terminal/web/JarThemeSource.java b/src/com/itmill/toolkit/terminal/web/JarThemeSource.java index 05b47f077b..4db464f3f1 100644 --- a/src/com/itmill/toolkit/terminal/web/JarThemeSource.java +++ b/src/com/itmill/toolkit/terminal/web/JarThemeSource.java @@ -299,7 +299,7 @@ public class JarThemeSource implements ThemeSource { public void put(Object key, Object value) { data.put( key, - new SoftReference(new CacheItem(value, key.toString()))); + new SoftReference(new CacheItem(value))); } public Object get(Object key) { @@ -322,10 +322,8 @@ public class JarThemeSource implements ThemeSource { private class CacheItem { private Object data; - private String name; - public CacheItem(Object data, String name) { - this.name = name; + public CacheItem(Object data) { this.data = data; } @@ -335,7 +333,6 @@ public class JarThemeSource implements ThemeSource { public void finalize() throws Throwable { this.data = null; - this.name = null; super.finalize(); } diff --git a/src/com/itmill/toolkit/terminal/web/ServletThemeSource.java b/src/com/itmill/toolkit/terminal/web/ServletThemeSource.java index efbadea862..2da70f65c2 100644 --- a/src/com/itmill/toolkit/terminal/web/ServletThemeSource.java +++ b/src/com/itmill/toolkit/terminal/web/ServletThemeSource.java @@ -60,7 +60,6 @@ public class ServletThemeSource implements ThemeSource { private Cache resourceCache = new Cache(); /** Collection of subdirectory entries */ - private Collection subdirs = new LinkedList(); private URL descFile; /** Creates a new instance of ThemeRepository by reading the themes @@ -274,7 +273,7 @@ public class ServletThemeSource implements ThemeSource { public void put(Object key, Object value) { data.put( key, - new SoftReference(new CacheItem(value, key.toString()))); + new SoftReference(new CacheItem(value))); } public Object get(Object key) { @@ -297,10 +296,8 @@ public class ServletThemeSource implements ThemeSource { private class CacheItem { private Object data; - private String name; - public CacheItem(Object data, String name) { - this.name = name; + public CacheItem(Object data) { this.data = data; } @@ -310,7 +307,6 @@ public class ServletThemeSource implements ThemeSource { public void finalize() throws Throwable { this.data = null; - this.name = null; super.finalize(); } diff --git a/src/com/itmill/toolkit/terminal/web/Theme.java b/src/com/itmill/toolkit/terminal/web/Theme.java index ba1eedea9c..d3860b5f98 100644 --- a/src/com/itmill/toolkit/terminal/web/Theme.java +++ b/src/com/itmill/toolkit/terminal/web/Theme.java @@ -138,8 +138,6 @@ public class Theme extends DefaultHandler { /** Name of the theme. */ private String name; - /** Description file. */ - private java.io.File file; /** Version of the theme. */ private String version; @@ -174,7 +172,6 @@ public class Theme extends DefaultHandler { * @throws FileNotFoundException Thrown if the given file is not found. */ public Theme(java.io.File descriptionFile) throws FileNotFoundException { - this.file = descriptionFile; parse(new InputSource(new FileInputStream(descriptionFile))); } @@ -838,11 +835,6 @@ public class Theme extends DefaultHandler { this.files.add(file); } - /** Remove a file from fileset. */ - private void removeFile(File file) { - this.files.add(file); - } - /** Get requirements in this fileset. */ private RequirementCollection getRequirements() { return this.requirements; @@ -952,4 +944,9 @@ public class Theme extends DefaultHandler { return version; } + /** Get theme description */ + public String getDescription() { + return description; + } + } diff --git a/src/com/itmill/toolkit/terminal/web/UIDLTransformerFactory.java b/src/com/itmill/toolkit/terminal/web/UIDLTransformerFactory.java index 557b42e4e4..b0c9e2874c 100644 --- a/src/com/itmill/toolkit/terminal/web/UIDLTransformerFactory.java +++ b/src/com/itmill/toolkit/terminal/web/UIDLTransformerFactory.java @@ -170,7 +170,7 @@ public class UIDLTransformerFactory { // Create new list, if not found if (list == null) { - list = new TransformerList(type); + list = new TransformerList(); this.transformerSpool.put(type, list); if (webAdapterServlet.isDebugMode()) { Log.info("Created new type: " + type); @@ -225,14 +225,9 @@ public class UIDLTransformerFactory { private class TransformerList { - private UIDLTransformerType type = null; private LinkedList list = new LinkedList(); private long lastUsed = 0; - public TransformerList(UIDLTransformerType type) { - this.type = type; - } - public void add(UIDLTransformer transformer) { list.add(transformer); } diff --git a/src/com/itmill/toolkit/terminal/web/WebPaintTarget.java b/src/com/itmill/toolkit/terminal/web/WebPaintTarget.java index 7d0450ab0b..aba975befe 100644 --- a/src/com/itmill/toolkit/terminal/web/WebPaintTarget.java +++ b/src/com/itmill/toolkit/terminal/web/WebPaintTarget.java @@ -51,14 +51,10 @@ public class WebPaintTarget implements PaintTarget { /* Document type declarations */ private final static String UIDL_XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; - private final static String UIDL_DOCTYPE_DECL = - "<!DOCTYPE uidl PUBLIC \"-//MILLSTONE//DTD UIDL//EN\" \"http://millstone.org/xml/3.0/UIDL.dtd\">"; /* commonly used tags and argument names */ - private final static String UIDL_TAG_VARIABLE = "var"; private final static String UIDL_ARG_NAME = "name"; private final static String UIDL_ARG_VALUE = "value"; private final static String UIDL_ARG_ID = "id"; - private final static String UIDL_ARG_TYPE = "type"; private Stack mOpenTags; private boolean mTagArgumentListOpen; private StringBuffer uidlBuffer; |