• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / displaytag / 1753

12 Feb 2026 03:17AM UTC coverage: 77.321% (-0.01%) from 77.334%
1753

push

github

web-flow
Merge pull request #1102 from hazendaz/renovate/javax-support-logback-monorepo

Update dependency ch.qos.logback:logback-classic to v1.5.29 (javax-support)

1438 of 2003 branches covered (71.79%)

Branch coverage included in aggregate %.

4034 of 5074 relevant lines covered (79.5%)

0.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

14.29
/displaytag/src/main/java/org/displaytag/util/ReflectHelper.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2002-2026 Fabrizio Giustina, the Displaytag team
6
 */
7
package org.displaytag.util;
8

9
/**
10
 * Utility method for reflection.
11
 */
12
public final class ReflectHelper {
13

14
    /**
15
     * Don't instantiate.
16
     */
17
    private ReflectHelper() {
18
        // unused
19
    }
20

21
    /**
22
     * Tries to load a class with more classloaders. Can be useful in J2EE applications if jar is loaded from a
23
     * different classloader than user classes. If class is not found using the standard classloader, tries whit the
24
     * thread classloader.
25
     *
26
     * @param className
27
     *            class name
28
     *
29
     * @return Class loaded class
30
     *
31
     * @throws ClassNotFoundException
32
     *             if none of the ClassLoaders is able to found the reuested class
33
     */
34
    public static Class<?> classForName(final String className) throws ClassNotFoundException {
35
        try {
36
            // trying with the default ClassLoader
37
            return Class.forName(className);
1✔
38
        } catch (final ClassNotFoundException cnfe) {
×
39
            try {
40
                // trying with thread ClassLoader
41
                final Thread thread = Thread.currentThread();
×
42
                final ClassLoader threadClassLoader = thread.getContextClassLoader();
×
43
                return Class.forName(className, false, threadClassLoader);
×
44
            } catch (final ClassNotFoundException cnfe2) {
×
45
                throw cnfe2;
×
46
            }
47
        }
48
    }
49

50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc