ZGlmZiAtLWdpdCBhL2Vudi8uZ2l0aWdub3JlIGIvZW52Ly5naXRpZ25vcmUKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uY2Y4NTIwNwotLS0gL2Rldi9udWxsCisrKyBiL2Vudi8uZ2l0aWdub3JlCkBAIC0wLDAgKzEsNSBAQAorL2Jpbi8KKy90YXJnZXQvCisvLmNsYXNzcGF0aAorLy5wcm9qZWN0Cisuc2V0dGluZ3MKZGlmZiAtLWdpdCBhL2Vudi9wb20ueG1sIGIvZW52L3BvbS54bWwKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNmQ4N2ZlZQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9wb20ueG1sCkBAIC0wLDAgKzEsMTI5IEBACis8IS0tDQorICA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAgKiBvcmcub25hcC5hYWkNCisgICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAgKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAgKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICAqIF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cHM6Ly9vc3Muc29uYXR5cGUub3JnL3NlcnZpY2UvbG9jYWwvc3RhZ2luZy9kZXBsb3kvbWF2ZW4yLzwvdXJsPg0KKyAgICAJCTwvcmVwb3NpdG9yeT4NCisJPC9kaXN0cmlidXRpb25NYW5hZ2VtZW50Pg0KKwkNCisJPHNjbT4NCisJCTxjb25uZWN0aW9uPmh0dHBzOi8vZ2l0aHViLmNvbS9hdHQvQUFGLmdpdDwvY29ubmVjdGlvbj4NCisJCTxkZXZlbG9wZXJDb25uZWN0aW9uPiR7cHJvamVjdC5zY20uY29ubmVjdGlvbn08L2RldmVsb3BlckNvbm5lY3Rpb24+DQorCQk8dXJsPmh0dHA6Ly9naXRodWIuY29tL2F0dC9BQUYvdHJlZS9tYXN0ZXI8L3VybD4NCisJPC9zY20+DQorPC9wcm9qZWN0Pg0KKw0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvQVBJRXhjZXB0aW9uLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0FQSUV4Y2VwdGlvbi5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjNiNTI0MmEKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0FQSUV4Y2VwdGlvbi5qYXZhCkBAIC0wLDAgKzEsOTAgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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J5LmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0Jhc2VEYXRhRmFjdG9yeS5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjM5NDc0NDEKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0Jhc2VEYXRhRmFjdG9yeS5qYXZhCkBAIC0wLDAgKzEsNDYzIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0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mF2YWRvYykNCisvLwkJICogQHNlZSBjb20uYXR0LmVudi5PYmplY3RpZmllciNuZXdPYmplY3QoKQ0KKy8vCQkgKi8NCisvLwkJcHVibGljIERvdWJsZSBuZXdJbnN0YW5jZSgpIHRocm93cyBBUElFeGNlcHRpb24gew0KKy8vCQkJcmV0dXJuIDAuMDsNCisvLwkJfQ0KKy8vCX0NCisNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9DcmVhdGFibGUuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvQ3JlYXRhYmxlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uY2NlOTg5OAotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvQ3JlYXRhYmxlLmphdmEKQEAgLTAsMCArMSw1MyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAq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veShFbnYgZW52KTsNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9EYXRhLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0RhdGEuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yMjFiZjdlCi0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9EYXRhLmphdmEKQEAgLTAsMCArMSwxMTQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQoraW1wb3J0IGphdmEuaW8uSU9FeGNlcHRpb247DQoraW1wb3J0IGphdmEuaW8uSW5wdXRTdHJlYW07DQoraW1wb3J0IGphdmEuaW8uT3V0cHV0U3RyZWFtOw0KK2ltcG9ydCBqYXZhLmlvLlJlYWRlcjsNCitpbXBvcnQgamF2YS5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vbnMgdW5kZXIgdGhlIExpY2Vuc2UuDQorICogKiA9PT09PT09PT09PT1MSUNFTlNFX0VORD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqDQorICogKiBFQ09NUCBpcyBhIHRyYWRlbWFyayBhbmQgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5pbm5vLmVudjsNCisNCisNCitwdWJsaWMgaW50ZXJmYWNlIERhdGFGYWN0b3J5PFQ+IHsNCisJcHVibGljIGFic3RyYWN0IERhdGE8VD4gbmV3RGF0YSgpOw0KKwlwdWJsaWMgYWJzdHJhY3QgRGF0YTxUPiBuZXdEYXRhKEVudiB0cmFucyk7IC8vIGFuZCBFbnYgb3IgVHJhbnMgb2JqZWN0DQorCXB1YmxpYyBhYnN0cmFjdCBDbGFzczxUPiBnZXRUeXBlQ2xhc3MoKTsNCit9DQorDQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9EZWNyeXB0b3IuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvRGVjcnlwdG9yLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYWJhYmUzNwotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvRGVjcnlwdG9yLmphdmEKQEAgLTAsMCArMSwzNiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAqIC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CkBAIC0wLDAgKzEsMzYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUy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MDAwMDAuLjQwNzhmYzYKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0Vudi5qYXZhCkBAIC0wLDAgKzEsMTM3IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdy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Qcm9wZXJ0eShTdHJpbmcgdGFnLCBTdHJpbmcgZGVmbHQpOw0KKwkNCisJLyoqDQorCSAqIFBhc3N3b3JkcyBzaG91bGQgYmUgZW5jcnlwdGVkIG9uIHRoZSBkaXNrLiAgVXNlIHRoaXMgbWV0aG9kIHRvIGFwcGx5IGRlY3J5cHRpb24gYmVmb3JlDQorCSAqIHVzaW5nLiAgVGhlIEltcGxlbWVudGF0aW9uIHNob3VsZCBnaXZlIHdheXMgdG8gZGVjcnlwdA0KKwkgKiANCisJICogQHBhcmFtIHRhZw0KKwkgKiBAcmV0dXJuDQorCSAqLw0KKwlwdWJsaWMgRGVjcnlwdG9yIGRlY3J5cHRvcigpOw0KKwkNCisJcHVibGljIEVuY3J5cHRvciBlbmNyeXB0b3IoKTsNCisNCit9DQorDQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9FbnZKQVhCLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0VudkpBWEIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yYWVmMTlmCi0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9FbnZKQVhCLmphdmEKQEAgLTAsMCArMSw1NCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEF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Qgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5pbm5vLmVudjsNCisNCisvKioNCisgKiBBbiBpbnRlcmZhY2UgdG8gZXhwcmVzcyBib3RoIEpBWEIgYW5kIFByb3BlcnR5IGVsZW1lbnRzIG9mIEVudg0KKyAqDQorICovDQorcHVibGljIGludGVyZmFjZSBFbnZKQVhCUHJvcHMgZXh0ZW5kcyBFbnZKQVhCLCBFbnZQcm9wcyB7DQorDQorfQ0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvRW52UHJvcHMuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvRW52UHJvcHMuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5hNzgwMWM5Ci0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9FbnZQcm9wcy5qYXZhCkBAIC0wLDAgKzEsODIgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQoraW1wb3J0IGphdmEudXRpbC5NYXA7DQorDQorcHVibGljIGludGVyZmFjZSBFbnZQcm9wcyBleHRlbmRzIEVudiB7DQorCXB1YmxpYyBpbnRlcmZhY2UgRW52UHJvcGVydHkgew0KKwkJcHVibGljIFN0cmluZyBnZXRQcm9wZXJ0eShTdHJpbmcgaW5wdXQpOw0KKwl9Ow0KKw0KKwkvKioNCisJICogT2J0YWluIGEgUHJvcGVydHkgKFN0cmluZykgYmFzZWQgb24gYSBLZXkuICBJbXBsZW1lbnRvciBkZWNpZGVzIGhvdw0KKwkgKiB0aGF0IHdvcmtzLCBpLmUuIGZyb20gYSBjb21wbGV4IHNldCBvZiBDb25maWd1cmF0aW9ucywgb3IganVzdCANCisJICogIlN5c3RlbSIgKEphdmEgc3RhbmRhcmQpDQorCSAqIA0KKwkgKiBAcGFyYW0ga2V5DQorCSAqIEByZXR1cm4gQVBJRXhjZXB0aW9uDQorCSAqLw0KKwlwdWJsaWMgU3RyaW5nIGdldFByb3BlcnR5KFN0cmluZyBrZXkpOw0KKw0KKwkvKioNCisJICogT2J0YWluIGEgUHJvcGVydHkgKFN0cmluZykgYmFzZWQgb24gYSBLZXkuICBJbXBsZW1lbnRvciBkZWNpZGVzIGhvdw0KKwkgKiB0aGF0IHdvcmtzLCBpLmUuIGZyb20gYSBjb21wbGV4IHNldCBvZiBDb25maWd1cmF0aW9ucywgb3IganVzdCANCisJICogIlN5c3RlbSIgKEphdmEgc3RhbmRhcmQpDQorCSAqIA0KKwkgKiBJZiBQcm9wZXJ0eSBWYWx1ZSBpcy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LCBTdHJpbmc+IGdldFN1YlByb3BlcnRpZXMoU3RyaW5nIGtleSwgYm9vbGVhbiBpbmNsdWRlUHJlZml4KTsNCisNCisJLyoqDQorCSAqIEdldCBhbGwgb2YgdGhlIHByb3BlcnRpZXMgaW4gdGhlIEVudmlyb25tZW50DQorCSAqIEByZXR1cm4NCisJICovDQorCXB1YmxpYyBNYXA8U3RyaW5nLCBTdHJpbmc+IGdldFByb3BlcnRpZXMoKTsNCisNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9FbnZTdG9yZS5qYXZhIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9FbnZTdG9yZS5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjE2Mjk3MTgKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0VudlN0b3JlLmphdmEKQEAgLTAsMCArMSwyOSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5pbm5vLmVudjsNCisNCisNCitwdWJsaWMgaW50ZXJmYWNlIEVudlN0b3JlPFRSQU5TIGV4dGVuZHMgVHJhbnM+IGV4dGVuZHMgRW52LCBTdG9yZSwgVHJhbnNDcmVhdGU8VFJBTlM+ew0KKw0KK30NCmRpZmYgLS1naXQgYS9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0lPT2JqZWN0aWZpZXIuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvSU9PYmplY3RpZmllci5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjZlMDAwMzEKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0lPT2JqZWN0aWZpZXIuamF2YQpAQCAtMCwwICsxLDU2IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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HkgcHJvY2Vzcy4NCisJICoNCisJICogQHBhcmFtIGVudg0KKwkgKiBAcGFyYW0gaW5wdXQNCisJICogQHJldHVybiBUDQorCSAqIEB0aHJvd3MgQVBJRXhjZXB0aW9uDQorCSAqLw0KKwlwdWJsaWMgYWJzdHJhY3QgVCBvYmplY3RpZnkoRW52IGVudiwgSW5wdXRTdHJlYW0gaXMpIHRocm93cyBBUElFeGNlcHRpb247DQorDQorfQ0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvSU9TdHJpbmdpZmllci5qYXZhIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9JT1N0cmluZ2lmaWVyLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYmNjMTUzMAotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvSU9TdHJpbmdpZmllci5qYXZhCkBAIC0wLDAgKzEsNzYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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2YS9jb20vYXR0L2lubm8vZW52L0xpZmVDeWNsZS5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjM2ZjRkMzQKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L0xpZmVDeWNsZS5qYXZhCkBAIC0wLDAgKzEsMTI0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorLyoqDQorICoNCisgKiBDcmVhdGVkIG9uOiBBdWcgMTksIDIwMDkNCisgKiBDcmVhdGVkIGJ5Og0KKyAqDQorICogKGMpIDIwMDkgU0JDIEtub3dsZWRnZSBWZW50dXJlcywgTC5QLiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIA0KKyAqIFJFU1RSSUNURUQgLSBQUk9QUklFVEFSWSBJTkZPUk1BVElPTiBUaGUgSW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GFic3RyYWN0IHZvaWQgc2VydmljZURlc3Ryb3koRW52IGVudikgdGhyb3dzIEFQSUV4Y2VwdGlvbjsNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9Mb2dUYXJnZXQuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvTG9nVGFyZ2V0LmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMDNkZGZmOQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvTG9nVGFyZ2V0LmphdmEKQEAgLTAsMCArMSwxNDMgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQoraW1wb3J0IGphdmEuaW8uUHJpbnRTdHJlYW07DQoraW1wb3J0IGphdmEudXRpbC5EYXRlOw0KKw0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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisvKioNCisgKiANCisgKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQorDQorDQorLyoqDQorICogPGgxPk9iamVjdGlmaWVyPC9oMT4NCisgKiA8aT5PYmplY3RpZmllcjwvaT4gYWJzdHJhY3RzIHRoZSB1bm1hcnNoYWxpbmcgb2YgYW4gT2JqZWN0IGZyb20gYSBTdHJpbmcsIGFuZCANCisgKiB0aGUgY3JlYXRpb24gb2YgYW4gdW5pbml0aWFsaXplZCBvYmplY3QuIA0KKyAqLw0KK3B1YmxpYyBpbnRlcmZhY2UgT2JqZWN0aWZpZXI8VD4gZXh0ZW5kcyBMaWZlQ3ljbGUgew0KKwkvKioNCisJICogTWFyc2hhbCB0byBPYmplY3QgVCBmcm9tIGEgU3RyaW5nLCB1c2luZyBjb250ZW50cyBmcm9tIEVudiBhcyBuZWNlc3NhcnkuPHA+DQorCSAqIA0KKwkgKiBJbXBsZW1lbnRhdGlvbnMgc2hvdWxkIHVzZSB0aGUge0BsaW5rIEVudn0gdG8gY2Fs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PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorLyoqDQorICogU2xvdC5qYXZhDQorICoNCisgKiBDcmVhdGVkIG9uOiBEZWMgNSwgMjAwOA0KKyAqIENyZWF0ZWQgYnk6DQorICoNCisgKiAoYykgMjAwOCBTQkMgS25vd2xlZGdlIFZlbnR1cmVzLCBMLlAuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogDQorICogUkVTVFJJQ1RFRCAtIFBST1BSSUVUQVJZIElORk9STUFUSU9OIFRoZSBJbmZvcm1hdGlvbiBjb250YWluZWQgDQorICogaGVyZWluIGlzIGZvciB1c2Ugb25seSBieSBhdXRob3JpemVkIGVtcGxveWVlcyBvZiBBVCZUIFNlcnZpY2VzLCANCisgKiBJbmMuLCBhbmQgYXV0aG9yaXplZCBBZmZpbGlhdGVzIG9mIEFUJlQgU2VydmljZXMsIEluYy4sIGFuZCBpcyANCisgKiBub3QgZm9yIGdlbmVyYWwgZGlzdHJpYnV0aW9uIHdpdGhpbiBvciBvdXRzaWRlIHRoZSByZXNwZWN0aXZlIA0KKyAq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ioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAqICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZA0KKyAqICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuDQorICogKiA9PT09PT09PT09PT1MSUNFTlNFX0VORD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqDQorICogKiBFQ09NUCBpcyBhIHRyYWRlbWFyayBhbmQgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKy8qKg0KKyAqIFNsb3QuamF2YQ0KKyAqDQorICogQ3JlYXRlZCBvbjogRGVjIDUsIDIwMDgNCisgKiBDcmVhdGVkIGJ5Og0KKyAqDQorICogKGMpMjAwOCBTQkMgS25vd2xlZGdlIFZlbnR1cmVzLCBMLlAuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogDQorICogUkVTVFJJQ1RFRCAtIFBST1BSSUVUQVJZIElORk9STUFUSU9OIFRoZSBJbmZvcm1hdGlvbiBjb250YWluZWQgDQorICogaGVyZWluIGlzIGZvciB1c2Ugb25seSBieSBhdXRob3JpemVkIGVtcGxveWVlcyBvZiBBVCZUIFNlcnZpY2VzLCANCisgKiBJbmMuLCBhbmQgYXV0aG9yaXplZCBBZmZpbGlhdGVzIG9mIEFUJlQgU2VydmljZXMsIEluYy4sIGFuZCBpcyANCisgKiBub3QgZm9yIGdlbmVyYWwgZGlzdHJpYnV0aW9uIHdpdGhpbiBvciBvdXRzaWRlIHRoZSByZXNw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DQorCSAqLw0KKwlwdWJsaWMgU3RyaW5nIHRvU3RyaW5nKCkgew0KKwkJcmV0dXJuIGtleSArICc9JyArIHNsb3Q7DQorCX0NCisJDQorCS8qKg0KKwkgKiBSZXR1cm5zIHRoZSBuYW1lIG9mIHRoaXMgU3RhdGljU2xvdCdzIGtleS4NCisJICogDQorCSAqIEByZXR1cm4NCisJICogCQkJVGhlIG5hbWUgb2YgdGhpcyBTdGF0aWNTbG90J3Mga2V5Lg0KKwkgKi8NCisJcHVibGljIFN0cmluZyBnZXRLZXkoKSB7DQorCQlyZXR1cm4ga2V5Ow0KKwl9DQorDQorfQ0KKw0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvU3RvcmUuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvU3RvcmUuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi41ZTRhNjYxCi0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9TdG9yZS5qYXZhCkBAIC0wLDAgKzEsMTEwIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgw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W5zZmVyKFN0cmluZyBhcmdzW10sIFN0cmluZyAuLi4gdGFnc3MpOw0KK30NCmRpZmYgLS1naXQgYS9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L1N0b3JlSW1wbC5qYXZhIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9TdG9yZUltcGwuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45ODg1OWM2Ci0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9TdG9yZUltcGwuamF2YQpAQCAtMCwwICsxLDIzOCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIH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dmEvY29tL2F0dC9pbm5vL2Vudi9TdHJpbmdpZmllci5qYXZhIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9TdHJpbmdpZmllci5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmNlMjcyODkKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L1N0cmluZ2lmaWVyLmphdmEKQEAgLTAsMCArMSw0NyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiAN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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQorLyoqDQorICogPGgxPlRpbWVUYWtlbjwvaDE+DQorICogVGhpcyBzaW1wbGUgaW50ZXJmYWNlIGFsbG93cyBmb3IgbWFueSBkaWZmZXJlbnQga2luZHMgb2YgDQorICogQXVkaXQgTG9ncyB0byBiZSBhY2NvbXBsaXNoZWQsIGJ5IGFzc3VtaW5nIHRoYXQgdGhlIGNyZWF0aW9uDQorICogb2YgdGhpcyBvYmplY3QgaW5kaWNhdGVzICJzdGFydCIsIGFuZCB0aGUgY2FsbGluZyBvZiAiZG9uZSIgDQorICogZW5kcy4NCisgKiANCisgKiBUaGUgaW1wbGVtZW50b3Igb2YgdGhpcyBjbGFzcyBjYW4gZWFzaWx5IGJlIHN0b3JlZCBpbiBlZmZpY2llbnQNCisgKiBtZWNoYW5pc21zIHRvIG1pbmltaXplIGltcGFjdCBvZiBBdWRpdGluZyBvbiBwZXJmb3JtYW5jZS4NCisgKiANCisgKg0KKyAqLw0KK3B1YmxpYyBhYnN0cmFjdCBjbGFzcyBUaW1lVGFrZW4gew0KKwlwdWJsaWMgZmluYWwgbG9uZyBzdGFydDsNCisJcHJvdGVjdGVkIGxvbmcgZW5kLCB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G9TdHJpbmcoKSB7DQorCQlyZXR1cm4gbmFtZSArICcgJyArIG1pbGxpcygpICsgIm1zICIgKyAoc2l6ZT4wP0xvbmcudG9TdHJpbmcoc2l6ZSk6IiIpOw0KKwl9DQorCQ0KK30JCQ0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvVHJhbnMuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvVHJhbnMuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4xMzhjYTkxCi0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9UcmFucy5qYXZhCkBAIC0wLDAgKzEsNzUgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQorDQorDQorDQorLyoqDQorICogQSBUcmFucyBpcyBsaWtl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2ludChTdHJpbmcgdGV4dCwgaW50IGFkZGl0aW9uYWxGbGFnKTsNCisNCisJLyoqDQorCSAqIE91dHB1dCBhbiBBdWRpdCBUcmFpbCBvbnRvIHRoZSBTdHJpbmdCdWlsZGVyDQorCSAqDQorCSAqIExvYWQgbWV0cmljcyBpbnRvIGFuIGFycmF5IG9mIGZsb2F0cyBmcm9tIHBhc3NlZCBpbiBGbGFncw0KKwkgKiANCisJICogQHBhcmFtIGZsYWcNCisJICogQHBhcmFtIHNiDQorCSAqIEByZXR1cm4JIA0KKwkgKi8NCisJcHVibGljIE1ldHJpYyBhdWRpdFRyYWlsKExvZ1RhcmdldCBsdCwgaW50IGluZGVudCwgU3RyaW5nQnVpbGRlciBzYiwgaW50IC4uLiBmbGFnKTsNCisNCisJcHVibGljIE1ldHJpYyBhdWRpdFRyYWlsKGludCBpbmRlbnQsIFN0cmluZ0J1aWxkZXIgc2IsIGludCAuLi4gZmxhZyk7DQorDQorCXB1YmxpYyBjbGFzcyBNZXRyaWMgew0KKwkJcHVibGljIGZsb2F0W10gYnVja2V0czsNCisJCXB1YmxpYyBmbG9hdCAgIHRvdGFsOw0KKwkJcHVibGljIGludCAgICAgZW50cmllczsNCisJfQ0KK30NCmRpZmYgLS1naXQgYS9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L1RyYW5zQ3JlYXRlLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L1RyYW5zQ3JlYXRlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uODA0YTg5ZQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvVHJhbnNDcmVhdGUuamF2YQpAQCAtMCwwICsxLDI4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorcGFja2FnZSBjb20uYXR0Lmlubm8uZW52Ow0KKw0KK3B1YmxpYyBpbnRlcmZhY2UgVHJhbnNDcmVhdGU8VFJBTlM+IHsNCisJcHVibGljIFRSQU5TIG5ld1RyYW5zKCk7DQorfQ0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvVHJhbnNKQVhCLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L1RyYW5zSkFYQi5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmFkOGJlYWUKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L1RyYW5zSkFYQi5qYXZhCkBAIC0wLDAgKzEsMjggQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQorcHVibGljIGludGVyZmFjZSBUcmFuc0pBWEIgZXh0ZW5kcyBUcmFucywgVHJhbnNTdG9yZSB7DQorDQorfQ0KZGlmZiAtLWdpdCBhL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvVHJhbnNTdG9yZS5qYXZhIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9UcmFuc1N0b3JlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYTFjZjZiNQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvVHJhbnNTdG9yZS5qYXZhCkBAIC0wLDAgKzEsNTkgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnY7DQorDQorcHVibGljIGludGVyZmFjZSBUcmFuc1N0b3JlIGV4dGVuZHMgVHJhbnMgew0KKwkvKioNCisJICogUmV0dXJucyB0aGUgU2xvdCBhc3NpZ25lZCB0byB0aGUgc3VwcGxpZWQgbmFtZS4NCisJICogDQorCSAqIEBwYXJhbSBuYW1lDQorCSAqIAkJCVRoZSBuYW1lIG9mIHRoZSBTbG90IHRvIGFjcXVpcmUuDQorCSAqIEByZXR1cm4NCisJICogCQkJVGhlIFNsb3QgYXNzb2NpYXRlZCB3aXRoIHRoZSBzdXBwbGllZCBuYW1lLg0KKwkgKi8NCisJcHVibGljIGFic3RyYWN0IFNsb3Qgc2xvdChTdHJpbmcgbmFtZSk7DQorCQ0KKwkvKioNCisJICogUHV0IGRhdGEgaW50byB0aGUgcmlnaHQgc2xvdCANCisJICovDQorCXB1YmxpYyB2b2lkIHB1dChTbG90IHNsb3QsIE9iamVjdCB2YWx1ZSk7DQorDQorCS8qKg0KKwkgKiAgR2V0IGRhdGEgZnJvbSB0aGUgcmlnaHQgc2xvdA0KKwkgKiAgDQorCSAqICBUaGlzIHdpbGwgZG8gYSBjYXN0IHRvIHRoZSBleHBlY3RlZCB0eXBlIGRlcml2ZWQgZnJvbSBEZWZhdWx0DQorCSAqLw0KKwlwdWJsaWM8VD4gVCBnZXQoU2xvdCBzbG90LCBUIGRlZmx0KTsNCisNCisJLyoqDQorCSAqIFJldHVybnMgYW4gT2JqZWN0IGZyb20gdGhlIE9yZ2FuaXplcidzIHN0YXRpYyBzdGF0ZSwgb3IgdGhlIERlZmF1bHQgaWYgbnVsbA0KKwkgKiANCisJICogQHBhcmFtIHNsb3QNCisJICogCQkJVGhlIFN0YXRpY1Nsb3QgdG8gcmV0cmlldmUgdGhlIGRhdGEgZnJvbS4NCisJICogQHJldHVybg0KKwkgKiAJCQlUaGUgT2JqZWN0IGxvY2F0ZWQgaW4gdGhlIHN1cHBsaWVkIFN0YXRpY1Nsb3Qgb2YgdGhlIE9yZ2FuaXplcidzIHN0YXRpYyBzdGF0ZS4NCisJICovDQorCXB1YmxpYyBhYnN0cmFjdDxUPiBUIGdldChTdGF0aWNTbG90IHNsb3QsIFQgZGZsdCk7DQorCQ0KK30NCmRpZmYgLS1naXQgYS9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2ltcGwvQWJzVHJhbnMuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvaW1wbC9BYnNUcmFucy5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjIzZjNjMDMKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2ltcGwvQWJzVHJhbnMuamF2YQpAQCAtMCwwICsxLDIxNiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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KwkJCS8vIEVudiBTdGF0ZSBTaXplIGhhcyBjaGFuZ2VkIGJlY2F1c2Ugb2YgZHluYW1pYyBPYmplY3QgY3JlYXRpb24uLi4gUmFyZSBldmVudCwgYnV0IG5lZWRzIHRvIGJlIGNvdmVyZWQNCisJCQlPYmplY3RbXSB0ZW1wID0gKChTdG9yZUltcGwpIGRlbGVnYXRlKS5uZXdUcmFuc1N0YXRlKCk7DQorCQkJU3lzdGVtLmFycmF5Y29weShzdGF0ZSwgMCwgdGVtcCwgMCwgc3RhdGUubGVuZ3RoKTsNCisJCQlzdGF0ZSA9IHRlbXA7DQorCQkJbz1udWxsOw0KKwkJfQ0KKwkJcmV0dXJuIG89PW51bGw/ZGVmbHQ6KFQpbzsNCisJfQ0KKw0KKw0KK30NCmRpZmYgLS1naXQgYS9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2ltcGwvQWJzVHJhbnNKQVhCLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2ltcGwvQWJzVHJhbnNKQVhCLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNWMxNTUwMAotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvaW1wbC9BYnNUcmFuc0pBWEIuamF2YQpAQCAtMCwwICsxLDU5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICog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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorcGFja2FnZSBjb20uYXR0Lmlubm8uZW52LmltcGw7DQorDQoraW1wb3J0IGphdmEuYXBwbGV0LkFwcGxldDsNCitpbXBvcnQgamF2YS5pby5CdWZmZXJlZFJlYWRlcjsNCitpbXBvcnQgamF2YS5pby5GaWxlOw0KK2ltcG9ydCBqYXZhLmlvLkZpbGVJbnB1dFN0cmVhbTsNCitpbXBvcnQgamF2YS5pby5JT0V4Y2VwdGlvbjsNCitpbXBvcnQgamF2YS5pby5JbnB1dFN0cmVhbTsNCitpbXBvcnQgamF2YS5pby5JbnB1dFN0cmVhbVJlYWRlcjsNCitpbXBvcnQgamF2YS51dGlsLlByb3BlcnRpZXM7DQorDQoraW1wb3J0IGphdmF4LnhtbC5uYW1lc3BhY2UuUU5hbWU7DQoraW1wb3J0IGphdmF4LnhtbC52YWxpZGF0aW9uLlNjaGVtYTsNCisNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi5BUElFeGNlcHRpb247DQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuRGF0YUZhY3Rvcnk7DQoraW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Skgew0KKwkJCQkJCQllcnJvcigpLmxvZyhlKTsNCisJCQkJCQl9DQorCQkJCQl9DQorCQkJCX0NCisJCQl9DQorCQl9DQorCX0NCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9pbXBsL0Jhc2ljVHJhbnMuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvaW1wbC9CYXNpY1RyYW5zLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYzM5MGNkNQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvaW1wbC9CYXNpY1RyYW5zLmphdmEKQEAgLTAsMCArMSw4MyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIp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qKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXI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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBX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2YQpAQCAtMCwwICsxLDExMSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gI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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJV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21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2pheGIvSkFYQkRGLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2pheGIvSkFYQkRGLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOTgxZjI1NwotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvamF4Yi9KQVhCREYuamF2YQpAQCAtMCwwICsxLDMxMSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0D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ioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZ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09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAqICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZA0KKyAqICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuDQorICogKiA9PT09PT09PT09PT1MSUNFTlNFX0VORD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqDQorICogKiBFQ09NUCBpcyBhIHRyYWRlbWFyayBhbmQgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5pbm5vLmVudi5qYXhiOw0KKw0KK2ltcG9ydCBqYXZhLmlvLklucHV0U3RyZWFtOw0KK2ltcG9ydCBqYXZhLmlvLlJlYWRlcjsNCisNCitpbXBvcnQgamF2YXgueG1sLmJpbmQuSkFYQkV4Y2VwdGlvbjsNCitpbXBvcnQgamF2YXgueG1sLnZhbGlkYXRpb24uU2NoZW1hOw0KKw0KK2ltcG9ydCBjb20uYXR0Lmlubm8uZW52LkFQSUV4Y2VwdGlvbjsNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi5FbnY7DQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuVGltZVRha2VuOw0KK2ltcG9ydCBjb20uYXR0Lmlubm8uZW52Lm9sZC5JT09iamVjdGlmaWVyOw0KKw0KKy8qKg0KKyAqIEFsbG93IEV4dGVuZGVkIElPIGludGVyZmFjZSB1c2FnZSB3aXRob3V0IG11ZGR5aW5nIHVwIHRoZSBTdHJpbmdpZmllciBJbnRlcmZhY2UNCisgKi8NCitwdWJsaWMgY2xhc3MgSkFYQk9iamVjdGlmaWVyPFQ+IGltcGxlbWVudHMgSU9PYmplY3RpZmllcjxUPiB7DQorCXByaXZhdGUgSkFYQnVtYXIganVtYXI7DQorDQorCXB1Ym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Y0NAppbmRleCAwMDAwMDAwLi5jNDdhMzkyCi0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9qYXhiL0pBWEJTdHJpbmdpZmllci5qYXZhCkBAIC0wLDAgKzEsMTM5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGlj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7DQorCX0NCisNCisJLy8gQE92ZXJyaWRlDQorCXB1YmxpYyBKQVhCU3RyaW5naWZpZXI8VD4gYXNGcmFnbWVudChib29sZWFuIGZyYWdtZW50KSB7DQorCQlqbWFyLmFzRnJhZ21lbnQoZnJhZ21lbnQpOw0KKwkJcmV0dXJuIHRoaXM7DQorCX0NCisNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9qYXhiL0pBWEJtYXIuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvamF4Yi9KQVhCbWFyLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uODZlM2M2NQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvamF4Yi9KQVhCbWFyLmphdmEKQEAgLTAsMCArMSwyNTQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZC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NCisvKioNCisgKiBKQVhCdW1hci5qYXZhDQorICoNCisgKiBDcmVhdGVkIG9uOiBBcHIgMTAsIDIwMDkNCisgKiBDcmVhdGVkIGJ5OiANCisgKg0KKyAqIFJldmFtcGVkIHRvIGRvIGF3YXkgd2l0aCBUaHJlYWRMb2NhbCA1LzI3LzIwMTEsDQorICoNCisgKiAoYykgMjAwOSBTQkMgS25vd2xlZGdlIFZlbnR1cmVzLCBMLlAuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogDQorICogUkVTVFJJQ1RFRCAtIFBST1BSSUVUQVJZIElORk9STUFUSU9OIFRoZSBJbmZvcm1hdGlvbiBjb250YWluZWQgDQorICogaGVyZWluIGlzIGZvciB1c2Ugb25seSBieSBhdXRob3JpemVkIGVtcGxveWVlcyBvZiBBVCZUIFNlcnZpY2VzLCANCisgKiBJbmMuLCBhbmQgYXV0aG9yaXplZCBBZmZpbGlhdGVzIG9mIEFUJlQgU2VydmljZXMsIEluYy4sIGFuZCBpcyANCisgKiBub3QgZm9yIGdlbmVyYWwgZGlzdHJpYnV0aW9uIHdpdGhpbiBvciBvdXRzaWRlIHRoZSByZXNwZWN0aXZlIA0KKyAqIGNvbXBhbmllcy4gDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnYuamF4YjsNCisNCitpbXBvcnQgamF2YS5pby5PdXRwdXRTdHJlYW07DQoraW1wb3J0IGphdmEuaW8uU3RyaW5nV3JpdGVyOw0KK2ltcG9ydCBqYXZhLmlvLldyaXRlcjsNCitpbXBvcnQgamF2YS51dGlsLkhhc2hNYXA7DQoraW1wb3J0IGphdmEudXRpbC5NYXA7DQorDQoraW1wb3J0IGphdmF4LnhtbC5iaW5kLkpBWE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pcy5mcmFnbWVudCA9IGZyYWdtZW50Ow0KKwkJcmV0dXJuIHRoaXM7DQorCX0NCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9qYXhiL0pBWEJ1bWFyLmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2pheGIvSkFYQnVtYXIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi41YjUzNDI5Ci0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9qYXhiL0pBWEJ1bWFyLmphdmEKQEAgLTAsMCArMSwyNDQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisvKioNCisgKiBKQVhCdW1hci5qYXZhDQorICoNCisgKiBDcmVhdGVkIG9uOiBBcHIgMTAsIDIwMDkNCisgKiBDcmVhdGVkIGJ5Og0KKyAqDQorICogUmV2YW1wZWQgd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VEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTG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Sw3OSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAqICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZA0KKyAqICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuDQorICogKiA9PT09PT09PT09PT1MSUNFTlNFX0VORD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqDQorICogKiBFQ09NUCBpcyBhIHRyYWRlbWFyayBhbmQgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5pbm5vLmVudi5vbGQ7DQorDQoraW1wb3J0IGphdmEuaW8uT3V0cHV0U3RyZWFtOw0KK2ltcG9ydCBqYXZhLmlvLldyaXRlcjsNCisNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi5BUElFeGNlcHRpb247DQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuRW52Ow0KKw0KKy8qKg0KKyAqIEFsbG93IEV4dGVuZGVkIElPIGludGVyZmFjZSB1c2FnZSB3aXRob3V0IG11ZGR5aW5nIHVwIHRoZSBTdHJpbmdpZmllciBJbnRlcmZhY2UNCisgKi8NCitwdWJsaWMgaW50ZXJmYWNlIElPU3RyaW5naWZpZXI8VD4gZXh0ZW5kcyBTdHJpbmdpZmllcjxUPiB7DQorCS8qKg0KKwkgKiBNYXJzaGFsIGZyb20gYW4gT2JqZWN0IFQgb250byBhIFdyaXRlciwgdXNpbmcgY29udGVudHMgZn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nMpIHRocm93cyBBUElFeGNlcHRpb247DQorDQorCS8qKg0KKwkgKiBTZXQgUHJldHR5IFhNTCwgd2hlcmUgcG9zc2libGUNCisJICogDQorCSAqIEBwYXJhbSBwcmV0dHkNCisJICogQHRocm93cyBBUElFeGNlcHRpb24NCisJICovDQorCXB1YmxpYyBhYnN0cmFjdCBJT1N0cmluZ2lmaWVyPFQ+IHByZXR0eShib29sZWFuIHByZXR0eSk7DQorDQorCS8qKg0KKwkgKiBTZXQgR2VuZXJhdGUgRnJhZ21lbnQNCisJICogDQorCSAqIEBwYXJhbSBmcmFnbWVudA0KKwkgKiBAdGhyb3dzIEFQSUV4Y2VwdGlvbg0KKwkgKi8NCisJcHVibGljIGFic3RyYWN0IElPU3RyaW5naWZpZXI8VD4gYXNGcmFnbWVudChib29sZWFuIGZyYWdtZW50KTsNCisNCisNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9vbGQvT2JqZWN0aWZpZXIuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvb2xkL09iamVjdGlmaWVyLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMTllMTlkZQotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvb2xkL09iamVjdGlmaWVyLmphdmEKQEAgLTAsMCArMSw2MiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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VEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTG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KQEAgLTAsMCArMSw1MCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFT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PT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnYudXRpbDsNCisNCitpbXBvcnQgamF2YS5pby5JT0V4Y2VwdGlvbjsNCitpbXBvcnQgamF2YS5pby5PdXRwdXRTdHJlYW07DQorDQorcHVibGljIGNsYXNzIERvdWJsZU91dHB1dFN0cmVhbSBleHRlbmRzIE91dHB1dFN0cmVhbSB7DQorICAgIHByaXZhdGUgT3V0cHV0U3RyZWFtW10gb3NzOw0KKwlwcml2YXRlIGJvb2xlYW5bXSBjbG9zZTsNCisNCisJLyoqDQorICAgICAqIENyZWF0ZSBhIERvdWJsZSBTdHJlYW0gV3JpdGVyDQorICAgICAqIFNvbWUgU3RyZWFtcyBzaG91bGQgbm90IGJlIGNsb3NlZCBieSB0aGlzIG9iamVjdCAoaS5lLiBTeXN0ZW0ub3V0KSwgdGhlcmVmb3JlLCBtYXJrIHRoZW0gd2l0aCBib29sZWFucw0KKyAgICAgKi8NCisgICAgcHVibGljIERvdWJsZU91dHB1dFN0cmVhbShPdXRwdXRTdHJlYW0gYSwgYm9vbGVhbiBjbG9zZUEsIE91dHB1dFN0cmVhbSBiLCBib29sZWFuIGNsb3NlQikgew0KKwkJb3NzID0gbmV3IE91dHB1dFN0cmVhbVtdIHthLGJ9Ow0KKwkJY2xvc2UgPSBuZXcgYm9vbGVhbltdIHtjbG9zZUEsY2xvc2VCfTsNCisgICAgfQ0KKw0KKyAgICAvKioNCisgICAgICogV3JpdGUgYSBz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JuaW5nIHBlcm1pc3Npb25zIGFuZA0KKyAqICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuDQorICogKiA9PT09PT09PT09PT1MSUNFTlNFX0VORD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqDQorICogKiBFQ09NUCBpcyBhIHRyYWRlbWFyayBhbmQgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5pbm5vLmVudi51dGlsOw0KKw0KK2ltcG9ydCBqYXZhLmlvLk91dHB1dFN0cmVhbTsNCitpbXBvcnQgamF2YS5pby5QcmludFdyaXRlcjsNCitpbXBvcnQgamF2YS5pby5Xcml0ZXI7DQorDQorLyoqDQorICogDQorICogICAgICAgICBDYXRjaCBcbiBhbmQgaW5kZW50IGFjY29yZGluZyB0byBjdXJyZW50IGluZGVudCBsZXZlbHMgb2YgSmF2YUdlbg0KKyAqLw0KK3B1YmxpYyBjbGFzcyBJbmRlbnRQcmludFdyaXRlciBleHRlbmRzIFByaW50V3JpdGVyIHsNCisJcHVibGljIHN0YXRpYyBpbnQgSU5ERU5UID0gMjsNCisJcHJpdmF0ZSBib29sZWFuIGFkZEluZGVudDsNCisJcHJpdmF0ZSBpbnQgaW5kZW50Ow0KKwlwcml2YXRlIGludCBjb2w7DQorDQorCXB1YmxpYyBJbmRlbnRQcmludFdyaXRlcihXcml0ZXIgb3V0KSB7DQorCQlzdXBlcihvdXQpOw0KKwkJYWRkSW5kZW50ID0gZmFsc2U7DQorCQlpbmRlbnQgPSBjb2wgPSAwOw0KKwl9DQorCQ0KKwlwdWJsaWMgSW5kZW50UHJpbnRXcml0ZXIoT3V0cHV0U3RyZWFtIG91dC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c2l6ZSkgew0KKwkJaW5kZW50ID0gc2l6ZTsNCisJfQ0KKw0KKwlwdWJsaWMgdm9pZCBpbmMoKSB7DQorCQkrK2luZGVudDsNCisJfQ0KKwkNCisJcHVibGljIHZvaWQgZGVjKCkgew0KKwkJLS1pbmRlbnQ7DQorCX0NCisNCisJcHVibGljIHZvaWQgdG9Db2woaW50IGlkeCkgew0KKwkJd2hpbGUoaWR4PmNvbCsrKXN1cGVyLndyaXRlKChpbnQpJyAnKTsNCisJfQ0KKw0KKwlwdWJsaWMgaW50IGdldEluZGVudCgpIHsNCisJCXJldHVybiBpbmRlbnQ7DQorCX0NCisNCisJcHVibGljIHZvaWQgdG9JbmRlbnQoKSB7DQorCQlpbnQgZW5kID0gaW5kZW50ICogSU5ERU5UOw0KKwkJZm9yIChpbnQgaSA9IDA7IGkgPCBlbmQ7ICsraSkgew0KKwkJCXN1cGVyLndyaXRlKChpbnQpICcgJyk7DQorCQl9DQorCQljb2wgPSBlbmQ7DQorCX0NCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi91dGlsL1Bvb2wuamF2YSBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvdXRpbC9Qb29sLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZTYzMWM5OAotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvdXRpbC9Qb29sLmphdmEKQEAgLTAsMCArMSwzOTYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisvKg0KKyAqIFBvb2wNCisgKiANCisgKiA1LzI3LzIwMTENCisgKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnYudXRpbDsNCisNCitpbXBvcnQgamF2YS51dGlsLkxpbmtlZExpc3Q7DQorDQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuQVBJRXhjZXB0aW9uOw0KK2ltcG9ydCBjb20uYXR0Lmlubm8uZW52LkxvZ1RhcmdldDsNCisNCisvKioNCisgKiBUaGlzIENsYXNzIHBvb2xzIG9uIGFuIEFzLU5lZWRlZC1CYXNpcyBhbnkgcGFydGljdWxhciBraW5kIG9mIGNsYXNzLCB3aGljaCBpcw0KKyAqIHF1aXRlIHN1aXRhYmxlIGZvciBleHBlbnNpdmUgb3BlcmF0aW9ucy4NCisgKiANCisgKiBUaGUgdXNlciBjYWxscyAiZ2V0IiBvbiBhIFBvb2wsIGFuZCBpZiBhIHdhaXRpbmcgcmVzb3VyY2UgKFQpIGlzIGF2YWlsYWJsZSwNCisgKiBpdCB3aWxsIGJlIHJldHVybmVkLiBPdGhlcndpc2UsIG9uZSB3aWxsIGJlIGNyZWF0ZWQgd2l0aCB0aGUgIkNyZWF0b3IiIGNsYXNzDQorICogKG11c3QgYmUgZGVmaW5lZCBmb3IgKFQpKS4NCisgKiANCisgKiBZb3UgY2FuIFByaW1lIHRoZS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YmplY3RzIGFsbG93ZWQgYXQgYW55IG1vbWVudA0KKwkgKiANCisJICogQHJldHVybg0KKwkgKi8NCisJcHVibGljIGludCBnZXRNYXhSYW5nZSgpIHsNCisJCXJldHVybiBtYXhfcmFuZ2U7DQorCX0NCisNCisJLyoqDQorCSAqIFNldCBhIE1heCBSYW5nZSBmb3IgbnVtYmVycyBvZiBzcGFyZSBvYmplY3RzIHdhaXRpbmcgdG8gYmUgdXNlZC4NCisJICogDQorCSAqIE5vIG5lZ2F0aXZlIG51bWJlcnMgYXJlIGFsbG93ZWQNCisJICogDQorCSAqIEByZXR1cm4NCisJICovDQorCXB1YmxpYyB2b2lkIHNldE1heFJhbmdlKGludCBtYXhfcmFuZ2UpIHsNCisJCS8vIERvIG5vdCBhbGxvdyBuZWdhdGl2ZSBudW1iZXJzDQorCQl0aGlzLm1heF9yYW5nZSA9IE1hdGgubWF4KDAsIG1heF9yYW5nZSk7DQorCX0NCisNCit9DQpkaWZmIC0tZ2l0IGEvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi91dGlsL1JlZnJlc2hhYmxlVGhyZWFkT2JqZWN0LmphdmEgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L3V0aWwvUmVmcmVzaGFibGVUaHJlYWRPYmplY3QuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi43OGFkY2I5Ci0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi91dGlsL1JlZnJlc2hhYmxlVGhyZWFkT2JqZWN0LmphdmEKQEAgLTAsMCArMSwxMjYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnYudXRpbDsNCisNCitpbXBvcnQgamF2YS5sYW5nLnJlZmxlY3QuQ29uc3RydWN0b3I7DQoraW1wb3J0IGphdmEubGFuZy5yZWZsZWN0Lkludm9jYXRpb25UYXJnZXRFeGNlcHRpb247DQoraW1wb3J0IGphdmEudXRpbC5Db2xsZWN0aW9uczsNCitpbXBvcnQgamF2YS51dGlsLkhhc2hNYXA7DQoraW1wb3J0IGphdmEudXRpbC5NYXA7DQorDQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuQVBJRXhjZXB0aW9uOw0KK2ltcG9ydCBjb20uYXR0Lmlubm8uZW52LkNyZWF0YWJsZTsNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi5FbnY7DQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuTGlmZUN5Y2xlOw0KKw0KKw0KKy8qKg0KKyAqIDxoMT5SZWZyZXNoYWJsZVRocmVhZE9iamVjdDwvaDE+DQorICogVGhpcyBpcyBhIFRocmVhZExvY2FsIGxpa2UgaW1wbGVtZW50YXRpb24sIGJ1dCBpdCByZXNwb25kcyB0byANCisgKiB0aGUge0BsaW5rIExpZmVDeWNsZX0gbWVjaGFuaXNtIGZvciBjb25maWd1cmF0aW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yYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi91dGlsL1NwbGl0LmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYTI1ZjM2YwotLS0gL2Rldi9udWxsCisrKyBiL2Vudi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvaW5uby9lbnYvdXRpbC9TcGxpdC5qYXZhCkBAIC0wLDAgKzEsOTEgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMv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4KS50cmltKCk7DQorCQkJCSAgbGFzdCA9ICsraWR4Ow0KKwkJCSAgfQ0KKwkJCSAgcnZbKytjb3VudF09dmFsdWUuc3Vic3RyaW5nKGxhc3QpLnRyaW0oKTsNCisJCSAgfQ0KKwkJICByZXR1cm4gcnY7DQorCSAgfQ0KKw0KK30NCmRpZmYgLS1naXQgYS9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L3V0aWwvU3RyaW5nQnVpbGRlck91dHB1dFN0cmVhbS5qYXZhIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi91dGlsL1N0cmluZ0J1aWxkZXJPdXRwdXRTdHJlYW0uamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5hM2Y4ZjRiCi0tLSAvZGV2L251bGwKKysrIGIvZW52L3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi91dGlsL1N0cmluZ0J1aWxkZXJPdXRwdXRTdHJlYW0uamF2YQpAQCAtMCwwICsxLDE4MCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L3V0aWwvU3RyaW5nQnVpbGRlcldyaXRlci5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjgzM2JkN2MKLS0tIC9kZXYvbnVsbAorKysgYi9lbnYvc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L3V0aWwvU3RyaW5nQnVpbGRlcldyaXRlci5qYXZhCkBAIC0wLDAgKzEsMTc0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL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QorCQkJCTxuZXh1c1VybD5odHRwczovL29zcy5zb25hdHlwZS5vcmcvPC9uZXh1c1VybD4NCisJCQkJPGF1dG9SZWxlYXNlQWZ0ZXJDbG9zZT50cnVlPC9hdXRvUmVsZWFzZUFmdGVyQ2xvc2U+DQorCQkJCTwvY29uZmlndXJhdGlvbj4NCisJCQk8L3BsdWdpbj4NCisJCTwvcGx1Z2lucz4NCisJPC9idWlsZD4NCisJDQorPC9wcm9qZWN0Pg0KZGlmZiAtLWdpdCBhL2xvZzRqL3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9sb2c0ai9Mb2dGaWxlTmFtZXIuamF2YSBiL2xvZzRqL3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9sb2c0ai9Mb2dGaWxlTmFtZXIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4zZWYwZjUyCi0tLSAvZGV2L251bGwKKysrIGIvbG9nNGovc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2xvZzRqL0xvZ0ZpbGVOYW1lci5qYXZhCkBAIC0wLDAgKzEsODMgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT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GhlciBGaWxlOiAiICsgZm5hbWUgKyAiIG9yIHJlc291cmNlIG9uIENsYXNzcGF0aCAiICsgcHJvcHMgKyAiIGV4aXN0IiApOw0KKwkJCW9yZy5hcGFjaGUubG9nNGouUHJvcGVydHlDb25maWd1cmF0b3IuY29uZmlndXJlKHJzcmMpOw0KKwkJfQ0KKwl9DQorfQ0KZGlmZiAtLWdpdCBhL2xvZzRqL3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9sb2c0ai9QSURBY2Nlc3MuamF2YSBiL2xvZzRqL3NyYy9tYWluL2phdmEvY29tL2F0dC9pbm5vL2Vudi9sb2c0ai9QSURBY2Nlc3MuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi43N2I3N2E2Ci0tLSAvZGV2L251bGwKKysrIGIvbG9nNGovc3JjL21haW4vamF2YS9jb20vYXR0L2lubm8vZW52L2xvZzRqL1BJREFjY2Vzcy5qYXZhCkBAIC0wLDAgKzEsMzIgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQ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ioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQuaW5uby5lbnYubG9nNGo7DQorDQoraW1wb3J0IGNvbS5zdW4uam5hLkxpYnJhcnk7DQoraW1wb3J0IGNvbS5zdW4uam5hLk5hdGl2ZTsNCisNCitwdWJsaWMgaW50ZXJmYWNlIFBJREFjY2VzcyBleHRlbmRzIExpYnJhcnkgew0KKwlQSURBY2Nlc3MgSU5TVEFOQ0UgPSAoUElEQWNjZXNzKSBOYXRpdmUubG9hZExpYnJhcnkoImMiLCBQSURBY2Nlc3MuY2xhc3MpOw0KKyAgICBpbnQgZ2V0cGlkICgpOw0KK30NCmRpZmYgLS1naXQgYS9sb2c0ai9zcmMvdGVzdC9qYXZhL2NvbS9hdHQvaW5uby9lbnYvbG9nNGovTG9nVGVzdC5qYXZhIGIvbG9nNGovc3JjL3Rlc3QvamF2YS9jb20vYXR0L2lubm8vZW52L2xvZzRqL0xvZ1Rlc3QuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi42OWZmOGM0Ci0tLSAvZGV2L251bGwKKysrIGIvbG9nNGovc3JjL3Rlc3QvamF2YS9jb20vYXR0L2lubm8vZW52L2xvZzRqL0xvZ1Rlc3QuamF2YQpAQCAtMCwwICsxLDQ1IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCBya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mU5MDQKLS0tIC9kZXYvbnVsbAorKysgYi9sb2c0ai9zcmMvdGVzdC9yZXNvdXJjZXMvbG9nNGotdGVzdC5wcm9wZXJ0aWVzCkBAIC0wLDAgKzEsNjIgQEAKKyMtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQorIyA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyMgKiBvcmcub25hcC5hYWkNCisjICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorIyAqIENvcHlyaWdodCCpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorIyAqIENvcHlyaWdodCCpIDIwMTcgQW1kb2NzDQorIyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyMgKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisjICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyMgKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisjICogDQorIyAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyMgKiANCisjICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8ga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hLS0KKyAgPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgKiBvcmcub25hcC5hYWkKKyAgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyAgKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MKKyAgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKKyAgKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuCisgICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0CisgICogCisgICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wCisgICogCisgICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUKKyAgKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAorICAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgorICAqIFNlZSB0aG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UxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICAqIG9yZy5vbmFwLmFhaQ0KKyAgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICAqIA0KKyAgICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgICogDQorICAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAgKiBTZWUgdGhlIExpY2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ioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyI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0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9JblhNTC5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjFjNTZlMTQKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL0luWE1MLmphdmEKQEAgLTAsMCArMSw0ODggQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5T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cnNlRXhjZXB0aW9uIHsNCisJCXJldHVybiBuZXcgUGFyc2VkPFN0YXRlPihuZXcgU3RhdGUoamF4SW5mbywgbnVsbCkpOw0KKwl9DQorDQorCS8vIEBPdmVycmlkZQ0KKwlwdWJsaWMgVGltZVRha2VuIHN0YXJ0KEVudiBlbnYpIHsNCisJCXJldHVybiBlbnYuc3RhcnQoIlJvc2V0dGEgWE1MIEluIiwgRW52LlhNTCk7DQorCX0NCisJDQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvSmF4RXZhbC5qYXZhIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9KYXhFdmFsLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNzJhODlmMgotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvSmF4RXZhbC5qYXZhCkBAIC0wLDAgKzEsMjggQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQucm9zZXR0YTsNCisNCitwdWJsaWMgaW50ZXJmYWNlIEpheEV2YWx7DQorCXB1YmxpYyBhYnN0cmFjdCBKYXhFdmFsIGV2YWwoUGFyc2VkPD8+IHApIHRocm93cyBQYXJzZUV4Y2VwdGlvbjsNCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9KYXhJbmZvLmphdmEgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL0pheEluZm8uamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yMzc4NWFmCi0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9KYXhJbmZvLmphdmEKQEAgLTAsMCArMSwyNTAgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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orCX0NCisNCisJcHVibGljIFN0cmluZyB0b1N0cmluZygpIHsNCisJCVN0cmluZ0J1aWxkZXIgc2IgPSBuZXcgU3RyaW5nQnVpbGRlcigpOw0KKwkJc2IuYXBwZW5kKCJTdHJ1Y3R1cmUgb2YgIik7DQorCQlzYi5hcHBlbmQoY2xzcy5nZXROYW1lKCkpOw0KKwkJc2IuYXBwZW5kKCdcbicpOw0KKwkJZHVtcChzYiwyKTsNCisJCXJldHVybiBzYi50b1N0cmluZygpOw0KKwl9DQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvSmF4U2V0LmphdmEgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL0pheFNldC5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjUxNWMyYzEKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL0pheFNldC5qYXZhCkBAIC0wLDAgKzEsOTIgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT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QoQ2xhc3M8Pz4gY2xzKSB7DQorCQlzeW5jaHJvbml6ZWQoanNldHMpIHsNCisJCQlAU3VwcHJlc3NXYXJuaW5ncygidW5jaGVja2VkIikNCisJCQlKYXhTZXQ8WD4ganMgPSAoSmF4U2V0PFg+KWpzZXRzLmdldChjbHMpOw0KKwkJCWlmKGpzID09IG51bGwpIHsNCisJCQkJanNldHMucHV0KGNscywganMgPSBuZXcgSmF4U2V0PFg+KGNscykpOw0KKwkJCX0NCisJCQlyZXR1cm4ganM7DQorCQl9DQorCX0NCisNCisJcHVibGljIFNldHRlcjxUPiBnZXQoU3RyaW5nIGtleSkgew0KKwkJcmV0dXJuIG1lbWJlcnMuZ2V0KGtleSk7DQorCX0NCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9MYWRkZXIuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvTGFkZGVyLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOTVmNTE3NAotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvTGFkZGVyLmphdmEKQEAgLTAsMCArMSwxMTQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHV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KiANCisJICogQHBhcmFtIHN0YXRlDQorCSAqIEByZXR1cm4NCisJICovDQorCXB1YmxpYyBib29sZWFuIGFtRmluaXNoZWQoU3RhdGUgc3RhdGUpIHsNCisJCXJldHVybiBET05FX0lURVJBVE9SLmVxdWFscyhzdGF0ZS5sYWRkZXIucGVlaygpKTsNCisJfQ0KKw0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL051bGxzLmphdmEgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL051bGxzLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNzRjYzU2ZQotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvTnVsbHMuamF2YQpAQCAtMCwwICsxLDY4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBM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hY3QoSU4gaW4sIFdyaXRlciB3cml0ZXIsIFBhcnNlPElOLCBTPiBwYXJzZSwgYm9vbGVhbiAuLi4gb3B0aW9ucyl0aHJvd3MgSU9FeGNlcHRpb24sIFBhcnNlRXhjZXB0aW9uIHsNCisJCX0NCisJCUBPdmVycmlkZQ0KKwkJcHVibGljIFN0cmluZyBsb2dOYW1lKCkgew0KKwkJCXJldHVybiAiUm9zZXR0YSBOVUxMIjsNCisJCX0NCisNCisNCisJfTsNCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9PdXQuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvT3V0LmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYzJhZDQ0OAotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvT3V0LmphdmEKQEAgLTAsMCArMSw0NSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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uZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5lYzA0ZjQzCi0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9PdXRKYXguamF2YQpAQCAtMCwwICsxLDU0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorcGFja2FnZSBjb20uYXR0LnJvc2V0dGE7DQorDQoraW1wb3J0IGphdmEuaW8uSU9FeGNlcHRpb247DQoraW1wb3J0IGphdmEuaW8uV3JpdGVyOw0KKw0KK3B1YmxpYyBjbGFzcyBPdXRKYXggZXh0ZW5kcyBPdXQgew0KKwlwcml2YXRlIEpheEV2YWwgamF4RXZhbDsNCisNCisJcHVibGljIE91dEpheChKYXhFdmFsIGplKSB7DQorCQl0aGlzLmpheEV2YWwgPSBqZTsNCisJfQ0KKw0KKwlAT3ZlcnJpZGUNCisJcHVibGljIDxJTixTPiB2b2lkIGV4dHJhY3QoSU4gaW4sIFdyaXRlci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KiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1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qKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGh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wdWJsaWMgU3RyaW5nIGxvZ05hbWUoKSB7DQorCQlyZXR1cm4gIlJvc2V0dGEgUkFXIjsNCisJfQ0KKw0KKw0KKw0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL091dFhNTC5qYXZhIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9PdXRYTUwuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5jZmVmODk3Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9PdXRYTUwuamF2YQpAQCAtMCwwICsxLDIyNyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHR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QocmVhbFRhZyk7ICANCisJCQlmb3JlLmFwcGVuZCgiPVwiIik7DQorCQkJZm9yZS5hcHBlbmQodmFsdWUpOw0KKwkJCWZvcmUuYXBwZW5kKCciJyk7DQorCQl9DQorCX0NCisNCisJQE92ZXJyaWRlDQorCXB1YmxpYyBTdHJpbmcgbG9nTmFtZSgpIHsNCisJCXJldHVybiAiUm9zZXR0YSBYTUwiOw0KKwl9DQorDQorDQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvUGFyc2UuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvUGFyc2UuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45MzQxNWI0Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9QYXJzZS5qYXZhCkBAIC0wLDAgKzEsNDcgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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F2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvUGFyc2VFeGNlcHRpb24uamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5mMDg2ZDAwCi0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9QYXJzZUV4Y2VwdGlvbi5qYXZhCkBAIC0wLDAgKzEsNDQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRw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mxpYyBQYXJzZUV4Y2VwdGlvbihTdHJpbmcgbWVzc2FnZSkgew0KKwkJc3VwZXIobWVzc2FnZSk7DQorCX0NCisNCisJcHVibGljIFBhcnNlRXhjZXB0aW9uKFRocm93YWJsZSBjYXVzZSkgew0KKwkJc3VwZXIoY2F1c2UpOw0KKwl9DQorDQorCXB1YmxpYyBQYXJzZUV4Y2VwdGlvbihTdHJpbmcgbWVzc2FnZSwgVGhyb3dhYmxlIGNhdXNlKSB7DQorCQlzdXBlcihtZXNzYWdlLCBjYXVzZSk7DQorCX0NCisNCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9QYXJzZWQuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvUGFyc2VkLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNDEyMjUxZgotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvUGFyc2VkLmphdmEKQEAgLTAsMCArMSw5MSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1k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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBT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Fpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9TYXZlZC5qYXZhIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9TYXZlZC5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmJjN2UxMDYKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL1NhdmVkLmphdmEKQEAgLTAsMCArMSwxOTUgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQucm9zZXR0YTsNCisNCitpbXBvcnQgamF2YS5pby5JT0V4Y2VwdGlvbjsNCitpbXBvcnQgamF2YS5pby5SZWFkZXI7DQoraW1wb3J0IGphdmEuaW8uV3JpdGVyOw0KK2ltcG9ydCBqYXZhLnV0aWwuTGlzdDsNCisNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi5FbnY7DQoraW1wb3J0IGNvbS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bnVsbCwgcGFyc2VyKTsNCisJfQ0KKw0KKw0KKwkvLyBAT3ZlcnJpZGUNCisJcHVibGljIFRpbWVUYWtlbiBzdGFydChFbnYgZW52KSB7DQorCQlyZXR1cm4gZW52LnN0YXJ0KFJPU0VUVEFfU0FWRUQsIDApOw0KKwl9DQorCQ0KKwlAT3ZlcnJpZGUNCisJcHVibGljIFN0cmluZyBsb2dOYW1lKCkgew0KKwkJcmV0dXJuIFJPU0VUVEFfU0FWRUQ7DQorCX0NCisNCisNCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9YbWxFc2NhcGUuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvWG1sRXNjYXBlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYzYxYTgwZAotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvWG1sRXNjYXBlLmphdmEKQEAgLTAsMCArMSwzNzMgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09P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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAqICogU2VlIHRoZSBMaWNlbnNl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cgU3RyaW5nUmVhZGVyKHN3LnRvU3RyaW5nKCkpLCB3cml0ZXIsIGluWE1MLG9wdGlvbnMpOw0KKwkJCX0gZWxzZSB7DQorCQkJCW91dC5leHRyYWN0KHQsIHdyaXRlciwgbWFyc2hhbCxvcHRpb25zKTsNCisJCQl9DQorCQl9IGNhdGNoIChFeGNlcHRpb24gZSkgew0KKwkJCXRocm93IG5ldyBBUElFeGNlcHRpb24oZSk7DQorCQl9IGZpbmFsbHkgew0KKwkJCXR0LmRvbmUoKTsNCisJCX0NCisJfQ0KKw0KKw0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL2Vudi9Sb3NldHRhRGF0YS5qYXZhIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9lbnYvUm9zZXR0YURhdGEuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5lMDdlODgzCi0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9lbnYvUm9zZXR0YURhdGEuamF2YQpAQCAtMCwwICsxLDMxNCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyA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0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9lbnYvUm9zZXR0YUVudi5qYXZhCkBAIC0wLDAgKzEsOTAgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQucm9zZXR0YS5lbnY7DQorDQoraW1wb3J0IGphdmEuYXBwbGV0LkFwcGxldDsNCitpbXBvcnQgamF2YS51dGlsLlByb3BlcnRpZXM7DQorDQoraW1wb3J0IGphdmF4LnhtbC5uYW1lc3BhY2UuUU5hbWU7DQoraW1wb3J0IGphdmF4LnhtbC52YWxpZGF0aW9uLlNjaGVtYTsNCisNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi5BUElFeGNlcHRpb247DQorDQorLyoqDQorICogQW4gZXNzZW50aWFsIEltcGxlbWVudGF0aW9uIG9mIEVudiwgd2hpY2ggd2lsbCBmdWxseSBmdW5jdGlvbiwgd2l0aG91dCBhbnkgc29ydA0KKyAqIG9mIGNvbmZpZ3VyYXRpb24uDQorICogDQorICogV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NldHRhL21hcnNoYWwvRGF0YVdyaXRlci5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjhkOTcyZDgKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRGF0YVdyaXRlci5qYXZhCkBAIC0wLDAgKzEsMTQwIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJ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Sw4NCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUyw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1IgPSBuZXcgSXRlcmF0b3I8Vm9pZD4oKSB7DQorCQlAT3ZlcnJpZGUNCisJCXB1YmxpYyBib29sZWFuIGhhc05leHQoKSB7DQorCQkJcmV0dXJuIGZhbHNlOw0KKwkJfQ0KKw0KKwkJQE92ZXJyaWRlDQorCQlwdWJsaWMgVm9pZCBuZXh0KCkgew0KKwkJCXJldHVybiBudWxsOw0KKwkJfQ0KKw0KKwkJQE92ZXJyaWRlDQorCQlwdWJsaWMgdm9pZCByZW1vdmUoKSB7DQorCQl9DQorCX07DQorDQorCXB1YmxpYyBzdGF0aWM8VD4gRG9jTWFyc2hhbDxUPiByb290KE1hcnNoYWw8VD4gbSkgew0KKwkJcmV0dXJuIChEb2NNYXJzaGFsPFQ+KW5ldyBEb2NNYXJzaGFsPFQ+KG0pOw0KKwl9DQorDQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9GaWVsZEFycmF5LmphdmEgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGRBcnJheS5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjc5MzFlNzMKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGRBcnJheS5qYXZhCkBAIC0wLDAgKzEsOTQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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Kg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIG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yYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGREYXRlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYzJhOGMwMwotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9GaWVsZERhdGUuamF2YQpAQCAtMCwwICsxLDM5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaG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JfQ0KKw0KKwlAT3ZlcnJpZGUNCisJZmluYWwgcHJvdGVjdGVkIGJvb2xlYW4gZGF0YShUIHQsIFN0cmluZ0J1aWxkZXIgc2IpIHsNCisJCXJldHVybiBEYXRhV3JpdGVyLkRBVEUud3JpdGUoZGF0YSh0KSwgc2IpOw0KKwl9DQorDQorCXByb3RlY3RlZCBhYnN0cmFjdCBYTUxHcmVnb3JpYW5DYWxlbmRhciBkYXRhKFQgdCk7IA0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGREYXRlVGltZS5qYXZhIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9tYXJzaGFsL0ZpZWxkRGF0ZVRpbWUuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5jZTE0YzdmCi0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9tYXJzaGFsL0ZpZWxkRGF0ZVRpbWUuamF2YQpAQCAtMCwwICsxLDM5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBB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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAqICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZA0KKyAqICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuDQorICogKiA9PT09PT09PT09PT1MSUNFTlNFX0VORD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqDQorICogKiBFQ09NUCBpcyBhIHRyYWRlbWFyayBhbmQgc2VydmljZSBtYXJrIG9mIEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5Lg0KKyAqICoNCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KK3BhY2thZ2UgY29tLmF0dC5yb3NldHRhLm1hcnNoYWw7DQorDQorcHVibGljIGFic3RyYWN0IGNsYXNzIEZpZWxkSGV4QmluYXJ5PFQ+IGV4dGVuZHMgRmllbGRNYXJzaGFsPFQ+ew0KKwlwdWJsaWMgRmllbGRIZXhCaW5hcnkoU3RyaW5nIG5hbWUpIHsNCisJCXN1cGVyKG5hbWUpOw0KKwl9DQorDQorCXByb3RlY3RlZCBhYnN0cmFjdCBieXRlW10gZGF0YShUIHQpOyANCisNCisJQE92ZXJyaWRlDQorCXByb3RlY3RlZCBib29sZWFuIGRhdGEoVCB0LCBTdHJpbmdCdWlsZGVyIHNiKSB7DQorCQlyZXR1cm4gRGF0YVdyaXRlci5IRVhfQklOQVJZLndyaXRlKGRhdGEodCksIHNiKTsNCisJfQ0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGRNYXJzaGFsLmphdmEgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGRNYXJzaGFsLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNjNiYTNiOQotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9GaWVsZE1hcnNoYWwuamF2YQpAQCAtMCwwICsxLDYxIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqI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pbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYjUzZjEyZQotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9GaWVsZE51bWVyaWMuamF2YQpAQCAtMCwwICsxLDM4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3Mgcm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pKTsNCisJCXJldHVybiBmYWxzZTsNCisJfQ0KKw0KKwlwcm90ZWN0ZWQgYWJzdHJhY3QgTiBkYXRhKFQgdCk7IA0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGRTdHJpbmcuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9GaWVsZFN0cmluZy5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjZmZDM0MjQKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvRmllbGRTdHJpbmcuamF2YQpAQCAtMCwwICsxLDM4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMa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gYWJzdHJhY3QgY2xhc3MgRmllbGRTdHJpbmc8VD4gZXh0ZW5kcyBGaWVsZE1hcnNoYWw8VD4gew0KKwlwdWJsaWMgRmllbGRTdHJpbmcoU3RyaW5nIG5hbWUpIHsNCisJCXN1cGVyKG5hbWUpOw0KKwl9DQorDQorCXByb3RlY3RlZCBhYnN0cmFjdCBTdHJpbmcgZGF0YShUIHQpOyANCisNCisJQE92ZXJyaWRlDQorCWZpbmFsIHByb3RlY3RlZCBib29sZWFuIGRhdGEoVCB0LCBTdHJpbmdCdWlsZGVyIHNiKSB7DQorCQlyZXR1cm4gRGF0YVdyaXRlci5TVFJJTkcud3JpdGUoZGF0YSh0KSwgc2IpOw0KKwl9DQorDQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9MaXN0SXRlcmF0b3IuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9MaXN0SXRlcmF0b3IuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5iNDQ0YzY4Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvbWFpbi9qYXZhL2NvbS9hdHQvcm9zZXR0YS9tYXJzaGFsL0xpc3RJdGVyYXRvci5qYXZhCkBAIC0wLDAgKzEsNjAgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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wl9DQorDQorCUBPdmVycmlkZQ0KKwlwdWJsaWMgdm9pZCByZW1vdmUoKSB7DQorCQlkZWxnLnJlbW92ZSgpOw0KKwl9DQorCQ0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvT2JqQXJyYXkuamF2YSBiL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9PYmpBcnJheS5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjg5ZTA3YzUKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvT2JqQXJyYXkuamF2YQpAQCAtMCwwICsxLDkyIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaW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lJBWTsNCisJCQkJCWxhZGRlci5wdXNoKERPTkVfSVRFUkFUT1IpOw0KKwkJCQl9DQorCQkJfQ0KKwkJfQ0KKwkJcmV0dXJuIHBhcnNlZDsgLy8gaWYgdW5jaGFuZ2VkLCB0aGVuIGl0IHdpbGwgZW5kIHByb2Nlc3MNCisJfQ0KKw0KKwlwcm90ZWN0ZWQgYWJzdHJhY3QgTGlzdDxTPiBkYXRhKFQgdCk7DQorDQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL21haW4vamF2YS9jb20vYXR0L3Jvc2V0dGEvbWFyc2hhbC9PYmpNYXJzaGFsLmphdmEgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvT2JqTWFyc2hhbC5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjk4MWRkNzgKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy9tYWluL2phdmEvY29tL2F0dC9yb3NldHRhL21hcnNoYWwvT2JqTWFyc2hhbC5qYXZhCkBAIC0wLDAgKzEsMTI5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09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qKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZX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VJBVElPTlM+MjApIHsNCisJCQltID0gdHJhbnMuYXVkaXRUcmFpbCgwLG51bGwpOw0KKwkJfSBlbHNlIHsNCisJCQltID0gdHJhbnMuYXVkaXRUcmFpbCgwLCBzYncuZ2V0QnVmZmVyKCkpOw0KKwkJCVN5c3RlbS5vdXQucHJpbnRsbihzYncuZ2V0QnVmZmVyKCkpOw0KKwkJfQ0KKwkJU3lzdGVtLm91dC5wcmludGxuKElURVJBVElPTlMgKyAiIGVudHJpZXMsIFRvdGFsIFRpbWU6ICIgKyBtLnRvdGFsICsgIm1zLCBBdmcgVGltZTogIiArIG0udG90YWwvSVRFUkFUSU9OUyArICJtcyIpOw0KKwl9DQorDQorfQ0KZGlmZiAtLWdpdCBhL3Jvc2V0dGEvc3JjL3Rlc3QvamF2YS9jb20vZGF0YS90ZXN0L0pVX0pTT04uamF2YSBiL3Jvc2V0dGEvc3JjL3Rlc3QvamF2YS9jb20vZGF0YS90ZXN0L0pVX0pTT04uamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45YjFkNzE1Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfSlNPTi5qYXZhCkBAIC0wLDAgKzEsMTM4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuI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JpbmcgcmVzdWx0ID0gc3cudG9TdHJpbmcoKTsNCisJCQ0KKwkJaWYoIXJlc3VsdC5lcXVhbHMoY21wKSkgew0KKwkJCXN3LmdldEJ1ZmZlcigpLnNldExlbmd0aCgwKTsNCisJCQluZXcgT3V0UmF3KCkuZXh0cmFjdChuZXcgU3RyaW5nUmVhZGVyKHN0ciksIHN3LCBpbik7DQorCQkJU3lzdGVtLm91dC5wcmludGxuKHN3KTsNCisJCX0NCisNCisJCUFzc2VydC5hc3NlcnRFcXVhbHMoY21wLHJlc3VsdCk7DQorCQlTeXN0ZW0ub3V0LnByaW50bG4oKTsNCisNCisJfQ0KK30NCmRpZmYgLS1naXQgYS9yb3NldHRhL3NyYy90ZXN0L2phdmEvY29tL2RhdGEvdGVzdC9KVV9MYWRkZXIuamF2YSBiL3Jvc2V0dGEvc3JjL3Rlc3QvamF2YS9jb20vZGF0YS90ZXN0L0pVX0xhZGRlci5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjc4ZDZhMTAKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy90ZXN0L2phdmEvY29tL2RhdGEvdGVzdC9KVV9MYWRkZXIuamF2YQpAQCAtMCwwICsxLDgwIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2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dmEvY29tL2RhdGEvdGVzdC9KVV9OdWxscy5qYXZhCkBAIC0wLDAgKzEsNzIgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNl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sNCisJCQkNCisJCQlTeXN0ZW0ub3V0LnByaW50bG4oZGF0YS5vdXQoRGF0YS5UWVBFLlJBVykuYXNTdHJpbmcoKSk7DQorCQl9IGNhdGNoIChFeGNlcHRpb24gZSkgew0KKwkJCS8vIFRPRE8gQXV0by1nZW5lcmF0ZWQgY2F0Y2ggYmxvY2sNCisJCQllLnByaW50U3RhY2tUcmFjZSgpOw0KKwkJfQ0KKwkJDQorCX0NCisNCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfUm9zZXR0YURGLmphdmEgYi9yb3NldHRhL3NyYy90ZXN0L2phdmEvY29tL2RhdGEvdGVzdC9KVV9Sb3NldHRhREYuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45MDM0MmI0Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfUm9zZXR0YURGLmphdmEKQEAgLTAsMCArMSwxNjUgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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9KVV9TYXZlZC5qYXZhIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfU2F2ZWQuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yMjBiZGY3Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfU2F2ZWQuamF2YQpAQCAtMCwwICsxLDEwNyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh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B7DQorCQkJCXR0LmRvbmUoKTsNCisJCQl9DQorCQkJDQorCQkJc2J3LmFwcGVuZCgiXG49PT09IFN0YXJ0IEpTT04gPT09PT1cbiIpOw0KKwkJCXR0ID0gdHJhbnMuc3RhcnQoIkpTT04iLCA0KTsNCisJCQl0cnkgew0KKwkJCQlqc29uLmV4dHJhY3QobnVsbCxzYncsc2F2ZWQpOw0KKwkJCX0gZmluYWxseSB7DQorCQkJCXR0LmRvbmUoKTsNCisJCQl9DQorCQkJcmVwb3J0LmdsZWFuKHRyYW5zLDEsMiwzLDQpOw0KKwkJfSB3aGlsZShyZXBvcnQuZ28oKSk7DQorCQkNCisJCXJlcG9ydC5yZXBvcnQoc2J3KTsNCisJCVN5c3RlbS5vdXQucHJpbnRsbihzYncudG9TdHJpbmcoKSk7DQorDQorCX0NCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfU3RyZWFtMk9iai5qYXZhIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfU3RyZWFtMk9iai5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmM3MTRiNTcKLS0tIC9kZXYvbnVsbAorKysgYi9yb3NldHRhL3NyYy90ZXN0L2phdmEvY29tL2RhdGEvdGVzdC9KVV9TdHJlYW0yT2JqLmphdmEKQEAgLTAsMCArMSwxMjYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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KysrIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvSlVfU3RydWN0LmphdmEKQEAgLTAsMCArMSw3NiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICog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ioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmV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E1Ci0tLSAvZGV2L251bGwKKysrIGIvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3QvT3V0RHVtcC5qYXZhCkBAIC0wLDAgKzEsOTMgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29md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hL2NvbS9kYXRhL3Rlc3QvUmVwb3J0LmphdmEKQEAgLTAsMCArMSw2OSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vu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0L2phdmEvY29tL2RhdGEvdGVzdC9vYmovTXVsdGlNYXJzaGFsLmphdmEgYi9yb3NldHRhL3NyYy90ZXN0L2phdmEvY29tL2RhdGEvdGVzdC9vYmovTXVsdGlNYXJzaGFsLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMWVmODFlMgotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL3Rlc3QvamF2YS9jb20vZGF0YS90ZXN0L29iai9NdWx0aU1hcnNoYWwuamF2YQpAQCAtMCwwICsxLDQzIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdG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CB0eXBlcy54c2QuTXVsdGk7DQoraW1wb3J0IHR5cGVzLnhzZC5NdWx0aS5TaW5nbGU7DQorDQorcHVibGljIGNsYXNzIE11bHRpTWFyc2hhbCBleHRlbmRzIE9iak1hcnNoYWw8TXVsdGk+IHsNCisJcHVibGljIE11bHRpTWFyc2hhbCgpIHsNCisJCWFkZChuZXcgT2JqQXJyYXk8TXVsdGksU2luZ2xlPigic2luZ2xlIixuZXcgU2luZ2xlTWFyc2hhbCgpKSB7DQorCQkJQE92ZXJyaWRlDQorCQkJcHJvdGVjdGVkIExpc3Q8U2luZ2xlPiBkYXRhKE11bHRpIHQpIHsNCisJCQkJcmV0dXJuIHQuZ2V0U2luZ2xlKCk7DQorCQkJfQ0KKwkJfSk7DQorCX0NCit9DQpkaWZmIC0tZ2l0IGEvcm9zZXR0YS9zcmMvdGVzdC9qYXZhL2NvbS9kYXRhL3Rlc3Qvb2JqL1NpbmdsZU1hcnNoYWwuamF2YSBiL3Jvc2V0dGEvc3JjL3Rlc3QvamF2YS9jb20vZGF0YS90ZXN0L29iai9TaW5nbGVNYXJzaGFsLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMTU0NjYyMgotLS0gL2Rldi9udWxsCisrKyBiL3Jvc2V0dGEvc3JjL3Rlc3QvamF2YS9jb20vZGF0YS90ZXN0L29iai9TaW5nbGVNYXJzaGFsLmphdmEKQEAgLTAsMCArMSw5MyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTl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2NvbS9hdHQveGdlbi9DYWNoZS5qYXZhCkBAIC0wLDAgKzEsMzkgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRp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dsZXRvbiA9IG5ldyBOdWxsKCk7DQorCQlwdWJsaWMgc3RhdGljIE51bGw8Pz4gc2luZ2xldG9uKCkgeyByZXR1cm4gc2luZ2xldG9uO30NCisJfQ0KKw0KK30NCmRpZmYgLS1naXQgYS94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL0NhY2hlR2VuLmphdmEgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL0NhY2hlR2VuLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYjNlMDQ5MQotLS0gL2Rldi9udWxsCisrKyBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vQ2FjaGVHZW4uamF2YQpAQCAtMCwwICsxLDEzMyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3Qg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mRpZmYgLS1naXQgYS94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL0NvZGUuamF2YSBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vQ29kZS5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjU1NmIwNWEKLS0tIC9kZXYvbnVsbAorKysgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL0NvZGUuamF2YQpAQCAtMCwwICsxLDMyIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiA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hY2hlLCBHIHhnZW4pIHRocm93cyBBUElFeGNlcHRpb24sIElPRXhjZXB0aW9uOw0KK30NCmRpZmYgLS1naXQgYS94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL0R5bmFtaWNDb2RlLmphdmEgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL0R5bmFtaWNDb2RlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uODEwZjkxOAotLS0gL2Rldi9udWxsCisrKyBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vRHluYW1pY0NvZGUuamF2YQpAQCAtMCwwICsxLDQ1IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorcGFja2FnZSBjb20uYXR0LnhnZW47DQorDQoraW1wb3J0IGphdmEuaW8uSU9FeGNlcHRpb247DQorDQoraW1wb3J0IGNvbS5hdHQuaW5uby5lbnYuQVBJRXhjZXB0aW9uOw0KK2ltcG9ydCBjb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F0dC94Z2VuL01hcmsuamF2YQpAQCAtMCwwICsxLDQyIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQorICogKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorcGFja2FnZSBjb20uYXR0LnhnZW47DQorDQorcHVibGljIGNsYXNzIE1hcmsgew0KKwkvLyBwYWNrYWdlIG9uIHB1cnBvc2UNCisJaW50IHNwb3QgPSAwOw0KKwlwdWJsaWMgU3RyaW5nIGNvbW1lbnQ7DQorCQ0KKwlwdWJsaWMgTWFyaygpIHsNCisJCWNvbW1lbnQgPSBudWxsOyANCisJfQ0KKwkNCisJcHVibGljIE1hcmsoU3RyaW5nIHN0cmluZykgew0KKwkJY29tbWVudCA9IHN0cmluZzsNCisJfQ0KKw0KKwlwdWJsaWMgdm9pZCBzcG90KGludCBzcG90KSB7DQorCQl0aGlzLnNwb3QgPSBzcG90Ow0KKwl9DQorfQ0KZGlmZiAtLWdpdCBhL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vU2VjdGlvbi5qYXZhIGIveGdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi9TZWN0aW9uLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uN2ZhNTc2MQotLS0gL2Rldi9udWxsCisrKyBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vU2VjdGlvbi5qYXZhCkBAIC0wLDAgKzEsNjMgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKy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Gdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi9YR2VuLmphdmEKQEAgLTAsMCArMSwyOTggQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQueGdlbjsNCisNCitpbXBvcnQgamF2YS5pby5QcmludFdyaXRlcjsNCitpbXBvcnQgamF2YS5pby5Xcml0ZXI7DQoraW1wb3J0IGphdmEudXRpbC5TdGFjazsNCisNCitpbXBvcnQgY29tLmF0dC5pbm5vLmVudi51dGlsLkluZGVudFByaW50V3JpdGVyOw0KK2ltcG9ydCBjb20uYXR0Lmlubm8uZW52LnV0aWwuU3RyaW5nQnVpbGRlcldyaXRlcjsNCisNCitwdWJsaWMgY2xhc3MgWEdlbjxSVCBleHRlbmRzIFhHZW48UlQ+PiB7DQorDQorCXB1YmxpYyBzdGF0aWMgaW50IENPTU1FTlRfQ09MVU1OID0gNDA7DQorCXByaXZhdGUgU3RyaW5nQnVpbGRlciBiYWNrU0IgPSBuZXcgU3RyaW5nQnVpbG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isJfQ0KKw0KKwlwdWJsaWMgdm9pZCBzZXRJbmRlbnQoaW50IGluZGVudCkgew0KKwkJZm9yd2FyZC5zZXRJbmRlbnQoaW5kZW50KTsNCisJCWZvcndhcmQudG9JbmRlbnQoKTsNCisJfQ0KKw0KKwlwdWJsaWMgaW50IGdldEluZGVudCgpIHsNCisJCXJldHVybiBmb3J3YXJkLmdldEluZGVudCgpOw0KKwl9DQorDQorfQ0KZGlmZiAtLWdpdCBhL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vWEdlbkJ1ZmYuamF2YSBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vWEdlbkJ1ZmYuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5kMjdiMDMwCi0tLSAvZGV2L251bGwKKysrIGIveGdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi9YR2VuQnVmZi5qYXZhCkBAIC0wLDAgKzEsODggQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKi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2IudG9TdHJpbmcoKTsNCisJCXNiLnNldExlbmd0aCgwKTsNCisJCXJldHVybiBzOw0KKwl9DQorfQ0KZGlmZiAtLWdpdCBhL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vaHRtbC9IVE1MNEdlbi5qYXZhIGIveGdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi9odG1sL0hUTUw0R2VuLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uN2JlNDI1YQotLS0gL2Rldi9udWxsCisrKyBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vaHRtbC9IVE1MNEdlbi5qYXZhCkBAIC0wLDAgKzEsMTQ1IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2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orKysgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL2h0bWwvSFRNTDVHZW4uamF2YQpAQCAtMCwwICsxLDE1NyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZG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CAtMCwwICsxLDYxIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiI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PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gIkFTIElTIiBCQVNJUywNCisgKiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLg0KKyAq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veGdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi9odG1sL0ltcG9ydHMuamF2YQpAQCAtMCwwICsxLDEwMCBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCisgKiA9PT09PT09PT09PT1MSUNFTlNFX1NUQVJUPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogb3JnLm9uYXAuYWFpDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFUJlQgSW50ZWxsZWN0dWFsIFByb3BlcnR5LiBBbGwgcmlnaHRzIHJlc2VydmVkLg0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQW1kb2NzDQorICogKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAgKHRoZSAiTGljZW5zZSIpOw0KKyAqICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLg0KKyAqICogWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0DQorICogKiANCisgKiAgKiAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KKyAqICogDQorICogICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQ0KKyAqICogZGlzdHJpY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UxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogQ29weXJpZ2h0IMKpIDIwMTcgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBbWRvY3MNCisgKiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQorICogKiB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQorICogKiBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCisgKiAqIA0KKyAqICAqICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wDQorICogKiANCisgKiAgKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQorICogKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KKyAqICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQorICogKiBTZW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WNrKG5ldyBCYWNrKCJ9Iix0cnVlLHRydWUpKTsNCisJCWlmKGptIT1udWxsKWptLnNwb3Qoc3BvdCk7IA0KKwkJcmV0dXJuIHRoaXM7DQorDQorCX0NCisNCisJDQorCXB1YmxpYyBKU0dlbiBjb21tZW50KFN0cmluZyAuLi4gbGluZXMpIHsNCisJCWlmKGh0bWxHZW4ucHJldHR5KSB7DQorCQkJZm9yKGludCBpPTA7aTxsaW5lcy5sZW5ndGg7KytpKSB7DQorCQkJCWlwdy5wcmludCgiLy8gIik7DQorCQkJCWlwdy5wcmludGxuKGxpbmVzW2ldKTsNCisJCQl9DQorCQl9DQorCQlyZXR1cm4gdGhpczsNCisJfQ0KKwkNCisJcHVibGljIEpTR2VuIGVuZChNYXJrIG1hcmspIHsNCisJCWh0bWxHZW4uZW5kKG1hcmspOw0KKwkJcmV0dXJuIHRoaXM7DQorCX0NCisJDQorCXB1YmxpYyBIVE1MR2VuIGRvbmUoKSB7DQorCQlyZXR1cm4gaHRtbEdlbi5lbmQobWFyayk7DQorCX0NCisJDQorfQ0KZGlmZiAtLWdpdCBhL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vaHRtbC9TdGF0ZS5qYXZhIGIveGdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi9odG1sL1N0YXRlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMjNiMDgwNwotLS0gL2Rldi9udWxsCisrKyBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vaHRtbC9TdGF0ZS5qYXZhCkBAIC0wLDAgKzEsMjkgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQueGdlbi5odG1sOw0KKw0KK2ltcG9ydCBjb20uYXR0Lmlubm8uZW52LkVudjsNCisNCitwdWJsaWMgaW50ZXJmYWNlIFN0YXRlPEVOViBleHRlbmRzIEVudj4gew0KK30NCmRpZmYgLS1naXQgYS94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL2h0bWwvVGhlbWF0aWMuamF2YSBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4vaHRtbC9UaGVtYXRpYy5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmEwZDRkZGIKLS0tIC9kZXYvbnVsbAorKysgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL2h0bWwvVGhlbWF0aWMuamF2YQpAQCAtMCwwICsxLDI5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KKyAqID09PT09PT09PT09PUxJQ0VOU0VfU1RBUlQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBvcmcub25hcC5hYWkNCisgKiAqID09PT09PT09PT09PT09PT09P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UgTGljZW5zZS4NCisgKiAqID09PT09PT09PT09PUxJQ0VOU0VfRU5EPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KKyAqICoNCisgKiAqIEVDT01QIGlzIGEgdHJhZGVtYXJrIGFuZCBzZXJ2aWNlIG1hcmsgb2YgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkuDQorICogKg0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorcGFja2FnZSBjb20uYXR0LnhnZW4uaHRtbDsNCisNCitwdWJsaWMgaW50ZXJmYWNlIFRoZW1hdGljIHsNCisJU3RyaW5nIHRoZW1lUGF0aChTdHJpbmcgdGhlVGhlbWUpOw0KKwlTdHJpbmcgdGhlbWVSZXNvbHZlKFN0cmluZyB0aGVUaGVtZSk7DQorfQ0KZGlmZiAtLWdpdCBhL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4veG1sL1hNTENhY2hlR2VuLmphdmEgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL3htbC9YTUxDYWNoZUdlbi5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjhmYzI2OTIKLS0tIC9kZXYvbnVsbAorKysgYi94Z2VuL3NyYy9tYWluL2phdmEvY29tL2F0dC94Z2VuL3htbC9YTUxDYWNoZUdlbi5qYXZhCkBAIC0wLDAgKzEsNDcgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT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3hnZW4veG1sL1hNTEdlbi5qYXZhIGIveGdlbi9zcmMvbWFpbi9qYXZhL2NvbS9hdHQveGdlbi94bWwvWE1MR2VuLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMjMyMTcyNAotLS0gL2Rldi9udWxsCisrKyBiL3hnZW4vc3JjL21haW4vamF2YS9jb20vYXR0L3hnZW4veG1sL1hNTEdlbi5qYXZhCkBAIC0wLDAgKzEsNDYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQorICogPT09PT09PT09PT09TElDRU5TRV9TVEFSVD09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCisgKiAqIG9yZy5vbmFwLmFhaQ0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBDb3B5cmlnaHQgwqkgMjAxNyBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4gQWxsIHJpZ2h0cyByZXNlcnZlZC4NCisgKiAqIENvcHlyaWdodCDCqSAyMDE3IEFtZG9jcw0KKyAqICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKiBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsNCisgKiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS4NCisgKiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdA0KKyAqICogDQorICogICogICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjANCisgKiAqIA0KKyAqICAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmUNCisgKiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuICJBUyBJUyIgQkFTSVMsDQorICogKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4NCisgKiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmQNCisgKiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLg0KKyAqICogPT09PT09PT09PT09TElDRU5TRV9FTkQ9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQorICogKg0KKyAqICogRUNPTVAgaXMgYSB0cmFkZW1hcmsgYW5kIHNlcnZpY2UgbWFyayBvZiBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eS4NCisgKiAqDQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCitwYWNrYWdlIGNvbS5hdHQueGdlbi54bWw7DQorDQoraW1wb3J0IGphdmEuaW8uV3JpdGVyOw0KKw0KK2ltcG9ydCBjb20uYXR0LnhnZW4uWEdlbjs7DQorDQorcHVibGljIGNsYXNzIFhNTEdlbiBleHRlbmRzIFhHZW48WE1MR2VuPiB7DQorCXByaXZhdGUgZmluYWwgU3RyaW5nIFhNTF9UQUc7IA0KKwkNCisJcHVibGljIFhNTEdlbihXcml0ZXIgdykgew0KKwkJdGhpcyh3LCJVVEYtOCIpOw0KKwl9DQorCQ0KKwlwdWJsaWMgWE1MR2VuKFdyaXRlciB3LCBTdHJpbmcgZW5jb2RpbmcpIHsNCisJCXN1cGVyKHcpOw0KKwkJWE1MX1RBRz0iPD94bWwgdmVyc2lvbj1cIjEuMFwiIGVuY29kaW5nPVwiIiArIGVuY29kaW5nICsgIlwiIHN0YW5kYWxvbmU9XCJ5ZXNcIj8+IjsgDQorCX0NCisNCisJcHVibGljIFhNTEdlbiB4bWwoKSB7DQorCQlmb3J3YXJkLnByaW50bG4oWE1MX1RBRyk7DQorCQlyZXR1cm4gdGhpczsNCisJfQ0KK30NCg==