List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:com.job.portal.dao.JobApplicationsDAO.java
public JSONArray getAppliedJobs(String userId) { JSONArray arr = new JSONArray(); try {// w w w. java 2 s. c om String query = "SELECT jm.`jobId`,jm.`datePosted`,jm.`description`,jm.`experience`,jm.`functionalArea`," + "jm.`keywords`," + "jm.`location`,jm.`qualificationRequired`,jm.`salary`,jm.`title`,jm.`vacancies`," + "jm.`companyId`,ja.appliedOn" + "FROM `job_master` jm join job_applications ja on ja.jobId " + "where jm.jobId in ( " + "select jobId from job_applications where userId=?) " + "order by ja.appliedOn desc;"; Object obj[] = new Object[1]; obj[0] = userId; arr = fetchList(query, obj); } catch (Exception e) { LogOut.log.error("In " + new Object() { }.getClass().getEnclosingClass().getName() + "." + new Object() { }.getClass().getEnclosingMethod().getName() + " " + e); } finally { return arr; } }
From source file:no.dusken.aranea.admin.control.UploadFileController.java
@Override protected Object formBackingObject(HttpServletRequest httpServletRequest) throws Exception { // There is no backing object, but we cannot return null.. return new Object(); }
From source file:com.google.gwt.emultest.java.util.ArrayDequeTest.java
public void testAdd() throws Exception { Object o1 = new Object(); Object o2 = new Object(); Object o3 = new Object(); ArrayDeque<Object> deque = new ArrayDeque<>(); assertTrue(deque.add(o1));// w w w . j a va2s . c o m checkDequeSizeAndContent(deque, o1); assertTrue(deque.add(o2)); checkDequeSizeAndContent(deque, o1, o2); assertTrue(deque.add(o3)); checkDequeSizeAndContent(deque, o1, o2, o3); try { deque.add(null); fail(); } catch (NullPointerException expected) { } }
From source file:com.greenbird.mule.http.log.converter.UserNameConverterTest.java
@Test public void doConvert_unknownPrincipalType_userNameNotFoundAndDefaultValueUsed() throws Exception { String logOutput = logWithSession(UserNameConverter.CONVERSION_CHARACTER, securedSession(new Object())); assertThat(logOutput, is(DEFAULT_VALUE)); }
From source file:org.cauldron.tests.TestTasks.java
public void testPassThru() throws Exception { Task task = new PassThru(); task.compile();//from ww w .j a v a2 s. c o m Object input = new Object(); Object output = TaskFactory.newContext(null).run(task, input); assertSame(input, output); }
From source file:shiver.me.timbers.security.servlet.AuthenticationHttpServletBinderTest.java
@Test public void Can_add_an_authentication_to_a_response() throws Exception { final Authentication authentication = mock(Authentication.class); final HttpServletResponse response = mock(HttpServletResponse.class); final Object subject = new Object(); // Given// w ww . j a va 2 s.c om given(authenticationConverter.convert(authentication)).willReturn(subject); // When binder.add(response, authentication); // Then verify(httpServletBinder).add(response, subject); }
From source file:io.wcm.caravan.pipeline.impl.JacksonFunctionsTest.java
@Test(expected = JsonPipelineInputException.class) public void testObjectToNode() { // fail with JsonPipelineInputException by providing incorrect POJO class JacksonFunctions.pojoToNode(new Object()); }
From source file:de.r2soft.empires.framework.test.ObjectTreeTest.java
@Test public void testNearestOne() { Object obj = new Object(); tree.insert(new Vector2D(30, 30), obj); Object objT = tree.nearest(new Vector2D(31, 31)); Assert.assertEquals(obj, objT);/* www .ja va2 s . c o m*/ }
From source file:intelligent.wiki.editor.core.sweble.SwebleASTNodeTest.java
@Test public void testEquals() throws Exception { Assert.assertEquals(true, astNode.equals(astNode)); Assert.assertEquals(false, astNode.equals(childAstNode)); Assert.assertEquals(false, astNode.equals(null)); Assert.assertEquals(false, astNode.equals(new Object())); }
From source file:ly.count.android.api.EventTests.java
public void testEqualsAndHashCode() { final Event event1 = new Event(); final Event event2 = new Event(); assertFalse(event1.equals(null));/* www .j a va 2 s . co m*/ assertFalse(event1.equals(new Object())); assertTrue(event1.equals(event2)); assertEquals(event1.hashCode(), event2.hashCode()); event1.key = "eventKey"; assertFalse(event1.equals(event2)); assertFalse(event2.equals(event1)); assertTrue(event1.hashCode() != event2.hashCode()); event2.key = "eventKey"; assertTrue(event1.equals(event2)); assertTrue(event2.equals(event1)); assertEquals(event1.hashCode(), event2.hashCode()); event1.timestamp = 1234; assertFalse(event1.equals(event2)); assertFalse(event2.equals(event1)); assertTrue(event1.hashCode() != event2.hashCode()); event2.timestamp = 1234; assertTrue(event1.equals(event2)); assertTrue(event2.equals(event1)); assertEquals(event1.hashCode(), event2.hashCode()); event1.segmentation = new HashMap<String, String>(); assertFalse(event1.equals(event2)); assertFalse(event2.equals(event1)); assertTrue(event1.hashCode() != event2.hashCode()); event2.segmentation = new HashMap<String, String>(); assertTrue(event1.equals(event2)); assertTrue(event2.equals(event1)); assertEquals(event1.hashCode(), event2.hashCode()); event1.segmentation.put("segkey", "segvalue"); assertFalse(event1.equals(event2)); assertFalse(event2.equals(event1)); assertTrue(event1.hashCode() != event2.hashCode()); event2.segmentation.put("segkey", "segvalue"); assertTrue(event1.equals(event2)); assertTrue(event2.equals(event1)); assertEquals(event1.hashCode(), event2.hashCode()); event1.sum = 3.2; event2.count = 42; assertTrue(event1.equals(event2)); assertTrue(event2.equals(event1)); assertEquals(event1.hashCode(), event2.hashCode()); }