~james-page/ubuntu/natty/tomcat6/fix-662588

« back to all changes in this revision

Viewing changes to java/org/apache/el/parser/AstValue.java

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-05-21 13:51:15 UTC
  • mfrom: (2.2.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100521135115-qfwnf24lzvi3644v
Tags: 6.0.26-2
* debian/tomcat6.{postinst,prerm}: Respect TOMCAT6_USER and TOMCAT6_GROUP
  as defined in /etc/default/tomcat6 when setting directory permissions and
  authbind configuration (Closes: #581018, LP: #557300)
* debian/tomcat6.postinst: Use group "tomcat6" instead of "adm" for
  permissions in /var/lib/tomcat6, so that group "adm" doesn't get write
  permissions over /var/lib/tomcat6/webapps (LP: #569118)

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    public Class getType(EvaluationContext ctx) throws ELException {
56
56
        Target t = getTarget(ctx);
57
57
        ctx.setPropertyResolved(false);
58
 
        return ctx.getELResolver().getType(ctx, t.base, t.property);
 
58
        Class<?> result = ctx.getELResolver().getType(ctx, t.base, t.property);
 
59
        if (!ctx.isPropertyResolved()) {
 
60
            throw new PropertyNotFoundException(MessageFactory.get(
 
61
                    "error.resolver.unhandled", t.base, t.property));            
 
62
        }
 
63
        return result;
59
64
    }
60
65
 
61
66
    private final Target getTarget(EvaluationContext ctx) throws ELException {
119
124
            }
120
125
            i++;
121
126
        }
 
127
        if (!ctx.isPropertyResolved()) {
 
128
            throw new PropertyNotFoundException(MessageFactory.get(
 
129
                    "error.resolver.unhandled", base, property));            
 
130
        }
122
131
        return base;
123
132
    }
124
133
 
125
134
    public boolean isReadOnly(EvaluationContext ctx) throws ELException {
126
135
        Target t = getTarget(ctx);
127
136
        ctx.setPropertyResolved(false);
128
 
        return ctx.getELResolver().isReadOnly(ctx, t.base, t.property);
 
137
        boolean result =
 
138
            ctx.getELResolver().isReadOnly(ctx, t.base, t.property);
 
139
        if (!ctx.isPropertyResolved()) {
 
140
            throw new PropertyNotFoundException(MessageFactory.get(
 
141
                    "error.resolver.unhandled", t.base, t.property));            
 
142
        }
 
143
        return result;
129
144
    }
130
145
 
131
146
    public void setValue(EvaluationContext ctx, Object value)
141
156
            value = ELSupport.coerceToType(value, targetClass);
142
157
        }
143
158
        resolver.setValue(ctx, t.base, t.property, value);
 
159
        if (!ctx.isPropertyResolved()) {
 
160
            throw new PropertyNotFoundException(MessageFactory.get(
 
161
                    "error.resolver.unhandled", t.base, t.property));            
 
162
        }
144
163
    }
145
164
 
146
165
    private boolean isAssignable(Object value, Class<?> targetClass) {
172
191
            result = m.invoke(t.base, (Object[]) paramValues);
173
192
        } catch (IllegalAccessException iae) {
174
193
            throw new ELException(iae);
 
194
        } catch (IllegalArgumentException iae) {
 
195
            throw new ELException(iae);
175
196
        } catch (InvocationTargetException ite) {
176
197
            throw new ELException(ite.getCause());
177
198
        }