List of usage examples for java.lang NullPointerException NullPointerException
public NullPointerException()
From source file:net.mikaboshi.intra_mart.tools.log_stats.parser.GenericLogParser.java
public GenericLogParser(ParserParameter parameter) { if (parameter == null) { throw new NullPointerException(); }//from www . j a va 2 s . com this.parameter = parameter; }
From source file:com.sap.prd.mobile.ios.mios.FatLibAnalyzer.java
FatLibAnalyzer(final File fatLib) { if (fatLib == null) throw new NullPointerException(); if (!fatLib.canRead()) throw new IllegalArgumentException("Cannot access " + fatLib + "."); this.fatLib = fatLib; }
From source file:com.trickl.crawler.handle.BeanMemberHandler.java
@SuppressWarnings("unchecked") @Override//w ww .j a v a2s . com public void handle(T task, BeanType bean) throws DroidsException, IOException { if (task == null || bean == null) throw new NullPointerException(); if (outputHandler != null) { BeanMap beanMap = new BeanMap(bean); BeanMemberType beanMember = (BeanMemberType) beanMap.get(propertyName); if (beanMember == null) { throw new DroidsException("Bean does not contain a value for member '" + propertyName + "'"); } outputHandler.handle(task, beanMember); } }
From source file:cz.muni.fi.pa165.deliveryservice.service.CourierServiceImpl.java
@PreAuthorize("hasRole('ROLE_ADMIN')") @Override/*from w w w . j a v a 2 s. c o m*/ public CourierDTO createCourier(CourierDTO courierDto) { if (courierDto == null) { throw new NullPointerException(); } Courier courier = mapper.map(courierDto, Courier.class); courier.setActive(Boolean.TRUE); courierDao.createCourier(courier); return mapper.map(courier, CourierDTO.class); }
From source file:com.github.wnameless.spring.bulkapi.BulkApiException.java
/** * Creates a {@link BulkApiException}.// ww w. j a v a2 s. c om * * @param status * a {@link HttpStatus} * @param error * message */ public BulkApiException(HttpStatus status, String error) { if (status == null) throw new NullPointerException(); if (error == null) throw new NullPointerException(); this.status = status; this.error = error; }
From source file:technology.tikal.ventas.model.pedido.ofy.SubPedidoOfy.java
public SubPedidoOfy(SubPedidoOfy base) { this();/*from w w w . j a va 2 s . co m*/ if (base.owner == null) { throw new NullPointerException(); } this.owner = base.owner; }
From source file:de.knowwe.selesup.sofa.ArticleSofa.java
public ArticleSofa(Article article) { if (article == null) { throw new NullPointerException(); }//from ww w. ja va 2s . c o m this.article = article; }
From source file:SimpleSet.java
public boolean add(Object element) { if (element == null) throw new NullPointerException(); for (int i = 0; i < count; i++) { if (element.equals(elementObjects[i])) return false; }/* w w w . j av a 2s . c om*/ if (count == elementObjects.length) { Object[] newArray = new Object[(count + 1) * 3 / 2]; System.arraycopy(elementObjects, 0, newArray, 0, count); elementObjects = newArray; } elementObjects[count++] = element; return true; }
From source file:fi.helsinki.opintoni.exception.ExceptionThrower.java
@RequestMapping("/nullpointer") public void throwNullPointer() { throw new NullPointerException(); }
From source file:com.microsoft.rest.ServiceClientTracing.java
/** * Add a tracing interceptor to be notified of changes. * /*w ww . jav a2s .com*/ * @param serviceClientTracingInterceptor the tracing interceptor */ public static void addTracingInterceptor( final ServiceClientTracingInterceptor serviceClientTracingInterceptor) { if (serviceClientTracingInterceptor == null) { throw new NullPointerException(); } interceptors.add(serviceClientTracingInterceptor); }