1 64 65 package com.jcorporate.expresso.kernel.util; 66 67 74 75 public class ClassLoaderComparator { 76 77 protected ClassLoaderComparator() { 78 } 79 80 87 static public final boolean sameClassLoader(Object o1) { 88 ClassLoader current = Thread.currentThread().getContextClassLoader(); 89 ClassLoader other = o1.getClass().getClassLoader(); 90 91 if (current == null && other == null) { 92 return true; 93 } else if (current == null || other == null) { 94 return false; 95 } 96 97 return other.equals(current); 98 } 99 } | Popular Tags |