List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:com.job.portal.dao.UserDetailsDAO.java
public long insertUser(UserDetails ud) { long id = -1; try {//ww w .j a v a2 s. c o m String query = "insert into user_details (email,name,pwdHash,salt,joined,phone) values(?,?,?,?,?,?)"; Object arr[] = new Object[6]; arr[0] = ud.getEmail(); arr[1] = ud.getName(); arr[2] = ud.getPwdHash(); arr[3] = ud.getSalt(); arr[4] = ud.getJoined(); arr[5] = ud.getPhone(); id = insert(query, arr); } catch (Exception e) { LogOut.log.error("In " + new Object() { }.getClass().getEnclosingClass().getName() + "." + new Object() { }.getClass().getEnclosingMethod().getName() + " " + e); } finally { return id; } }
From source file:edu.xjtu.qxcamerabridge.Qx10ServiceDelegatorImpl.java
/** * Test passed on Qx10/*from www . j av a 2 s. c om*/ * * @param shootMode * @return */ @Override public boolean setShootMode(ShootMode shootMode) { String service = "camera"; String serviceName = new Object() { }.getClass().getEnclosingMethod().getName(); List<Object> params = new ArrayList<>(); params.add(shootMode.toString()); JSONObject replyJson = JSONActionWrapper.jsonrpc(service, serviceName, params); int result = replyJson.getJSONArray("result").getInt(0); return result == 0; }
From source file:RemoteDeviceDiscovery.java
public static void findDevices() throws IOException, InterruptedException { final Object inquiryCompletedEvent = new Object(); devicesDiscovered.clear();/*from w w w.ja v a 2 s. com*/ DiscoveryListener listener = new DiscoveryListener() { public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) { if (debug) System.out.println("#" + "Device " + btDevice.getBluetoothAddress() + " found"); devicesDiscovered.add(btDevice); try { if (debug) System.out.println("#" + " name " + btDevice.getFriendlyName(false)); } catch (IOException cantGetDeviceName) { } } public void inquiryCompleted(int discType) { if (debug) System.out.println("#" + "Device Inquiry completed!"); synchronized (inquiryCompletedEvent) { inquiryCompletedEvent.notifyAll(); } } public void serviceSearchCompleted(int transID, int respCode) { } public void servicesDiscovered(int transID, ServiceRecord[] servRecord) { if (debug) System.out.println("#" + "servicesDiscovered"); } }; synchronized (inquiryCompletedEvent) { //ServiceRecord. LocalDevice ld = LocalDevice.getLocalDevice(); //ld.getRecord() if (debug) System.out.println("#My Name is:" + ld.getFriendlyName()); // boolean started = LocalDevice.getLocalDevice().getDiscoveryAgent().startInquiry(DiscoveryAgent.LIAC, listener); // if (started) { // if (debug) System.out.println("wait for device inquiry to complete..."); // inquiryCompletedEvent.wait(); // if (debug) System.out.println(devicesDiscovered.size() + " device(s) found"); // } boolean started = LocalDevice.getLocalDevice().getDiscoveryAgent().startInquiry(DiscoveryAgent.GIAC, listener); if (started) { if (debug) System.out.println("#" + "wait for device inquiry to complete..."); inquiryCompletedEvent.wait(); if (debug) System.out.println("#" + devicesDiscovered.size() + " device(s) found"); } } }
From source file:me.ferrybig.javacoding.webmapper.test.session.DefaultDataStorageTest.java
@Test public void getDataAsSupportsOneBackendTypeTest() { Object o;/*from ww w .j a va 2s .c o m*/ data.setData(Collections.singleton(o = new Object())); assertEquals(o, extr(data.getDataAs(Object.class))); }
From source file:com.screenslicer.common.CommonFile.java
private static Object lock(String filepath) { synchronized (fileLocksMutex) { Object fileLock;// www . j a v a2s. co m if (fileLocks.containsKey(filepath)) { fileLock = fileLocks.get(filepath); fileLocksCount.put(filepath, fileLocksCount.get(filepath).intValue() + 1); } else { final Object newFileLock = new Object(); fileLocks.put(filepath, newFileLock); fileLocksCount.put(filepath, 1); fileLock = newFileLock; } return fileLock; } }
From source file:ab.server.proxy.message.ProxyClickMessage.java
@Override public Object gotResponse(JSONObject data) { return new Object(); }
From source file:io.spring.marchmadness.batch.DeDupingItemProcessor.java
@Override public Bracket process(Bracket item) throws Exception { int curHash = item.hashCode(); if (hashes.get(curHash) != null) { return null; } else {/* w w w . ja v a2 s . c om*/ hashes.put(curHash, new Object()); return item; } }
From source file:nz.net.orcon.kanban.controllers.HomeControllerTest.java
@Test public void testController() { HomeController controller = new HomeController(); controller.setSpringSecurityFilterChain(new Object()); Model model = new ExtendedModelMap(); Assert.assertEquals("home", controller.home(model)); }
From source file:io.gravitee.repository.mongodb.management.transaction.NoTransactionManager.java
@Override protected Object doGetTransaction() throws TransactionException { return new Object(); }
From source file:gaderian.test.utilities.TestSpringObjectProvider.java
public void testBasic() { Object bean = new Object(); BeanFactory bf = createMock(BeanFactory.class); EasyMock.expect(bf.getBean("fred")).andReturn(bean); replayAllRegisteredMocks();/*from w ww . j ava2 s . c o m*/ SpringObjectProvider p = new SpringObjectProvider(); p.setBeanFactory(bf); Object result = p.provideObject(null, null, "fred", null); assertSame(bean, result); verifyAllRegisteredMocks(); }