List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:org.mule.cloudconnect.ibeans.IBeanFactoryBean.java
public T getObject() throws Exception { IBeanBinding binding = createBinding(getObjectType().getSimpleName()); binding.setInterface(getObjectType()); T ibean = (T) binding.createProxy(new Object()); init(ibean);//from w w w.j a v a 2s .co m return ibean; }
From source file:com.qrmedia.commons.collections.PairUtilsTest.java
@Test public void toPairAcceptsNullSecondObject() { assertNull(PairUtils.toPair(new Object(), null).getSecondObject()); }
From source file:org.parancoe.basicWebApp.controllers.HomeController.java
@RequestMapping public ModelAndView welcome(HttpServletRequest req, HttpServletResponse res) { Map params = new HashMap(); params.put("something", new Object()); return new ModelAndView("welcome", params); }
From source file:edu.duke.cabig.c3pr.rules.repository.RepositoryCleaner.java
public RepositoryCleaner(String path) { log.debug("Going to delete the contents inside the local rules repository [" + path + "]"); // run this only once per JVM/classloader if (lock == null) { try {//from w ww . j a v a2 s. c om URL url = new URL(path); File f = new File(url.getFile()); RepositoryCleaner.deleteDirectoryContents(f); } catch (Exception e) { // ignore log.debug("Error while emptying the contents of rules repository [" + path + "]", e); } finally { lock = new Object(); } } log.debug("Completed deletion of conents #*#"); }
From source file:com.github.jinahya.codec.commons.RareDecoderProxyTest.java
@Test public void testAsDecoder() throws DecoderException { final Decoder decoder = (Decoder) RareDecoderProxy.newInstance(); try {//from www .j a v a 2s . c om decoder.decode(null); Assert.fail("passed: <Object>decode(null)"); } catch (final NullPointerException npe) { // expected } final Object expected = new Object(); final Object actual = decoder.decode(expected); Assert.assertEquals(actual, expected); }
From source file:net.sourceforge.vulcan.web.VulcanContextListenerTest.java
@Override public void setUp() throws Exception { super.setUp(); wac.getBeanFactory().registerSingleton(Keys.BUILD_OUTCOME_STORE, new Object()); }
From source file:com.seedboxer.seedboxer.core.logic.DownloadsSessionManager.java
public DownloadsSessionManager() { downloadsPerUser = new HashMap<Long, DownloadSession>(); lock = new Object(); }
From source file:org.jasig.cas.web.support.ThrottledSubmissionByIpAddressHandlerInterceptorAdapterTests.java
public void testOneFailure() throws Exception { final MockHttpServletRequest request = new MockHttpServletRequest(); final ModelAndView modelAndView = new ModelAndView("casLoginView"); request.setMethod("POST"); request.setRemoteAddr("111.111.111.111"); this.adapter.postHandle(request, new MockHttpServletResponse(), new Object(), modelAndView); assertEquals("casLoginView", modelAndView.getViewName()); }
From source file:ImageUtilities.java
/** * Starts loading the given image, returns only when it's done loading. * Note that it's much more efficient to preload a lot of images at once using * the preload(Image []) method instead of this one. * * @return The result of the image loading, either {@link #COMPLETE}, * {@link #ERRORED}, {@link #ABORTED} or {@link #INTERRUPTED}. * * @see #preload(java.awt.Image [], int []) *///from w w w . j ava 2 s .c o m public static int preload(Image image) { Toolkit toolkit = Toolkit.getDefaultToolkit(); // Check if already loaded if ((toolkit.checkImage(image, -1, -1, null) & ImageObserver.ALLBITS) != 0) return COMPLETE; Object lock = new Object(); synchronized (lock) { while (true) { ImageLoadObserver observer = new ImageLoadObserver(lock); toolkit.prepareImage(image, -1, -1, observer); int result = toolkit.checkImage(image, -1, -1, null); if ((result & ImageObserver.ALLBITS) != 0) return COMPLETE; if ((result & ImageObserver.ERROR) != 0) return ERRORED; if ((result & ImageObserver.ABORT) != 0) return ABORTED; try { lock.wait(); return observer.getResult(); } catch (InterruptedException e) { return INTERRUPTED; } } } }
From source file:intelligent.wiki.editor.core.ASTNodeIDTest.java
@Test public void testEquals() throws Exception { Assert.assertEquals(true, id.equals(id)); Assert.assertEquals(false, id.equals(anotherId)); Assert.assertEquals(false, id.equals(null)); Assert.assertEquals(false, id.equals(new Object())); }