~ubuntu-branches/ubuntu/vivid/tomcat6/vivid

« back to all changes in this revision

Viewing changes to java/org/apache/el/lang/ELSupport.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2014-02-17 00:02:00 UTC
  • mfrom: (1.2.10)
  • Revision ID: package-import@ubuntu.com-20140217000200-qs6ki7bhqnfhkas7
Tags: 6.0.39-1
* Team upload.
* New upstream release.
  - Refreshed the patches
* Standards-Version updated to 3.9.5 (no changes)
* Switch to debhelper level 9
* Use XZ compression for the upstream tarball
* Use canonical URL for the Vcs-Git field

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 * A helper class that implements the EL Specification
33
33
 * 
34
34
 * @author Jacob Hookom [jacob@hookom.net]
35
 
 * @version $Id: ELSupport.java 1245686 2012-02-17 18:06:00Z markt $
 
35
 * @version $Id: ELSupport.java 1561785 2014-01-27 18:44:45Z markt $
36
36
 */
37
37
public class ELSupport {
38
38
 
49
49
        }
50
50
    }
51
51
 
52
 
    /**
53
 
     * @param obj0
54
 
     * @param obj1
55
 
     * @return
56
 
     * @throws EvaluationException
57
 
     */
 
52
 
58
53
    public final static int compare(final Object obj0, final Object obj1)
59
54
            throws ELException {
60
55
        if (obj0 == obj1 || equals(obj0, obj1)) {
92
87
        throw new ELException(MessageFactory.get("error.compare", obj0, obj1));
93
88
    }
94
89
 
95
 
    /**
96
 
     * @param obj0
97
 
     * @param obj1
98
 
     * @return
99
 
     * @throws EvaluationException
100
 
     */
 
90
 
101
91
    public final static boolean equals(final Object obj0, final Object obj1)
102
92
            throws ELException {
103
93
        if (obj0 == obj1) {
134
124
        }
135
125
    }
136
126
 
137
 
    /**
138
 
     * @param obj
139
 
     * @param type
140
 
     * @return
141
 
     */
 
127
 
142
128
    public final static Enum<?> coerceToEnum(final Object obj, Class type) {
143
129
        if (obj == null || "".equals(obj)) {
144
130
            return null;
358
344
                val, String.class, type));
359
345
    }
360
346
 
361
 
    /**
362
 
     * @param obj
363
 
     * @return
364
 
     */
 
347
 
365
348
    public final static String coerceToString(final Object obj) {
366
349
        if (obj == null) {
367
350
            return "";
431
414
                obj, obj.getClass(), type));
432
415
    }
433
416
 
434
 
    /**
435
 
     * @param obj
436
 
     * @return
437
 
     */
 
417
 
438
418
    public final static boolean containsNulls(final Object[] obj) {
439
419
        for (int i = 0; i < obj.length; i++) {
440
420
            if (obj[0] == null) {
521
501
        }
522
502
    }
523
503
 
524
 
    /**
525
 
     * 
526
 
     */
 
504
 
527
505
    public ELSupport() {
528
506
        super();
529
507
    }
530
 
 
531
508
}