diff options
author | Tor Norbye <tnorbye@google.com> | 2010-10-08 14:43:45 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2010-10-09 08:22:36 -0700 |
commit | 1d660e085c4517fb97c76b0c526b21491c193965 (patch) | |
tree | 43eb484c5baa6f7db5f3e81dfd70daa3c77fd28a /ddms | |
parent | 55287d3eb7e50e603358e99f9db9e706620c2bcf (diff) | |
download | sdk-1d660e085c4517fb97c76b0c526b21491c193965.zip sdk-1d660e085c4517fb97c76b0c526b21491c193965.tar.gz sdk-1d660e085c4517fb97c76b0c526b21491c193965.tar.bz2 |
Fix a couple of bugs.
Using File.toURL() is dangerous because the reverse operation
(URLDecoder.decode, which for example is used by URLClassLoader to
produce a path from URLs) doesn't always succeed - for example on a
filename like "/tmp/te#st". Use File.toURI().toURL() instead.
The second problem looks like an unintentional || instead of &&.
Change-Id: Ib4e2ac13c914c002eff53455ed6d6ed898ce35fb
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java index b037193..c473b23 100644 --- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java +++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java @@ -89,7 +89,7 @@ public abstract class TablePanel extends ClientDisplayPanel { // now add that to the clipboard if the string has content String data = sb.toString(); - if (data != null || data.length() > 0) { + if (data != null && data.length() > 0) { clipboard.setContents( new Object[] { data }, new Transfer[] { TextTransfer.getInstance() }); |