mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.9.2.1'
This commit is contained in:
@@ -27,7 +27,7 @@ public class Imglnk_bldr_cmd extends Xob_sql_dump_base implements Sql_file_parse
|
||||
@Override public String Sql_file_name() {return "imagelinks";}
|
||||
|
||||
@Override public void Cmd_bgn_hook(Xob_bldr bldr, Sql_file_parser parser) {
|
||||
parser.Fld_cmd_(this).Flds_req_idx_(3, 0, 1);
|
||||
parser.Save_csv_n_().Fld_cmd_(this).Flds_req_idx_(3, 0, 1);
|
||||
mgr = new Imglnk_bldr_mgr(wiki);
|
||||
}
|
||||
public void Exec(byte[] src, byte[] fld_key, int fld_idx, int fld_bgn, int fld_end, Bry_bfr file_bfr, Sql_file_parser_data data) {
|
||||
|
||||
@@ -62,15 +62,15 @@ public class Xof_orig_wkr__img_links implements Xof_orig_wkr {
|
||||
hash.Add(itm.Ttl(), itm);
|
||||
}
|
||||
private Xof_orig_itm Load_from_db(byte[] ttl) {
|
||||
if (imglnk_conn == null)
|
||||
imglnk_conn = Xob_db_file.New__img_link(wiki).Conn();
|
||||
Xof_orig_itm rv = Xof_orig_wkr__img_links_.Load_itm(this, imglnk_conn, wiki, ttl);
|
||||
if (rv == Xof_orig_itm.Null)
|
||||
rv = Missing;
|
||||
synchronized (hash) { // LOCK:used by multiple threads in xomp
|
||||
synchronized (hash) { // LOCK:orig_wkr is shared by multiple threads; NullPointerException on statement sometimes when concurrent; DATE:2016-09-03
|
||||
if (imglnk_conn == null)
|
||||
imglnk_conn = Xob_db_file.New__img_link(wiki).Conn();
|
||||
Xof_orig_itm rv = Xof_orig_wkr__img_links_.Load_itm(this, imglnk_conn, wiki, ttl);
|
||||
if (rv == Xof_orig_itm.Null)
|
||||
rv = Missing;
|
||||
hash.Add(ttl, rv);
|
||||
return rv;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
private static final Xof_orig_itm Missing = new Xof_orig_itm(Byte_.Max_value_127, Bry_.Empty, -1, -1, -1, Bry_.Empty);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user