aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2011-11-07 17:56:31 +0200
committerHenri Sara <hesara@vaadin.com>2011-11-07 17:56:31 +0200
commitb2f5e652227dd4468622b092a8197afa8ee9b65f (patch)
tree5a3effd059373f2d7878c4f7d2b205f989740538 /src/com/vaadin/ui
parentc93efdf86d84ae42e67f344ad5fdd13e197f952a (diff)
downloadvaadin-framework-b2f5e652227dd4468622b092a8197afa8ee9b65f.tar.gz
vaadin-framework-b2f5e652227dd4468622b092a8197afa8ee9b65f.zip
Throw exception from Property.toString() implementations.
The default implementations of Property.toString() now throw an UnsupportedOperationException to help find and eliminate code relying on Property.toString().
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r--src/com/vaadin/ui/AbstractField.java4
-rw-r--r--src/com/vaadin/ui/Label.java3
-rw-r--r--src/com/vaadin/ui/ProgressIndicator.java7
3 files changed, 7 insertions, 7 deletions
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java
index 8754d3cd53..007f851a72 100644
--- a/src/com/vaadin/ui/AbstractField.java
+++ b/src/com/vaadin/ui/AbstractField.java
@@ -410,7 +410,9 @@ public abstract class AbstractField extends AbstractComponent implements Field,
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of " + getClass()
+ + ".toString()");
}
/**
diff --git a/src/com/vaadin/ui/Label.java b/src/com/vaadin/ui/Label.java
index 5a82b64243..c7504230e3 100644
--- a/src/com/vaadin/ui/Label.java
+++ b/src/com/vaadin/ui/Label.java
@@ -252,7 +252,8 @@ public class Label extends AbstractComponent implements Property,
@Deprecated
@Override
public String toString() {
- return getStringValue();
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of Label.toString()");
}
/**
diff --git a/src/com/vaadin/ui/ProgressIndicator.java b/src/com/vaadin/ui/ProgressIndicator.java
index 88e0edcd02..6f2758f323 100644
--- a/src/com/vaadin/ui/ProgressIndicator.java
+++ b/src/com/vaadin/ui/ProgressIndicator.java
@@ -155,11 +155,8 @@ public class ProgressIndicator extends AbstractField implements Property,
@Deprecated
@Override
public String toString() {
- if (dataSource == null) {
- throw new IllegalStateException("Datasource must be set");
- }
- Object value = dataSource.getValue();
- return (null != value) ? value.toString() : null;
+ throw new UnsupportedOperationException(
+ "Use Property.getValue() instead of ProgressIndicator.toString()");
}
/**
='backport/47834/stable29'>backport/47834/stable29 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/.htaccess
blob: eef4ead0179da2a7b5d9cc6292cbbef02ad9e712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<IfModule mod_fcgid.c>
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
</IfModule>
</IfModule>
</IfModule>
<IfModule mod_php5.c>
php_value upload_max_filesize 513M
php_value post_max_size 513M
php_value memory_limit 512M
php_value mbstring.func_overload 0
<IfModule env_module>
  SetEnv htaccessWorking true
</IfModule>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R]
RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R]
RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>
<IfModule mod_mime.c>
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</IfModule>
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
AddDefaultCharset utf-8
Options -Indexes
<IfModule pagespeed_module>
        ModPagespeed Off
</IfModule>
<IfModule mod_headers.c>
  <FilesMatch "\.(css|js)$">
    Header set Cache-Control "max-age=7200, public"
  </FilesMatch>
</IfModule>