Example usage for java.lang Object Object

List of usage examples for java.lang Object Object

Introduction

In this page you can find the example usage for java.lang Object Object.

Prototype

@HotSpotIntrinsicCandidate
public Object() 

Source Link

Document

Constructs a new object.

Usage

From source file:com.job.portal.manager.JobApplicationsManager.java

public JSONObject apply(HttpServletRequest request) {
    JSONObject obj = new JSONObject(), obj1 = null;
    boolean flag = false;
    JobApplicationsDAO jad = new JobApplicationsDAO();
    try {/*  w  w  w  .ja va2  s .  co m*/
        obj.put("status", flag);
        HttpSession sess = request.getSession(false);
        obj1 = (JSONObject) sess.getAttribute("user");
        String jobId = request.getParameter("jobId");
        if (jobId != null && ExpressionCheck.checkNumber(jobId)) {
            if (obj1.has("userId")) {
                flag = jad.applyForJob(jobId, obj1.getString("userId"));
                obj.put("status", flag);
                if (flag) {
                    obj.put("msg", "Successfully Applied");
                } else {
                    obj.put("msg", "There seems to be some problem please try again after sometime");
                }
            } else {
                obj.put("msg", "Please log in to continue");
            }
        } else {
            obj.put("msg", "Invalid job id");
        }
    } catch (Exception e) {
        LogOut.log.error("In " + new Object() {
        }.getClass().getEnclosingClass().getName() + "." + new Object() {
        }.getClass().getEnclosingMethod().getName() + " " + e);
    } finally {
        return obj;
    }
}

From source file:com.teletalk.jserver.util.MessageQueueTest.java

protected Object createMessageQueueItem() {
    return new Object();
}

From source file:com.xtructure.xutil.valid.comp.UTestAbstractComparisonCondition.java

License:asdf

public void isSatisfiedByBehavesAsExpected() {
    boolean valid = RandomUtil.nextBoolean();
    String value = RandomStringUtils.randomAlphanumeric(10);
    String object = RandomStringUtils.randomAlphanumeric(10);
    DummyComparisonCondition predicate = new DummyComparisonCondition(value);
    predicate.setrVal(valid);/*from   ww  w .j  a  v a2s .co  m*/
    if (valid != predicate.isSatisfiedBy(object) || predicate.getCall() != 1
            || !predicate.getLast().equals(object)) {
        throw new AssertionError();
    }
    if (predicate.isSatisfiedBy(new Object())) {
        throw new AssertionError();
    }
}

From source file:com.honnix.cheater.admin.AdminServer.java

public AdminServer(ServerSocket serverSocket, Cheater cheater) {
    super();//from   w w w.j  a  v  a  2  s .c  o  m

    thisThread = new Thread(this);
    this.serverSocket = serverSocket;
    this.cheater = cheater;
    isStarted = false;
    hasClient = false;

    lock = new Object();
}

From source file:com.twelvemonkeys.util.LinkedMapTestCase.java

protected Object[] getValues() {
    return new Object[] { "bar", "frob", new Object() };
}

From source file:io.pivotal.dataflow.task.app.jdbcgemfire.GemfireDozerItemWriterTestUtil.java

public Object testItemWriter(String regionName) {
    Object k = new Object();
    try {/*from w w  w .  java2s. c  o  m*/
        List<Map<String, Object>> listMap = new ArrayList<>();
        System.out.println("Region to Test : " + regionName);
        if (regionName != null) {
            map = DATA_SET.get(regionName);
        }
        Class K = Class.forName("io.pivotal.gemfire.pubs.key." + regionName + "Key");
        k = K.newInstance();
        LOG.debug("KeyClass={}", K.getName());
        listMap.add(map);
        itemWriter.write(listMap);
        Mapper mp = dmb;
        LOG.info("Starting Dozer Mapping of Class [{}]", K.getName());
        k = mp.map(map, K);
    } catch (Exception e) {
        System.out.println("ex: " + e.getMessage());
        ex = e;
    }
    LOG.debug("Key returned in test={}", k.toString());
    return k;
}

From source file:org.atemsource.atem.impl.pojo.PrimitiveCollectionAssociationAttributeTest.java

@Test
public void testGetCount() {
    EntityType entityType = entityTypeRepository.getEntityType(EntityA.class);
    CollectionAttribute attribute = (CollectionAttribute) entityType.getAttribute("objectList");
    Assert.assertNotNull(attribute);/*from  w  w  w .  j a  va 2 s .  c  om*/
    EntityA a = new EntityA();
    a.setObjectList(new ArrayList());
    a.getObjectList().add(new Object());
    a.getObjectList().add(new Object());
    Assert.assertEquals(attribute.getSize(a), 2);
}

From source file:com.espertech.esper.event.bean.TestReflectionPropFieldGetter.java

public void testGetter() throws Exception {
    ReflectionPropFieldGetter getter = makeGetter(SupportLegacyBean.class, "fieldLegacyVal");
    assertEquals("a", getter.get(unitTestBean));

    try {//from   w  w w.  ja va2s .  c o  m
        EventBean eventBean = SupportEventBeanFactory.createObject(new Object());
        getter.get(eventBean);
        assertTrue(false);
    } catch (PropertyAccessException ex) {
        // Expected
        log.debug(".testGetter Expected exception, msg=" + ex.getMessage());
    }
}

From source file:com.xtructure.xutil.test.UTestAbstractXmlTest_Wrapper.java

public void constructorSucceeds() {
    assertThat("", //
            new Wrapper(new Object()), isNotNull());
}

From source file:com.opensymphony.xwork2.validator.URLValidatorTest.java

public void testAcceptNullValueForMutualExclusionOfValidators() throws Exception {

    URLValidator validator = new URLValidator();
    validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
    validator.setFieldName("testingUrl1");
    validator.setValueStack(ActionContext.getContext().getValueStack());
    validator.validate(new MyObject());

    assertFalse(validator.getValidatorContext().hasErrors());
    assertFalse(validator.getValidatorContext().hasActionErrors());
    assertFalse(validator.getValidatorContext().hasActionMessages());
    assertFalse(validator.getValidatorContext().hasFieldErrors());
}