@Override public void parseFinish() { if ( depth != 0 ) Log.warn(this, "Stack error: depth ="+depth+" at end of parse run") ; depth = -1 ; }
/** Return the recorded time taken in milliseconds. * {@link #setStartTime} and {@link #setFinishTime} * must have been called. */ public long getTime() { if ( ! startTimeIsSet ) Log.warn(this, "Start time not set") ; if ( ! finishTimeIsSet ) Log.warn(this, "Finish time not set") ; return (finishTime-startTime)/(1000*1000) ; }
private QueryIteratorCheck(QueryIterator qIter, ExecutionContext execCxt) { super(qIter) ; if ( qIter instanceof QueryIteratorCheck ) Log.warn(this, "Checking checked iterator") ; this.execCxt = execCxt ; } @Override
public static ServiceDispatchRegistry get(ServletContext servletContext) { ServiceDispatchRegistry registry = (ServiceDispatchRegistry)servletContext.getAttribute(Fuseki.attrServiceRegistry) ; if ( registry == null ) Log.warn(ServiceDispatchRegistry.class, "No service registry for ServletContext") ; return registry ; }
public void setStartTime() { if ( startTimeIsSet ) Log.warn(this, "Start time reset") ; startTimeIsSet = true ; this.startTime = System.nanoTime() ; }
public static DataAccessPointRegistry get(ServletContext cxt) { DataAccessPointRegistry registry = (DataAccessPointRegistry)cxt.getAttribute(Fuseki.attrNameRegistry) ; if ( registry == null ) Log.warn(DataAccessPointRegistry.class, "No data access point registry for ServletContext") ; return registry ; }
public void register(Resource node, Dataset ds) { Dataset dsCurrent = map.get(node) ; if ( dsCurrent != null ) { if ( ! dsCurrent.equals(ds) ) Log.warn(this.getClass(), "Replacing registered dataset for "+node); } map.put(node, ds); }
private void staxError(String msg, Throwable th) { Log.warn(this, "StAX error: " + msg, th) ; throw new ResultSetException(msg, th) ; } }
@Override public V getOrFill(K key, Callable<V> filler) { try { return cache.get(key, filler) ; } catch (ExecutionException e) { Log.warn(CacheGuava.class, "Execution exception filling cache", e) ; return null ; } }
private static NodeValue decimalDivide(BigDecimal d1, BigDecimal d2) { try { BigDecimal d3 = d1.divide(d2, DIVIDE_PRECISION, BigDecimal.ROUND_FLOOR) ; return messAroundWithBigDecimalFormat(d3) ; } catch (ArithmeticException ex) { Log.warn(XSDFuncOp.class, "ArithmeticException in decimal divide - attempting to treat as doubles") ; BigDecimal d3 = new BigDecimal(d1.doubleValue() / d2.doubleValue()) ; return NodeValue.makeDecimal(d3) ; } }
private static String get(HttpServletResponse response, String name) { Collection<String> en = response.getHeaders(name) ; if ( en.isEmpty() )return null ; if ( en.size() != 1 ) Log.warn(RequestLog.class, "Multiple response header values") ; return response.getHeader(name) ; }
public void abort() { try { transactional.abort() ; } catch (Exception ex) { // Some datasets claim to be transactional but // don't provide a real abort. We tried to avoid // them earlier but even if they sneek through, // we try to continue server operation. Log.warn(this, "Exception during abort (operation attempts to continue): "+ex.getMessage()) ; } end(); }
public static Aggregator createCustom(String iri, boolean distinct, ExprList exprs) { if ( ! AggregateRegistry.isRegistered(iri) ) Log.warn(AggregatorFactory.class, "Not registered: custom aggregate <"+iri+">") ; return new AggCustom(iri, distinct, exprs) ; } }
QueryIterator exec(Op op, QueryIterator input) { push(input) ; int x = stack.size() ; op.visit(this) ; int y = stack.size() ; if ( x != y ) Log.warn(this, "Possible stack misalignment") ; QueryIterator qIter = pop() ; return qIter ; }
@Override public void begin(ReadWrite mode) { if ( mode == ReadWrite.WRITE ) //throw new JenaTransactionException("read-only dataset : no write transactions"); Log.warn(this, "Write transaction on a read-only dataset"); get().begin(mode); }
@SuppressWarnings("deprecation") @BeforeClass public static void beforeClass() { if ( ! TxnDataset2Graph.TXN_DSG_GRAPH ) Log.warn(TestDataset2Graph.class, "**** TxnDataset2Graph.TXN_DSG_GRAPH is false in the system setup ****"); txn_dsg_graph = TxnDataset2Graph.TXN_DSG_GRAPH; TxnDataset2Graph.TXN_DSG_GRAPH = true; // Make sure sync isn't called. tdb2_no_sync = DatasetGraphTDB.exceptionOnSync; DatasetGraphTDB.exceptionOnSync = true; }
static protected void addBinding(BindingMap binding, Var var, Node value) { Node n = binding.get(var); if ( n != null ) { // Same - silently skip. if ( n.equals(value) ) return; Log.warn(ResultsStAX.class, String.format("Multiple occurences of a binding for variable '%s' with different values - ignored", var.getName())); return; } binding.add(var, value); }
/** Parse a string to get one Node (the first token in the string) */ public static Node parse(String string) { Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(string); if ( ! tokenizer.hasNext() ) return null; Token t = tokenizer.next(); Node n = profile.create(null, t); if ( tokenizer.hasNext() ) Log.warn(RiotLib.class, "String has more than one token in it: "+string); return n; }
@Before public void before() { try { graph.clear() ; } catch (Exception ex) { Log.warn(this, "before() : "+ex.getMessage(), ex) ; // Problem - reset. beforeClass() ; } }
public static void visit(RDF_StreamRow row, VisitorStreamRowTRDF visitor) { if ( row.isSetTriple() ) { visitor.visit(row.getTriple()) ; } else if ( row.isSetQuad() ) { visitor.visit(row.getQuad()) ; } else if ( row.isSetPrefixDecl() ) { visitor.visit(row.getPrefixDecl()) ; } else { Log.warn(ThriftConvert.class, "visit: Unrecognized: "+row) ; } }