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mcmFtZXdvcmsuQnVuZGxlQWN0aXZhdG9yI3N0YXJ0KG9yZy5vc2dpLmZyYW1ld29yay5CdW5kbGVDb250ZXh0KQ0KKyAgICAgKi8NCisgICAgcHVibGljIGZpbmFsIHZvaWQgc3RhcnQoQnVuZGxlQ29udGV4dCBjb250ZXh0KSB0aHJvd3MgRXhjZXB0aW9uDQorICAgIHsNCisgICAgICAgIHRoaXMuY29udGV4dCA9IGNvbnRleHQ7DQorICAgICAgICB0aGlzLnRyYWNrZXIgPSBuZXcgU2VydmljZVRyYWNrZXIoY29udGV4dCwgVXNlckFkbWluLmNsYXNzLmdldE5hbWUoKSwgdGhpcyk7DQorICAgICAgICB0aGlzLnRyYWNrZXIub3BlbigpOw0KKyAgICB9DQorDQorICAgIC8qKg0KKyAgICAgKiBAc2VlIG9yZy5vc2dpLmZyYW1ld29yay5CdW5kbGVBY3RpdmF0b3Ijc3RvcChvcmcub3NnaS5mcmFtZXdvcmsuQnVuZGxlQ29udGV4dCkNCisgICAgICovDQorICAgIHB1YmxpYyBmaW5hbCB2b2lkIHN0b3AoQnVuZGxlQ29udGV4dCBjb250ZXh0KSB0aHJvd3MgRXhjZXB0aW9uDQorICAgIHsNCisgICAgICAgIGlmICh0cmFja2VyICE9IG51bGwpDQorICAgICAgICB7DQorICAgICAgICAgICAgdHJhY2tlci5jbG9zZSgpOw0KKyAgICAgICAgICAgIHRyYWNrZXIgPSBudWxsOw0KKyAgICAgICAgfQ0KKyAgICB9DQorDQorICAgIC8vIC0gYmVnaW4gdHJhY2tlcg0KKyAgICAvKioNCisgICAgICogQHNlZSBvcmcub3NnaS51dGlsLnRyYWNrZXIuU2VydmljZVRyYWNrZXJDdXN0b21pemVyI21vZGlmaWVkU2VydmljZShvcmcub3NnaS5mcmFtZXdvcmsuU2VydmljZVJlZmVyZW5jZSwNCisgICAgICogICAgICBqYXZhLmxhbmcuT2JqZWN0KQ0KKyAgICAgKi8NCisgICAgcHVibGljIGZpbmFsIHZvaWQgbW9kaWZpZWRTZXJ2aWNlKFNlcnZpY2VSZWZlcmVuY2UgcmVmZXJlbmNlLCBPYmplY3Qgc2VydmljZSkNCisgICAgey8qIHVudXNlZCAqLw0KKyAgICB9DQorDQorICAgIC8qKg0KKyAgICAgKiBAc2VlIG9yZy5vc2dpLnV0aWwudHJhY2tlci5TZXJ2aWNlVHJhY2tlckN1c3RvbWl6ZXIjYWRkaW5nU2VydmljZShvcmcub3NnaS5mcmFtZXdvcmsuU2VydmljZVJlZmVyZW5jZSkNCisgICAgICovDQorICAgIHB1YmxpYyBmaW5hbCBPYmplY3QgYWRkaW5nU2VydmljZShTZXJ2aWNlUmVmZXJlbmNlIHJlZmVyZW5jZSkNCisgICAgew0KKyAgICAgICAgU2ltcGxlV2ViQ29uc29sZVBsdWdpbiBwbHVnaW4gPSB0aGlzLnBsdWdpbjsNCisgICAgICAgIGlmIChwbHVnaW4gPT0gbnVsbCkNCisgICAgICAgIHsNCisgICAgICAgICAgICBmaW5hbCBVc2VyQWRtaW4gc2VydmljZSA9IChVc2VyQWRtaW4pIGNvbnRleHQuZ2V0U2VydmljZShyZWZlcmVuY2UpOw0KKyAgICAgICAgICAgIHRoaXMucGx1Z2luID0gbmV3IFdlYkNvbnNvbGVQbHVnaW4oc2VydmljZSkucmVnaXN0ZXIoY29udGV4dCk7DQorICAgICAgICAgICAgLy8gICAgICAgICAgICBwcmludGVyUmVnaXN0cmF0aW9uID0gY29udGV4dC5yZWdpc3RlclNlcnZpY2UoQ29uZmlndXJhdGlvblByaW50ZXIuU0VSVklDRSwNCisgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICBuZXcgQ29tcG9uZW50Q29uZmlndXJhdGlvblByaW50ZXIoc2VydmljZSksIG51bGwpOw0KKyAgICAgICAgfQ0KKw0KKyAgICAgICAgcmV0dXJuIGNvbnRleHQuZ2V0U2VydmljZShyZWZlcmVuY2UpOw0KKyAgICB9DQorDQorICAgIC8qKg0KKyAgICAgKiBAc2VlIG9yZy5vc2dpLnV0aWwudHJhY2tlci5TZXJ2aWNlVHJhY2tlckN1c3RvbWl6ZXIjcmVtb3ZlZFNlcnZpY2Uob3JnLm9zZ2kuZnJhbWV3b3JrLlNlcnZpY2VSZWZlcmVuY2UsDQorICAgICAqICAgICAgamF2YS5sYW5nLk9iamVjdCkNCisgICAgICovDQorICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJlbW92ZWRTZXJ2aWNlKFNlcnZpY2VSZWZlcmVuY2UgcmVmZXJlbmNlLCBPYmplY3Qgc2VydmljZSkNCisgICAgew0KKyAgICAgICAgU2ltcGxlV2ViQ29uc29sZVBsdWdpbiBwbHVnaW4gPSB0aGlzLnBsdWdpbjsNCisNCisgICAgICAgIGlmICh0cmFja2VyLnNpemUoKSA8PSAxICYmIHBsdWdpbiAhPSBudWxsKQ0KKyAgICAgICAgew0KKyAgICAgICAgICAgIC8vIHJlbW92ZSBzZXJ2aWNlDQorICAgICAgICAgICAgcGx1Z2luLnVucmVnaXN0ZXIoKTsNCisgICAgICAgICAgICB0aGlzLnBsdWdpbiA9IG51bGw7DQorICAgICAgICAgICAgLy8gdW5yZWdpc3RlciBjb25maWd1cmF0aW9uIHByaW50ZXIgdG9vDQorICAgICAgICAgICAgU2VydmljZVJlZ2lzdHJhdGlvbiByZWcgPSBwcmludGVyUmVnaXN0cmF0aW9uOw0KKyAgICAgICAgICAgIGlmIChyZWcgIT0gbnVsbCkNCisgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgIHJlZy51bnJlZ2lzdGVyKCk7DQorICAgICAgICAgICAgICAgIHByaW50ZXJSZWdpc3RyYXRpb24gPSBudWxsOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgIH0NCisNCisgICAgfQ0KK30NCmRpZmYgLS1naXQgYS93ZWJjb25zb2xlLXBsdWdpbnMvdXNlcmFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9mZWxpeC93ZWJjb25zb2xlL3BsdWdpbnMvdXNlcmFkbWluL2ludGVybmFsL1d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ICAgICAgICAgICAgIGZpbmFsIEdyb3VwIHhncm91cCA9IChHcm91cCkgdXNlckFkbWluLmdldFJvbGUoZ3JvdXApOw0KKyAgICAgICAgICAgICAgICB4Z3JvdXAuYWRkUmVxdWlyZWRNZW1iZXIoeHJvbGUpOw0KKyAgICAgICAgICAgICAgICB0b0pTT04oancsIHhncm91cCwgZmFsc2UpOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgICAgICBlbHNlIGlmICgicmVtb3ZlTWVtYmVyIi5lcXVhbHMoYWN0aW9uKSkgeyAvLyROT04tTkxTLTEkDQorICAgICAgICAgICAgICAgIGZpbmFsIFJvbGUgeHJvbGUgPSB1c2VyQWRtaW4uZ2V0Um9sZShyb2xlKTsNCisgICAgICAgICAgICAgICAgZmluYWwgR3JvdXAgeGdyb3VwID0gKEdyb3VwKSB1c2VyQWRtaW4uZ2V0Um9sZShncm91cCk7DQorICAgICAgICAgICAgICAgIHhncm91cC5yZW1vdmVNZW1iZXIoeHJvbGUpOw0KKyAgICAgICAgICAgICAgICB0b0pTT04oancsIHhncm91cCwgZmFsc2UpOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgICAgICBlbHNlIGlmICgiZGVsIi5lcXVhbHMoYWN0aW9uKSkgeyAvLyROT04tTkxTLTEkDQorICAgICAgICAgICAgICAgIG91dC5wcmludCh1c2VyQWRtaW4ucmVtb3ZlUm9sZShyb2xlKSk7DQorICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgIGVsc2UgaWYgKCJnZXQiLmVxdWFscyhhY3Rpb24pKSB7IC8vJE5PTi1OTFMtMSQNCisgICAgICAgICAgICAgICAgZmluYWwgUm9sZSB4cm9sZSA9IHVzZXJBZG1pbi5nZXRSb2xlKHJvbGUpOw0KKyAgICAgICAgICAgICAgICB0b0pTT04oancsIHhyb2xlLCB0cnVlKTsNCisgICAgICAgICAgICB9DQorICAgICAgICAgICAgZWxzZSBpZiAoInNldCIuZXF1YWxzKGFjdGlvbikpIHsgLy8kTk9OLU5MUy0xJA0KKyAgICAgICAgICAgICAgICBmaW5hbCBTdHJpbmcgZGF0YVJhdyA9IHJlcS5nZXRQYXJhbWV0ZXIoImRhdGEiKTsgLy8kTk9OLU5MUy0xJA0KKyAgICAgICAgICAgICAgICBmaW5hbCBKU09OT2JqZWN0IGRhdGEgPSBuZXcgSlNPTk9iamVjdChkYXRhUmF3KTsNCisgICAgICAgICAgICAgICAgUm9sZSB4cm9sZSA9IHVzZXJBZG1pbi5nZXRSb2xlKGRhdGEuZ2V0U3RyaW5nKCJuYW1lIikpOyAvLyROT04tTkxTLTEkDQorICAgICAgICAgICAgICAgIGlmIChudWxsID09IHhyb2xlKQ0KKyAgICAgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgICAgICB4cm9sZSA9IHVzZXJBZG1pbi5jcmVhdGVSb2xlKC8vDQorICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXRTdHJpbmcoIm5hbWUiKSwgLy8kTk9OLU5MUy0xJA0KKyAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuZ2V0SW50KCJ0eXBlIikpOyAvLyROT04tTkxTLTEkDQorICAgICAgICAgICAgICAgIH0NCisgICAgICAgICAgICAgICAgZG9TZXREYXRhKHhyb2xlLCBkYXRhKTsNCisgICAgICAgICAgICAgICAgb3V0LnByaW50KHRydWUpOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgICAgICBlbHNlDQorICAgICAgICAgICAgLy8gbGlzdCBhbGwgcm9sZXMgd2l0aG91dCBkZXRhaWxzDQorICAgICAgICAgICAgew0KKw0KKyAgICAgICAgICAgICAgICBSb2xlW10gcm9sZXMgPSB1c2VyQWRtaW4uZ2V0Um9sZXMobnVsbCk7DQorICAgICAgICAgICAgICAgIHRvSlNPTihqdywgcm9sZXMsIGZhbHNlKTsNCisgICAgICAgICAgICB9DQorICAgICAgICB9DQorICAgICAgICBjYXRjaCAoRXhjZXB0aW9uIGUpDQorICAgICAgICB7DQorICAgICAgICAgICAgdGhyb3cgbmV3IFNlcnZsZXRFeGNlcHRpb24oZSk7DQorICAgICAgICB9DQorICAgIH0NCisNCisgICAgcHJpdmF0ZSBzdGF0aWMgZmluYWwgdm9pZCBkb1NldERhdGEoUm9sZSByb2xlLCBKU09OT2JqZWN0IGRhdGEpIHRocm93cyBKU09ORXhjZXB0aW9uDQorICAgIHsNCisgICAgICAgIHB1dFByb3BzKHJvbGUuZ2V0UHJvcGVydGllcygpLCBkYXRhLm9wdEpTT05PYmplY3QoInByb3BlcnRpZXMiKSk7IC8vJE5PTi1OTFMtMSQNCisgICAgICAgIGlmIChyb2xlIGluc3RhbmNlb2YgVXNlcikNCisgICAgICAgIHsNCisgICAgICAgICAgICBwdXRQcm9wcygoKFVzZXIpIHJvbGUpLmdldENyZWRlbnRpYWxzKCksIGRhdGEub3B0SlNPTk9iamVjdCgiY3JlZGVudGlhbHMiKSk7IC8vJE5PTi1OTFMtMSQNCisgICAgICAgIH0NCisgICAgfQ0KKw0KKyAgICBwcml2YXRlIHN0YXRpYyBmaW5hbCB2b2lkIHB1dFByb3BzKERpY3Rpb25hcnkgZGVzdCwgSlNPTk9iamVjdCBwcm9wcykNCisgICAgICAgIHRocm93cyBKU09ORXhjZXB0aW9uDQorICAgIHsNCisgICAgICAgIC8vIGNsZWFyIHRoZSBvbGQgcHJvcGVydGllcw0KKyAgICAgICAgaWYgKCFkZXN0LmlzRW1wdHkoKSkNCisgICAgICAgIHsNCisgICAgICAgICAgICBmb3IgKEVudW1lcmF0aW9uIGUgPSBkZXN0LmtleXMoKTsgZS5oYXNNb3JlRWxlbWVudHMoKTspDQorICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICBkZXN0LnJlbW92ZShlLm5leHRFbGVtZW50KCkpOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgIH0NCisgICAgICAgIC8vIGl0J3MgZW1wdHkgLSBkb24ndCBwcm9jZXNzIGl0IGF0IGFsbA0KKyAgICAgICAgaWYgKHByb3BzID09IG51bGwgfHwgcHJvcHMubGVuZ3RoKCkgPT0gMCkNCisgICAgICAgIHsNCisgICAgICAgICAgICByZXR1cm47DQorICAgICAgICB9DQorICAgICAgICAvLyBhcHBlbmQgdGhlIG5ldyBvbmUNCisgICAgICAgIGZvciAoSXRlcmF0b3IgaSA9IHByb3BzLmtleXMoKTsgaS5oYXNOZXh0KCk7KQ0KKyAgICAgICAgew0KKyAgICAgICAgICAgIE9iamVjdCBrZXkgPSBpLm5leHQoKTsNCisgICAgICAgICAgICBPYmplY3QgdmFsID0gcHJvcHMuZ2V0KChTdHJpbmcpIGtleSk7DQorDQorICAgICAgICAgICAgaWYgKHZhbCBpbnN0YW5jZW9mIEpTT05BcnJheSkNCisgICAgICAgICAgICB7DQorICAgICAgICAgICAgICAgIHZhbCA9IHRvQXJyYXkoKEpTT05BcnJheSkgdmFsKTsNCisgICAgICAgICAgICB9DQorICAgICAgICAgICAgZGVzdC5wdXQoa2V5LCB2YWwpOw0KKyAgICAgICAgfQ0KKyAgICB9DQorDQorICAgIHByaXZhdGUgc3RhdGljIGZpbmFsIGJ5dGVbXSB0b0FycmF5KEpTT05BcnJheSBhcnJheSkgdGhyb3dzIEpTT05FeGNlcHRpb24NCisgICAgew0KKyAgICAgICAgZmluYWwgYnl0ZVtdIHJldCA9IG5ldyBieXRlW2FycmF5Lmxlbmd0aCgpXTsNCisgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgcmV0Lmxlbmd0aDsgaSsrKQ0KKyAgICAgICAgew0KKyAgICAgICAgICAgIHJldFtpXSA9IChieXRlKSAoYXJyYXkuZ2V0SW50KGkpICYgMHhmZik7DQorICAgICAgICB9DQorICAgICAgICByZXR1cm4gcmV0Ow0KKyAgICB9DQorDQorICAgIHByaXZhdGUgc3RhdGljIGZpbmFsIHZvaWQgdG9KU09OKEpTT05Xcml0ZXIgancsIFJvbGUgcm9sZSwgYm9vbGVhbiBkZXRhaWxzKQ0KKyAgICAgICAgdGhyb3dzIEpTT05FeGNlcHRpb24NCisgICAgew0KKyAgICAgICAgancub2JqZWN0KCk7DQorICAgICAgICBqdy5rZXkoInR5cGUiKTsgLy8kTk9OLU5MUy0xJA0KKyAgICAgICAgancudmFsdWUocm9sZS5nZXRUeXBlKCkpOw0KKyAgICAgICAgancua2V5KCJuYW1lIik7IC8vJE5PTi1OTFMtMSQNCisgICAgICAgIGp3LnZhbHVlKHJvbGUuZ2V0TmFtZSgpKTsNCisNCisgICAgICAgIGlmIChyb2xlIGluc3RhbmNlb2YgR3JvdXApDQorICAgICAgICB7DQorICAgICAgICAgICAgZmluYWwgR3JvdXAgZ3JvdXAgPSAoR3JvdXApIHJvbGU7DQorICAgICAgICAgICAgUm9sZVtdIHJvbGVzOw0KKw0KKyAgICAgICAgICAgIHJvbGVzID0gZ3JvdXAuZ2V0TWVtYmVycygpOw0KKyAgICAgICAgICAgIGlmIChudWxsICE9IHJvbGVzICYmIHJvbGVzLmxlbmd0aCA+IDApDQorICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICBqdy5rZXkoIm1lbWJlcnMiKTsgLy8kTk9OLU5MUy0xJA0KKyAgICAgICAgICAgICAgICB0b0pTT04oancsIHJvbGVzLCBkZXRhaWxzKTsNCisgICAgICAgICAgICB9DQorDQorICAgICAgICAgICAgcm9sZXMgPSBncm91cC5nZXRSZXF1aXJlZE1lbWJlcnMoKTsNCisgICAgICAgICAgICBpZiAobnVsbCAhPSByb2xlcyAmJiByb2xlcy5sZW5ndGggPiAwKQ0KKyAgICAgICAgICAgIHsNCisgICAgICAgICAgICAgICAgancua2V5KCJybWVtYmVycyIpOyAvLyROT04tTkxTLTEkDQorICAgICAgICAgICAgICAgIHRvSlNPTihqdywgcm9sZXMsIGRldGFpbHMpOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgIH0NCisNCisgICAgICAgIGlmIChkZXRhaWxzKQ0KKyAgICAgICAgew0KKyAgICAgICAgICAgIERpY3Rpb25hcnkgcDsNCisgICAgICAgICAgICBwID0gcm9sZS5nZXRQcm9wZXJ0aWVzKCk7DQorICAgICAgICAgICAgaWYgKG51bGwgIT0gcCAmJiAhcC5pc0VtcHR5KCkpDQorICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICBqdy5rZXkoInByb3BlcnRpZXMiKTsgLy8kTk9OLU5MUy0xJA0KKyAgICAgICAgICAgICAgICB0b0pTT04oancsIHApOw0KKyAgICAgICAgICAgIH0NCisgICAgICAgICAgICBpZiAocm9sZSBpbnN0YW5jZW9mIFVzZXIpDQorICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICBwID0gKChVc2VyKSByb2xlKS5nZXRDcmVkZW50aWFscygpOw0KKyAgICAgICAgICAgICAgICBpZiAobnVsbCAhPSBwICYmICFwLmlzRW1wdHkoKSkNCisgICAgICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICAgICAgancua2V5KCJjcmVkZW50aWFscyIpOyAvLyROT04tTkxTLTEkDQorICAgICAgICAgICAgICAgICAgICB0b0pTT04oancsIHApOw0KKyAgICAgICAgICAgICAgICB9DQorICAgICAgICAgICAgfQ0KKyAgICAgICAgfQ0KKw0KKyAgICAgICAgancuZW5kT2JqZWN0KCk7DQorICAgIH0NCisNCisgICAgcHJpdmF0ZSBzdGF0aWMgZmluYWwgdm9pZCB0b0pTT04oSlNPTldyaXRlciBqdywgRGljdGlvbmFyeSBwcm9wcykNCisgICAgICAgIHRocm93cyBKU09ORXhjZXB0aW9uDQorICAgIHsNCisgICAgICAgIGp3Lm9iamVjdCgpOw0KKyAgICAgICAgZm9yIChFbnVtZXJhdGlvbiBlID0gcHJvcHMua2V5cygpOyBlLmhhc01vcmVFbGVtZW50cygpOykNCisgICAgICAgIHsNCisgICAgICAgICAgICBmaW5hbCBPYmplY3Qga2V5ID0gZS5uZXh0RWxlbWVudCgpOw0KKyAgICAgICAgICAgIGZpbmFsIE9iamVjdCB2YWwgPSBwcm9wcy5nZXQoa2V5KTsNCisgICAgICAgICAgICBqdy5rZXkoKFN0cmluZykga2V5KTsNCisgICAgICAgICA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