tests that disabling client authentication as a listener override has the desired effect

public void test listener config override ( args args ) throws exception { string node = " 0 " ; listener name client listener name = new listener name ( " client " ) ; args ssl server configs put ( broker security configs ssl client auth config , " required " ) ; args ssl server configs put ( client listener name config prefix ( ) + broker security configs ssl client auth config , " none " ) ; / / ` client ` listener is not configured at this point , so client auth should be required server = create echo server ( args , security protocol ssl ) ; inet socket address addr = new inet socket address ( " localhost " , server port ( ) ) ; / / connect with client auth should work fine create selector ( args ssl client configs ) ; selector connect ( node , addr , buffer size , buffer size ) ; network test utils check client connection ( selector , node , 100 , 10 ) ; selector close ( ) ; / / remove client auth , so connection should fail cert stores keystore props for each ( args ssl client configs : : remove ) ; create selector ( args ssl client configs ) ; selector connect ( node , addr , buffer size , buffer size ) ; network test utils wait for channel close ( selector , node , channel state state authentication failed ) ; selector close ( ) ; server close ( ) ; / / listener - specific config should be used and client auth should be disabled server = create echo server ( args , client listener name , security protocol ssl ) ; addr = new inet socket address ( " localhost " , server port ( ) ) ; / / connect without client auth should work fine now create selector ( args ssl client configs ) ; selector connect ( node , addr , buffer size , buffer size ) ; network test utils check client connection ( selector , node , 100 , 10 ) ; }


gets the configured directory prefix for intermediate done history files

public static string get configured history intermediate done dir prefix ( configuration conf ) { string done dir prefix = conf get ( j h admin config mr history intermediate done dir ) ; if ( done dir prefix = = null ) { done dir prefix = conf get ( m r job config mr am staging dir , m r job config default mr am staging dir ) + " / history / done intermediate " ; } return ensure path in default file system ( done dir prefix , conf ) ; }


take a snapshot this completely overwrites the map data with the statistics from the source

public synchronized void snapshot ( i o statistics source ) { check not null ( source ) ; counters = snapshot map ( source counters ( ) ) ; gauges = snapshot map ( source gauges ( ) ) ; minimums = snapshot map ( source minimums ( ) ) ; maximums = snapshot map ( source maximums ( ) ) ; mean statistics = snapshot map ( source mean statistics ( ) , mean statistic : : copy ) ; }


default set < authentication handler > resolve ( final set < authentication handler > candidate handlers , final authentication transaction transaction ) { val handlers = candidate handlers stream ( ) map ( authentication handler : : get name ) collect ( collectors joining ( " , " ) ) ; logger debug ( " default authentication handlers used for this transaction are [ { } ] " , handlers ) ; return candidate handlers ; }


public enum string required enum get enum string required ( ) { return enum string required ; }


public void set debug ( boolean debug f ) { this debug = debug f ; }


consume an attribute - specific error in a rule

void attribute error ( string attr name , string message ) ;


public static < k , v > multimap < k , v > unmodifiable multimap ( immutable multimap < k , v > delegate ) { return check not null ( delegate ) ; }


returns the number of milliseconds to wait before attempting the load again , or { @ link c # time unset } if the error is fatal and should not be retried loaders may ignore the retry delay returned by this method in order to wait for a specific event before retrying however , the load is retried if and only if this method does not return { @ link c # time unset }

default long get retry delay ms for ( load error info load error info ) { return get retry delay ms for ( load error info media load data data type , load error info load event info load duration ms , load error info exception , load error info error count ) ; }


used to avoid http : bugs sun comview bug do ? bug id = 6558557

private static < t > sorted set < t > cast ( iterable < t > iterable ) { return ( sorted set < t > ) iterable ; }


signals that transformation has produced a result if { @ code needs more data } , { @ link # process ( ) } will be called again with a new element ( or with { @ link optional # empty ( ) } if there are no more elements ) if not @ { code needs more data } , { @ link # process ( ) } will be called again with the same element

public static < t > transformation state < t > of result ( t result , boolean needs more data ) { return new transformation state < > ( type result , needs more data , optional of ( result ) , optional empty ( ) ) ; }


returns true if field success is set ( has been assigned a value ) and false otherwise

public boolean is set success ( ) { return this success ! = null ; }


returns the suffix ( { hash } ) for artifacts generated by cc library on windows

public static string get d l l hash suffix ( rule context rule context , feature configuration feature configuration ) { cpp options cpp options = preconditions check not null ( rule context get configuration ( ) get options ( ) get ( cpp options class ) ) ; if ( cpp options rename d l l & & cpp options dynamic mode ! = dynamic mode off & & feature configuration is enabled ( cpp rule classes targets windows ) / / because the custom def file in ` win def file ` does not contain the suffix of the dll , we / / should not calculate { hash } when ` win def file ` is used & & ( ! rule context is attr defined ( " win def file " , label ) | | rule context get prerequisite artifact ( " win def file " ) = = null ) ) { fingerprint digest = new fingerprint ( ) ; digest add string ( rule context get repository ( ) get name ( ) ) ; digest add path ( rule context get package directory ( ) ) ; return " " + digest hex digest and reset ( ) substring ( 0 , 10 ) ; } return " " ; }


writes a - keep rule for each class listing any members to keep we sort classes and members so the output is deterministic

private static void write keep directives ( print stream out , map < string , immutable set < keep reference > > seeds ) { seeds entry set ( ) stream ( ) sorted ( comparing ( map entry : : get key ) ) for each ordered ( type - > { out printf ( " - keep class % s { % n " , type get key ( ) replace ( ' / ' , ' ' ) ) ; type get value ( ) stream ( ) filter ( keep reference : : is member reference ) sorted ( comparing ( keep reference : : name ) then comparing ( keep reference : : desc ) ) map ( ref - > to keep descriptor ( ref ) ) distinct ( ) / / drop duplicates due to method descriptors with different returns for each ordered ( line - > out append ( " " ) append ( line ) append ( " ; " ) println ( ) ) ; out printf ( " } % n " ) ; } ) ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


public synchronized lease allocate ( @ non null file path base , object context ) throws interrupted exception { for ( int i = 1 ; ; i + + ) { file path candidate = i = = 1 ? base : base with suffix ( combinator + i ) ; entry e = in use get ( candidate get remote ( ) ) ; if ( e ! = null & & ! e quick & & e context ! = context ) continue ; return acquire ( candidate , false , context ) ; } }


return the property value associated with the given key , or { @ code default value } if the key cannot be resolved

< t > t get property ( string key , class < t > target type , t default value ) ;


public long long value ( ) { return sum ( ) ; }


will change globbing characters to work as expected in ghidra , unless the special characters are escaped with a backslash

private static string convert globbing characters to regex ( string input ) { / / note : order is important ! / / replace all unescaped ' ? ' chars matcher question matcher = question pattern matcher ( input ) ; string question replaced = question matcher replace all ( " " ) ; / / replace all unescaped ' * ' chars matcher star matcher = star pattern matcher ( question replaced ) ; / / * ? is a reluctant quantifier , matching zero or more ' * ' is the quantifier , ' ? ' makes / / it reluctant string star replaced = star matcher replace all ( " * ? " ) ; return star replaced ; }


for template expressions , return the prefix that identifies the end of an expression block within a string for example : " } "


turns a path ( relative or otherwise ) into an s3 key

public string path to key ( path path ) { return context accessors path to key ( path ) ; }


return the configured { @ link # set default charset ( charset ) default charset }

public charset get default charset ( ) { return this default charset ; }


fake endpoint for testing various parameters 가짜 엔드 포인트 fake endpoint for testing various parameters 가짜 엔드 포인트 < b > 400 < b > - invalid username supplied < b > 404 < b > - user not found

public response entity < void > test endpoint parameters with http info ( big decimal number , double double , string pattern without delimiter , byte [ ] byte , integer integer , integer int 3 2 , long int 6 4 , float float , string string , file binary , local date date , offset date time date time , string password , string param callback ) throws rest client exception { object post body = null ; / / verify the required parameter ' number ' is set if ( number = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' number ' when calling test endpoint parameters " ) ; } / / verify the required parameter ' double ' is set if ( double = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' double ' when calling test endpoint parameters " ) ; } / / verify the required parameter ' pattern without delimiter ' is set if ( pattern without delimiter = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' pattern without delimiter ' when calling test endpoint parameters " ) ; } / / verify the required parameter ' byte ' is set if ( byte = = null ) { throw new http client error exception ( http status bad request , " missing the required parameter ' byte ' when calling test endpoint parameters " ) ; } string path = api client expand path ( " / fake " , collections < string , object > empty map ( ) ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; if ( integer ! = null ) form params add ( " integer " , integer ) ; if ( int 3 2 ! = null ) form params add ( " int 3 2 " , int 3 2 ) ; if ( int 6 4 ! = null ) form params add ( " int 6 4 " , int 6 4 ) ; if ( number ! = null ) form params add ( " number " , number ) ; if ( float ! = null ) form params add ( " float " , float ) ; if ( double ! = null ) form params add ( " double " , double ) ; if ( string ! = null ) form params add ( " string " , string ) ; if ( pattern without delimiter ! = null ) form params add ( " pattern without delimiter " , pattern without delimiter ) ; if ( byte ! = null ) form params add ( " byte " , byte ) ; if ( binary ! = null ) form params add ( " binary " , new file system resource ( binary ) ) ; if ( date ! = null ) form params add ( " date " , date ) ; if ( date time ! = null ) form params add ( " date time " , date time ) ; if ( password ! = null ) form params add ( " password " , password ) ; if ( param callback ! = null ) form params add ( " callback " , param callback ) ; final string [ ] local var accepts = { } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] content types = { " application / x - www - form - urlencoded " } ; final media type content type = api client select header content type ( content types ) ; string [ ] auth names = new string [ ] { " http basic test " } ; parameterized type reference < void > return type = new parameterized type reference < void > ( ) { } ; return api client invoke a p i ( path , http method post , query params , post body , header params , cookie params , form params , local var accept , content type , auth names , return type ) ; }


finds a { @ link d w a r f attribute value attribute } with a matching { @ link d w a r f attribute } type returns null if the attribute does not exist or is wrong java class type attributes are searched for in each fragment in this aggregate , starting with the ' head ' fragment , progressing toward the ' decl ' fragment

public < t extends d w a r f attribute value > t get attribute ( int attribute , class < t > clazz ) { attr info attr info = find attribute ( attribute ) ; return attr info ! = null ? attr info get value ( clazz ) : null ; }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / func args return func args ; case 2 : / / request id return request id ; default : return null ; } }


list < localization status > get localization statuses ( ) ;


return the parts of a multipart request if the content - type is { @ code " multipartform - data " } or an empty map otherwise note : calling this method causes the request body to be read and parsed in full and the resulting { @ code multi value map } is cached so that this method is safe to call more than once note : the { @ linkplain part # content ( ) contents } of each part is not cached , and can only be read once

mono < multi value map < string , part > > get multipart data ( ) ;


get the number of return bytes , i e , the number of bytes immediately before ( and including ) a return instruction

public int get num return bytes ( ) { return num return bytes ; }


if true , the plugin is going to be activated next time jenkins runs

public boolean is enabled ( ) { return ! disable file exists ( ) ; }


adds the given providers from starlark an error is thrown if to add is not an iterable of objc provider instances

void add providers from starlark ( object to add ) throws eval exception { if ( ! ( to add instanceof iterable ) ) { throw starlark errorf ( apple starlark common bad providers iter error , starlark type ( to add ) ) ; } else { iterable < object > to add iterable = ( iterable < object > ) to add ; for ( object to add object : to add iterable ) { if ( ! ( to add object instanceof objc provider ) ) { throw starlark errorf ( apple starlark common bad providers elem error , starlark type ( to add object ) ) ; } else { objc provider objc provider = ( objc provider ) to add object ; this add transitive and propagate ( objc provider ) ; cc compilation context builder merge dependent cc compilation context ( objc provider get cc compilation context ( ) ) ; } } } }


set a click listener that will provide the parent view , model , and adapter position of the clicked view this will clear the normal view on click listener if one has been set

public test field prop child view model value ( @ nullable final on model click listener < test field prop child view model , test field prop child view > value ) { on mutation ( ) ; if ( value = = null ) { this value on click listener = null ; } else { this value on click listener = new wrapped epoxy model click listener ( value ) ; } return this ; }


returns false if the attributes of the rule are invalid

boolean check attributes ( rule context rule context , aspect parameters aspect parameters ) ;


if { @ link # is created ( ) } returns true , then this method returns the newly created item , which is always of the type { @ link waiting item }

public @ check for null waiting item get create item ( ) { return null ; }


public reindex request add sort field ( string name , sort order order ) { this get search request ( ) source ( ) sort ( name , order ) ; return this ; }


creates a block scope where if the block is for a try block the catch labels are removed

public write scope new block scope ( boolean is try block ) { return new write scope ( this , is try block ) ; }


public boolean on touch event ( final motion event event ) { switch ( event get action masked ( ) ) { case motion event action move : { / / update pointers update pointers on move ( event ) ; / / start a new gesture if not already started if ( ! m gesture in progress & & m pointer count > 0 & & should start gesture ( ) ) { start gesture ( ) ; } / / notify listener if ( m gesture in progress & & m listener ! = null ) { m listener on gesture update ( this ) ; } break ; } case motion event action down : case motion event action pointer down : case motion event action pointer up : case motion event action up : { / / restart gesture whenever the number of pointers changes m new pointer count = get pressed pointer count ( event ) ; stop gesture ( ) ; update pointers on tap ( event ) ; if ( m pointer count > 0 & & should start gesture ( ) ) { start gesture ( ) ; } break ; } case motion event action cancel : { m new pointer count = 0 ; stop gesture ( ) ; reset ( ) ; break ; } } return true ; }


return the current nested path of this { @ link errors } object returns a nested path with a dot , i e " address " , for easy building of concatenated paths default is an empty string


set assignments for the topologies which needs scheduling the new assignments is available through < code > cluster get assignments ( ) < code >

void schedule ( topologies topologies , cluster cluster ) ;


remove a list of i node directory snapshottable from the snapshot manager

void remove snapshottable dirs ( list < i node directory > to remove ) { if ( snapshot manager ! = null ) { snapshot manager remove snapshottable ( to remove ) ; } }


delegates to { @ link test context manager # after test execution }

public void after test execution ( extension context context ) throws exception { object test instance = context get required test instance ( ) ; method test method = context get required test method ( ) ; throwable test exception = context get execution exception ( ) or else ( null ) ; get test context manager ( context ) after test execution ( test instance , test method , test exception ) ; }


override any client properties in the original configs with overrides

private map < string , object > client props ( final set < string > config names , final map < string , object > originals ) { / / iterate all client config names , filter out non - client configs from the original / / property map and use the overridden values when they are not specified by users final map < string , object > parsed = new hash map < > ( ) ; for ( final string config name : config names ) { if ( originals contains key ( config name ) ) { parsed put ( config name , originals get ( config name ) ) ; } } return parsed ; }


public void test chunked response ( ) throws exception { kv state registry registry = new kv state registry ( ) ; kv state request stats stats = new atomic kv state request stats ( ) ; message serializer < kv state internal request , kv state response > serializer = new message serializer < > ( new kv state internal request kv state internal request deserializer ( ) , new kv state response kv state response deserializer ( ) ) ; kv state server handler handler = new kv state server handler ( test server , registry , serializer , stats ) ; embedded channel channel = new embedded channel ( get frame decoder ( ) , handler ) ; int num key groups = 1 ; abstract state backend abstract backend = new memory state backend ( ) ; dummy environment dummy env = new dummy environment ( " test " , 1 , 0 ) ; dummy env set kv state registry ( registry ) ; abstract keyed state backend < integer > backend = create keyed state backend ( registry , num key groups , abstract backend , dummy env ) ; final test registry listener registry listener = new test registry listener ( ) ; registry register listener ( dummy env get job i d ( ) , registry listener ) ; / / register state value state descriptor < byte [ ] > desc = new value state descriptor < > ( " any " , byte primitive array serializer instance ) ; desc set queryable ( " vanilla " ) ; value state < byte [ ] > state = backend get partitioned state ( void namespace instance , void namespace serializer instance , desc ) ; / / update kv state byte [ ] bytes = new byte [ 2 * channel config ( ) get write buffer high water mark ( ) ] ; byte current = 0 ; for ( int i = 0 ; i < bytes length ; i + + ) { bytes [ i ] = current + + ; } int key = 99812822 ; backend set current key ( key ) ; state update ( bytes ) ; / / request byte [ ] serialized key and namespace = kv state serializer serialize key and namespace ( key , int serializer instance , void namespace instance , void namespace serializer instance ) ; long request id = integer max value + 182828l ; assert true ( registry listener registration name equals ( " vanilla " ) ) ; kv state internal request request = new kv state internal request ( registry listener kv state id , serialized key and namespace ) ; byte buf ser request = message serializer serialize request ( channel alloc ( ) , request id , request ) ; / / write the request and wait for the response channel write inbound ( ser request ) ; object msg = read inbound blocking ( channel ) ; assert true ( " not chunked byte buf " , msg instanceof chunked byte buf ) ; ( ( chunked byte buf ) msg ) close ( ) ; }


disables scrolling in a direction the widget will be sized to the flick scroll pane in the disabled direction

public void set scrolling disabled ( boolean x , boolean y ) { disable x = x ; disable y = y ; invalidate ( ) ; }


public map < string , map < string , string > > get map map string ( ) { return map map string ; }


converts { @ link function hint } s to { @ link function template }

static set < function template > as function templates ( data type factory type factory , set < function hint > hints ) { return hints stream ( ) map ( hint - > { try { return function template from annotation ( type factory , hint ) ; } catch ( throwable t ) { throw extraction error ( t , " error in function hint annotation " ) ; } } ) collect ( collectors to collection ( linked hash set : : new ) ) ; }


increases the member use count by one when an member access is encountered

public boolean increment member use count ( class member use class member use ) { return member use counter add ( class member use ) ; }


converts an internal class name , method name , and method descriptor to an external method return type and name

private static string external method return type and name ( string internal class name , string internal method name , string internal method descriptor ) { return internal method name equals ( class constants method name init ) ? external short class name ( external class name ( internal class name ) ) : ( external method return type ( internal method descriptor ) + ' ' + internal method name ) ; }


public void set attribute factory ( attribute factory attribute factory ) { if ( attribute factory = = null ) { throw new null pointer exception ( " attribute factory = = null " ) ; } this attribute factory = attribute factory ; }


asserts that the requested sky value can be built and results in the expected set of files the metadata of files is ignored in comparing the actual results with the expected ones the returned object however contains the actual metadata

private final recursive filesystem traversal value traverse and assert files ( traversal request params , resolved file expected files ignoring metadata ) throws exception { recursive filesystem traversal value result = eval traversal request ( params ) ; map < path fragment , resolved file > name to actual resolved files = new hash map < > ( ) ; for ( resolved file act : result get transitive files ( ) to list ( ) ) { / / we can ' t compare directly , since metadata would be different , so we compare / / by comparing the results of public method calls name to actual resolved files put ( act get name in symlink tree ( ) , act ) ; } assert expected resolved files present ( name to actual resolved files , expected files ignoring metadata ) ; return result ; }


returns the vertex for the given id , creating it if it does not yet exist

private abstract test vertex vertex ( int id ) { / / / / first , find the exact instance of the vertex in the graph , as it may have state / / applied to it that we need to verify for testing / / abstract test vertex v = run swing ( ( ) - > { label test vertex label vertex = new label test vertex ( integer to string ( id ) ) ; collection < abstract test vertex > vertices = graph get vertices ( ) ; for ( abstract test vertex vertex : vertices ) { if ( label vertex equals ( vertex ) ) { return vertex ; } } return label vertex ; } ) ; graph add vertex ( v ) ; return v ; }


any interruption that happens as a result of calling interrupt task will arrive before this method is called complete futures here

abstract void after ran interruptibly ( @ nullable t result , @ nullable throwable error ) ;


public void id test ( ) { / / todo : test id }


sleep and suppress interrupted exception ( but re - signal it )

public static void quietly sleep ( final long millis ) { try { thread sleep ( millis ) ; } catch ( interrupted exception e ) { / / i said be quiet ! current thread ( ) interrupt ( ) ; } }


checks if an item ' s range bottom is above the top range if true , it means the item is outside range

private static boolean is above viewport top ( rect visible rect , incremental module item item ) { return ! is below viewport top ( visible rect , item ) ; }


to test watermark is monotonically incremental with randomized watermark producer parallelism = 2 ; kafka partition # = 3 ; consumer parallelism = 3

public void test watermark incremental ( ) throws exception { test watermark incremental ( 100000 ) ; }


public string get application id ( ) { return application id ; }


specify the name of the entity manager factory configuration default is none , indicating the default entity manager factory configuration the persistence provider will throw an exception if ambiguous entity manager configurations are found

public void set persistence unit name ( @ nullable string persistence unit name ) { this persistence unit name = persistence unit name ; }


limits the given input stream to the provided number of bytes

public static input stream limit stream ( input stream in , long limit ) { return new limited input stream ( in , limit ) ; }


gets the target path of the file write operation

public path get path ( ) { return path ; }


notes : edspsv sections - section data resides with rom space but is accessable via the the ram data space at 0x 8 0 0 0 - 0x f f f f with the use of page register page use may vary by cpu ( eds , psv low - word access , psv high - word access ) psv high - word access capability is only provided when eds is supported see page registers dsrpag and dswpag page registers must be non - zero when used page boundary handling must be explicitly handled in code eds memory may be directly accessed provided the page register as been three ways to access page memory : 1 direct access using d s r p a g d s w p a gpage registers ( pic24e , ds p i c 3 3 e and ds p i c 3 3 c ) with readwrite page register set to non - zero value , offset 0 0x 7 f f f within the page may be directly accessed by first setting bit - 15 of offset before performing a load or store to the range 0x 8 0 0 0 0x f f f f 2 table readwrite instruction may be used by setting tblpag register and performing operation with a table offset in the range 0 0x 7 f f f 3 psv direct access with psvpag register ( pic24f , pic24h , ds p i c 3 0 f and ds p i c 3 3 f ) set psv bit of corconl register , set page in psvpag register ( macro psvpage ( ) used to obtain page from symbol ) access location with offset 0 0x 7 f f f ( macro psvoffset ( ) used to obtain offset from symbol ) macro produces offset in the range 0x 8 0 0 0 0x f f f f

public boolean can handle ( elf header elf ) { return elf e machine ( ) = = em dspic30f ; }


initialize the view to select tracks for a specified renderer using { @ link mapped track info } and a set of { @ link default track selector parameters }

public void init ( mapped track info mapped track info , int renderer index , boolean is disabled , list < selection override > overrides , @ nullable comparator < format > track format comparator , @ nullable track selection listener listener ) { this mapped track info = mapped track info ; this renderer index = renderer index ; this is disabled = is disabled ; this track info comparator = track format comparator = = null ? null : ( o 1 , o 2 ) - > track format comparator compare ( o 1 format , o 2 format ) ; this listener = listener ; int max overrides = allow multiple overrides ? overrides size ( ) : math min ( overrides size ( ) , 1 ) ; for ( int i = 0 ; i < max overrides ; i + + ) { selection override override = overrides get ( i ) ; this overrides put ( override group index , override ) ; } update views ( ) ; }


check that we don ' t rely on the percent array order and that the iterator returns the values in the original order

public void test percent order ( ) { final double [ ] percents = new double [ ] { 0 50 , 0 25 , 0 01 , 0 99 , 0 60 } ; internal percentiles bucket aggregation = create test instance ( " test " , collections empty map ( ) , percents , random boolean ( ) ) ; iterator < percentile > iterator = aggregation iterator ( ) ; iterator < string > name iterator = aggregation value names ( ) iterator ( ) ; for ( double percent : percents ) { assert true ( iterator has next ( ) ) ; assert true ( name iterator has next ( ) ) ; percentile percentile = iterator next ( ) ; string percentile name = name iterator next ( ) ; assert equals ( percent , percentile get percent ( ) , 0 0d ) ; assert equals ( percent , double value of ( percentile name ) , 0 0d ) ; assert equals ( aggregation percentile ( percent ) , percentile get value ( ) , 0 0d ) ; } assert false ( iterator has next ( ) ) ; assert false ( name iterator has next ( ) ) ; }


visit a parse tree produced by { @ link sql base parser # pattern }

t visit pattern ( sql base parser pattern context ctx ) ;


public standalone mock mvc builder set content negotiation manager ( content negotiation manager manager ) { this content negotiation manager = manager ; return this ; }


mutate the given highlighter builder so the returned one is different in one aspect

private static highlight builder mutate ( highlight builder original ) throws i o exception { highlight builder mutation = serialized copy ( original ) ; if ( random boolean ( ) ) { mutate common options ( mutation ) ; } else { switch ( random int between ( 0 , 2 ) ) { / / change settings that only exists on top level case 0 : mutation use explicit field order ( ! original use explicit field order ( ) ) ; break ; case 1 : mutation encoder ( original encoder ( ) + random alpha of length ( 2 ) ) ; break ; case 2 : if ( random boolean ( ) ) { / / add another field mutation field ( new field ( random alpha of length ( 10 ) ) ) ; } else { / / change existing fields list < field > original fields = original fields ( ) ; field field to change = original fields get ( random int ( original fields size ( ) - 1 ) ) ; if ( random boolean ( ) ) { field to change fragment offset ( random int between ( 101 , 200 ) ) ; } else { field to change matched fields ( random string array ( 5 , 10 ) ) ; } } break ; } } return mutation ; }


creates a new async stub that supports all call types for the service

public static simple service stub new stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < simple service stub > factory = new io grpc stub abstract stub stub factory < simple service stub > ( ) { @ java lang override public simple service stub new stub ( io grpc channel channel , io grpc call options call options ) { return new simple service stub ( channel , call options ) ; } } ; return simple service stub new stub ( factory , channel ) ; }


determines whether this fluent iterable is empty < b > { @ code stream } equivalent : < b > { @ code ! stream find any ( ) is present ( ) }

public final boolean is empty ( ) { return ! get delegate ( ) iterator ( ) has next ( ) ; }


enables a dark shadow for this circular image view

public void set shadow enabled ( boolean enabled ) { shadow enabled = enabled ; update shadow ( ) ; }


updates the { @ link dash manifest } that this handler works on

public void update manifest ( dash manifest new manifest ) { is waiting for manifest refresh = false ; expired manifest publish time us = c time unset ; this manifest = new manifest ; remove previously expired manifest publish time values ( ) ; }


returns the mean time spent actively waiting for playback per foreground playback , in milliseconds , or { @ link c # time unset } if no playback has been in foreground this includes all join times , rebuffer times and seek times , but excludes times without user intention to play , e g all paused states

public long get mean wait time ms ( ) { return foreground playback count = = 0 ? c time unset : get total wait time ms ( ) / foreground playback count ; }


find the fields constant that matches name , or null if its not found

public static fields find by name ( string name ) { return by name get ( name ) ; }


deserialize the { @ link abstract symbol information } from the appropriate stream in the pdb

void deserialize ( int stream number , task monitor monitor ) throws i o exception , pdb exception , cancelled exception { if ( pdb has minimal debug info ( ) ) { hash records bit map length = 0x 8 0 0 0 ; num extra bytes = 0 ; / / i believe ; num hash records = 0x 3ffff ; } else { hash records bit map length = 0x 2 0 0 ; num extra bytes = 4 ; num hash records = 0x 1 0 0 0 ; } }


actually close the given { @ link connection } , obtained from the given { @ link connection factory } same as { @ link # release connection } , but preserving the original exception

public static mono < void > do release connection ( connection connection , connection factory connection factory ) { return transaction synchronization manager for current transaction ( ) flat map ( synchronization manager - > { connection holder con holder = ( connection holder ) synchronization manager get resource ( connection factory ) ; if ( con holder ! = null & & connection equals ( con holder , connection ) ) { / / it ' s the transactional connection : don ' t close it con holder released ( ) ; } return mono from ( connection close ( ) ) ; } ) on error resume ( no transaction exception class , e - > mono from ( connection close ( ) ) ) ; }


public void test get store mode ( ) { assertions assert equals ( " file " , parameter parser get store mode ( ) ) ; }


returns a new { @ link simple attribute set } with the following default attributes set : font family : " tahoma " font size : 11 bold : true

protected simple attribute set create attribute set ( color color ) { simple attribute set attr set = new simple attribute set ( ) ; attr set add attribute ( style constants font family , " tahoma " ) ; attr set add attribute ( style constants font size , integer value of ( 11 ) ) ; attr set add attribute ( style constants bold , boolean true ) ; attr set add attribute ( style constants foreground , color ) ; return attr set ; }


specify { @ code @ configuration } andor { @ code @ component } classes for the { @ linkplain # create servlet application context ( ) servlet application context }

protected abstract class < ? > [ ] get servlet config classes ( ) ;


public api client get api client ( ) { return api client ; }


return the j a x b context used by this marshaller , lazily building it if necessary

public j a x b context get jaxb context ( ) { j a x b context context = this jaxb context ; if ( context ! = null ) { return context ; } synchronized ( this jaxb context monitor ) { context = this jaxb context ; if ( context = = null ) { try { if ( string utils has length ( this context path ) ) { context = create jaxb context from context path ( this context path ) ; } else if ( ! object utils is empty ( this classes to be bound ) ) { context = create jaxb context from classes ( this classes to be bound ) ; } else if ( ! object utils is empty ( this packages to scan ) ) { context = create jaxb context from packages ( this packages to scan ) ; } else { context = j a x b context new instance ( ) ; } this jaxb context = context ; } catch ( j a x b exception ex ) { throw convert jaxb exception ( ex ) ; } } return context ; } }


creates a decal using the region for texturing and the specified blending parameters for blending

public static decal new decal ( float width , float height , texture region texture region , int src blend factor , int dst blend factor , decal material material ) { decal decal = new decal ( material ) ; decal set texture region ( texture region ) ; decal set blending ( src blend factor , dst blend factor ) ; decal dimensions x = width ; decal dimensions y = height ; decal set color ( 1 , 1 , 1 , 1 ) ; return decal ; }


public void test initial state ( ) throws exception { min max avg stats mma = new min max avg stats ( ) ; assert equals ( 0 , mma get minimum ( ) ) ; assert equals ( 0 , mma get maximum ( ) ) ; assert equals ( 0 , mma get sum ( ) ) ; assert equals ( 0 , mma get count ( ) ) ; assert equals ( 0 , mma get average ( ) ) ; }


sets the max width and max height to the specified value if the max size is 0 , no maximum size is used

public cell < t > max size ( value size ) { if ( size = = null ) throw new illegal argument exception ( " size cannot be null " ) ; max width = size ; max height = size ; return this ; }


public int get index ( ) { return iter get index ( ) ; }


this method updates the queue for a specific application , and it is reachable by using { @ link r m w s consts # apps appid queue }

response update app queue ( app queue target queue , http servlet request hsr , string app id ) throws authorization exception , yarn exception , interrupted exception , i o exception ;


sets the animation from json string this is the ideal api to use when loading an animation over the network because you can use the raw response body here and a conversion to a j s o n object never has to be done

public void set animation from json ( string json string , @ nullable string cache key ) { set animation ( new byte array input stream ( json string get bytes ( ) ) , cache key ) ; }


combine a host and port into an authority string

public static string authority from host and port ( string host , int port ) { try { return new uri ( null , null , host , port , null , null , null ) get authority ( ) ; } catch ( u r i syntax exception ex ) { throw new illegal argument exception ( " invalid host or port : " + host + " " + port , ex ) ; } }


hides the given model , and notifies that the item changed if the item wasn ' t already hidden

protected void hide model ( epoxy model < ? > model ) { show model ( model , false ) ; }


is the byte sequences at { @ code offset } in the value at { @ code position } equal to the byte sequence at { @ code other offset } in { @ code other slice } this method must be implemented if @ { code get slice } is implemented

default boolean bytes equal ( int position , int offset , slice other slice , int other offset , int length ) { throw new unsupported operation exception ( get class ( ) get name ( ) ) ; }


test for a bug where threads weren ' t getting signaled when shutdown was called , only when tasks completed

public void test direct executor service await termination missed signal ( ) { final executor service service = more executors new direct executor service ( ) ; thread waiter = new thread ( ) { @ override public void run ( ) { try { service await termination ( 1 , time unit days ) ; } catch ( interrupted exception e ) { return ; } } } ; waiter start ( ) ; await timed waiting ( waiter ) ; service shutdown ( ) ; uninterruptibles join uninterruptibly ( waiter , 10 , time unit seconds ) ; if ( waiter is alive ( ) ) { waiter interrupt ( ) ; fail ( " await termination failed to trigger after shutdown ( ) " ) ; } }


public void direct map test ( ) { / / todo : test direct map }


public void attribute string test ( ) { / / todo : test attribute string }


rx version of { @ link abstract dao # insert or replace in tx ( iterable ) } returning an observable note that the observable will emit the given entities back to its subscribers

public observable < iterable < t > > insert or replace in tx ( final iterable < t > entities ) { return wrap ( new callable < iterable < t > > ( ) { @ override public iterable < t > call ( ) throws exception { dao insert or replace in tx ( entities ) ; return entities ; } } ) ; }


read { @ code v } - type value from a stream

v read ( stream input in ) throws i o exception ;


public void array of string test ( ) { / / todo : test array of string }


wait until no watcher has been fired in the last second to ensure that all watches that are waiting to be fired have been fired

private void wait for all watchers ( ) throws exception { time of last watcher invocation = system current time millis ( ) ; while ( system current time millis ( ) - time of last watcher invocation < 1000 ) { thread sleep ( 1000 ) ; } }


public void array item test ( ) { / / todo : test array item }


registers that this { @ link task thread } is run for the specified { @ link task action } this can be explicitly called from subtypes to associate a single { @ link task thread } across multiple tag actions

protected final void associate with ( task action action ) { action worker thread = this ; action log = new weak reference < > ( log ) ; }


tests that we can register task manager and their slots at the slot manager

public void test task manager registration ( ) throws exception { final task executor gateway task executor gateway = new testing task executor gateway builder ( ) create testing task executor gateway ( ) ; final resource i d resource id = resource i d generate ( ) ; final task executor connection task manager connection = new task executor connection ( resource id , task executor gateway ) ; final slot i d slot id 1 = new slot i d ( resource id , 0 ) ; final slot i d slot id 2 = new slot i d ( resource id , 1 ) ; final slot report slot report = new slot report ( arrays as list ( create free slot status ( slot id 1 ) , create free slot status ( slot id 2 ) ) ) ; final default slot tracker slot tracker = new default slot tracker ( ) ; try ( declarative slot manager slot manager = create declarative slot manager builder ( ) set slot tracker ( slot tracker ) build and start with direct exec ( ) ) { slot manager register task manager ( task manager connection , slot report , resource profile any , resource profile any ) ; assert that ( " the number registered slots does not equal the expected number " , slot manager get number registered slots ( ) , is ( 2 ) ) ; assert not null ( slot tracker get slot ( slot id 1 ) ) ; assert not null ( slot tracker get slot ( slot id 2 ) ) ; } }


public void test seek and read past end of file ( ) throws throwable { instream = fs open ( read file ) ; assert equals ( 0 , instream get pos ( ) ) ; / / expect that seek to 0 works / / go just before the end instream seek ( seek file len - 2 ) ; assert true ( " premature eof " , instream read ( ) ! = - 1 ) ; assert true ( " premature eof " , instream read ( ) ! = - 1 ) ; assert minus one ( " read past end of file " , instream read ( ) ) ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit every rule ( parser rule context ctx ) { }


tests that with { @ link high availability mode # zookeeper } distributed j a rs are recoverable from any participating blob server when talking to the { @ link org apache flink runtime blob blob server } directly

public void test blob server recovery ( ) throws exception { org apache flink configuration configuration config = new org apache flink configuration configuration ( ) ; config set string ( high availability options ha mode , " zookeeper " ) ; config set string ( blob server options storage directory , temporary folder new folder ( ) get absolute path ( ) ) ; config set string ( high availability options ha storage path , hdfs u r i ) ; blob store service blob store service = blob utils create blob store from config ( config ) ; try { blob server recovery test test blob server recovery ( config , blob store service ) ; } finally { blob store service close and cleanup all data ( ) ; } }


public map < string , list < string > > get response headers ( ) { return response headers ; }


public split zip add output ( string output ) throws i o exception { preconditions check not null ( output ) ; outputs add ( new zip out ( new file output stream ( output , false ) get channel ( ) , output ) ) ; return this ; }


creates a { @ link x 5 0 9 extended key manager } based on the key material in the provided { @ link key store }

static x 5 0 9 extended key manager create key manager ( key store key store , char [ ] password , string algorithm ) throws general security exception { key manager factory kmf = key manager factory get instance ( algorithm ) ; kmf init ( key store , password ) ; key manager [ ] key managers = kmf get key managers ( ) ; for ( key manager key manager : key managers ) { if ( key manager instanceof x 5 0 9 extended key manager ) { return ( x 5 0 9 extended key manager ) key manager ; } } throw new ssl config exception ( " failed to find a x 5 0 9 extended key manager in the key manager factory for [ " + algorithm + " ] and keystore [ " + key store + " ] " ) ; }


public void code sample test ( ) { mammal example mammal = new mammal ( ) ; / / create a new pig pig example pig = new pig ( ) ; / / set mammal to pig example mammal set actual instance ( example pig ) ; / / to get back the pig set earlier pig test pig = ( pig ) example mammal get actual instance ( ) ; / / create a new whale whale example whale = new whale ( ) ; / / set mammal to whale example mammal set actual instance ( example whale ) ; / / to get back the whale set earlier whale test whale = ( whale ) example mammal get actual instance ( ) ; / / create a new zebra zebra example zebra = new zebra ( ) ; / / set mammal to zebra example mammal set actual instance ( example zebra ) ; / / to get back the zebra set earlier zebra test zebra = ( zebra ) example mammal get actual instance ( ) ; }


sets the color of all four vertices to the specified color

public void set color ( float r , float g , float b , float a ) { color set ( r , g , b , a ) ; int int bits = ( ( int ) ( 255 * a ) < < 24 ) | ( ( int ) ( 255 * b ) < < 16 ) | ( ( int ) ( 255 * g ) < < 8 ) | ( ( int ) ( 255 * r ) ) ; float color = number utils int to float color ( int bits ) ; vertices [ c1 ] = color ; vertices [ c2 ] = color ; vertices [ c3 ] = color ; vertices [ c4 ] = color ; }


encoding overhead is brackets and a comma for each span over 1

@ override public int list size in bytes ( list < byte [ ] > values ) { int size in bytes = 2 ; / / brackets for ( int i = 0 , length = values size ( ) ; i < length ; ) { size in bytes + = values get ( i + + ) length ; if ( i < length ) size in bytes + + ; } return size in bytes ; }


gets the { @ link logs } interface used to fetch different types of logs to set the logging preferences { @ link logging preferences }


public float get restitution ( ) { return jni get restitution ( addr ) ; }


converts the values of the map from { @ link test node } to { @ link test case node } filtering out null values

private static map < description , test case node > filter test cases ( map < description , test node > tests ) { map < description , test case node > filtered and converted tests = new hash map < > ( ) ; for ( description key : tests key set ( ) ) { test node test node = tests get ( key ) ; if ( test node instanceof test case node ) { filtered and converted tests put ( key , ( test case node ) test node ) ; } } return filtered and converted tests ; }


public double get one minute rate ( ) { return 0d ; }


invoked when this thread local variable is removed by { @ link # remove ( ) }

protected void on removal ( @ suppress warnings ( " unused " ) v value ) throws exception { }


verify that , when the callback fails to enter active state , the elector rejoins the election after sleeping for a short period

public void test fail to become active ( ) throws exception { mock no prior active ( ) ; elector join election ( data ) ; assert assert equals ( 0 , elector slept for ) ; mockito do throw ( new service failed exception ( " failed to become active " ) ) when ( mock app ) become active ( ) ; elector process result ( code ok int value ( ) , zk lock name , mock z k , zk lock name ) ; / / should have tried to become active mockito verify ( mock app ) become active ( ) ; / / should re - join mockito verify ( mock z k , mockito times ( 2 ) ) create ( zk lock name , data , ids open acl unsafe , create mode ephemeral , elector , mock z k ) ; assert assert equals ( 2 , count ) ; assert assert true ( elector slept for > 0 ) ; }


returns an object that represents one of the choices in the given list the actual behavior of the method depends on your environment , which can be gui or headless regardless of environment - - if script arguments have been set , this method will use the next argument in the array and advance the array index so the next call to an ask method will get the next argument if there are no script arguments and a properties file sharing the same base name as the ghidra script exists ( i e , script 1 properties for script 1 java ) , then this method will then look there for the string value to return the method will look in the properties file by searching for a property name that is a space - separated concatenation of the input string parameters ( title + " " + message ) if that property name exists and its value represents a valid choice , then the properties value will be used in the following way : in the gui environment , this method displays a popup dialog that prompts the user to choose from the given list of objects the pre - chosen choice will be the last user - chosen value ( if the dialog has been run before ) if that does not exist , the pre - chosen value is the properties value if that does not exist or is invalid , then the ' default value ' parameter is used ( as long as it is not null ) in the headless environment , this method returns an object representing the properties value ( if it exists and is a valid choice ) , or throws an exception if there is an invalid or missing properties value

public < t > t ask choice ( string title , string message , list < t > choices , t default value ) throws cancelled exception { / / the value parser function is only a two parameter list ( string , t ) we have another / / parameter for this method ' s parse function so , curry it string transformer < t > curry = s - > parse choice ( s , choices ) ; string key = join ( title , message ) ; t existing value = load ask value ( default value , curry , key ) ; if ( is running headless ( ) ) { return existing value ; } class < ? > clazz = choices get ( 0 ) get class ( ) ; t choice = do ask ( clazz , title , message , existing value , last value - > { ask dialog < t > dialog = new ask dialog < > ( null , title , message , ask dialog string , choices , last value ) ; if ( dialog is canceled ( ) ) { throw new cancelled exception ( ) ; } t value = dialog get choice value ( ) ; return value ; } ) ; return choice ; }


public void prefix number test ( ) { / / todo : test prefix number }


protected synchronized void set cleanup progress ( float p ) { super set cleanup progress ( p ) ; }


convert android net uri to java net url as necessary for some networking a p is

public static url uri to url ( @ nullable uri uri ) { if ( uri = = null ) { return null ; } try { return new url ( uri to string ( ) ) ; } catch ( java net malformed u r l exception e ) { / / this should never happen since we got a valid uri throw new runtime exception ( e ) ; } }


check that if a template matches the index to be created , but that template has the allow auto create setting turned off , then it overrides the global setting

public void test disabled auto create template setting does not override ( ) { string random index = random alpha of length between ( 2 , 10 ) ; final composable index template template = new composable index template builder ( ) index patterns ( list of ( random index char at ( 0 ) + " * " ) ) component templates ( list of ( ) ) metadata ( map of ( ) ) allow auto create ( false ) build ( ) ; final metadata metadata = metadata builder ( ) index templates ( map of ( " test template " , template ) ) build ( ) ; final cluster state cluster state = cluster state builder ( build cluster state ( ) ) metadata ( metadata ) build ( ) ; settings settings = settings builder ( ) put ( auto create index auto create index setting get key ( ) , false ) build ( ) ; auto create index auto create index = new auto create index ( settings ) ; index not found exception e = expect throws ( index not found exception class , ( ) - > auto create index should auto create ( random index , cluster state ) ) ; assert equals ( " no such index [ composable template [ " + random index char at ( 0 ) + " * ] forbids index auto creation ] " , e get message ( ) ) ; }


get the authentication method from the real user ' s subject if there is no real user , return the given user ' s authentication method

public synchronized authentication method get real authentication method ( ) { user group information ugi = get real user ( ) ; if ( ugi = = null ) { ugi = this ; } return ugi get authentication method ( ) ; }


return the class loader to load class path resources with will get passed to class path resource ' s constructor for all class path resource objects created by this resource loader

public class loader get class loader ( ) { return ( this class loader ! = null ? this class loader : class utils get default class loader ( ) ) ; }


list all of the current partition reassignments the following exceptions can be anticipated when calling { @ code get ( ) } on the futures obtained from the returned { @ code list partition reassignments result } : { @ link org apache kafka common errors cluster authorization exception } if the authenticated user doesn ' t have alter access to the cluster { @ link org apache kafka common errors unknown topic or partition exception } if a given topic or partition does not exist { @ link org apache kafka common errors timeout exception } if the request timed out before the controller could list the current reassignments

default list partition reassignments result list partition reassignments ( list partition reassignments options options ) { return list partition reassignments ( optional empty ( ) , options ) ; }


test that , when zoo keeper fails , the system remains in its current state , without triggering any failovers , and without causing the active node to enter standby state

public void test zoo keeper failure ( ) throws exception { cluster start ( ) ; / / record initial zk sessions long session 0 = cluster get elector ( 0 ) get z k session id for tests ( ) ; long session 1 = cluster get elector ( 1 ) get z k session id for tests ( ) ; log info ( " = = = = = = stopping zk server " ) ; stop server ( ) ; wait for server down ( host port , connection timeout ) ; log info ( " = = = = = = waiting for services to enter neutral mode " ) ; cluster wait for elector state ( 0 , active standby elector state neutral ) ; cluster wait for elector state ( 1 , active standby elector state neutral ) ; log info ( " = = = = = = checking that the services didn ' t change ha state " ) ; assert equals ( h a service state active , cluster get service ( 0 ) state ) ; assert equals ( h a service state standby , cluster get service ( 1 ) state ) ; log info ( " = = = = = = restarting server " ) ; start server ( ) ; wait for server up ( host port , connection timeout ) ; / / nodes should go back to their original states , since they re - obtain / / the same sessions cluster wait for elector state ( 0 , active standby elector state active ) ; cluster wait for elector state ( 1 , active standby elector state standby ) ; / / check ha states didn ' t change cluster wait for h a state ( 0 , h a service state active ) ; cluster wait for h a state ( 1 , h a service state standby ) ; / / check they re - used the same sessions and didn ' t spuriously reconnect assert equals ( session 0 , cluster get elector ( 0 ) get z k session id for tests ( ) ) ; assert equals ( session 1 , cluster get elector ( 1 ) get z k session id for tests ( ) ) ; }


returns true if a touch has been dragged outside the tap square

public boolean is dragging ( ) { return dragging ; }


returns an { @ link escaper } that does no escaping , passing all character data through unchanged

public static escaper null escaper ( ) { return null escaper ; }


public void test restored from file async committing ( ) throws exception { try { session holder init ( " file " ) ; global session global session = new global session ( " demo - app " , " my test tx group " , " test " , 6000 ) ; string xid = xid generate x i d ( global session get transaction id ( ) ) ; global session set xid ( xid ) ; global session add session lifecycle listener ( session holder get root session manager ( ) ) ; global session begin ( ) ; branch session branch session 1 = session helper new branch by global ( global session , branch type at , resource id , " ta : 1 " , " xxx " ) ; assertions assert true ( branch session 1 lock ( ) ) ; global session add branch ( branch session 1 ) ; lock manager lock manager = new file lock manager for test ( ) ; string other x i d = xid generate x i d ( 0l ) ; assertions assert false ( lock manager is lockable ( other x i d , resource id , " ta : 1 " ) ) ; global session change status ( global status async committing ) ; lock manager clean all locks ( ) ; assertions assert true ( lock manager is lockable ( other x i d , resource id , " ta : 1 " ) ) ; / / re - init session holder : restore sessions from file session holder init ( " file " ) ; long tid = global session get transaction id ( ) ; global session reload session = session holder find global session ( global session get xid ( ) ) ; assertions assert equals ( reload session get status ( ) , global status async committing ) ; global session session in async committing queue = session holder get async committing session manager ( ) find global session ( global session get xid ( ) ) ; assertions assert true ( reload session = = session in async committing queue ) ; / / no locking for session in async committing status assertions assert true ( lock manager is lockable ( other x i d , resource id , " ta : 1 " ) ) ; / / clear reload session add session lifecycle listener ( session holder get root session manager ( ) ) ; reload session end ( ) ; } finally { session holder destroy ( ) ; } }


sets the { @ code additional properties } and returns a reference to this builder so that the methods can be chained together

public builder with additional properties ( map < string , object > additional properties ) { this additional properties = additional properties ; return this ; }


creates the collector tree from the provided < code > collectors < code >

static collector create query collector ( list < query collector context > collectors ) throws i o exception { collector collector = null ; for ( query collector context ctx : collectors ) { collector = ctx create ( collector ) ; } return collector ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


changes the tenant id for all jobs related to a given { @ link deployment entity }

void update job tenant id for deployment ( string deployment id , string new tenant id ) ;


get an optional of { @ link function definition } by a given name

default optional < function definition > get function definition ( string name ) { return optional empty ( ) ; }


note : that this api is only for jackson json deserialization

public void set name ( string name ) { this name = name ; }


returns whether this predicate can be used while simplifying other or operands

default boolean allowed in or ( rel opt predicate list predicates ) { return true ; }


calculate the depth on the litho components in general android view hierarchy

private static int get litho view depth in android ( litho view view ) { int depth = 3 ; view parent parent = view get parent ( ) ; while ( parent ! = null ) { depth + + ; parent = parent get parent ( ) ; } return depth ; }


return the number of advisors applying to this proxy the default implementation delegates to { @ code get advisors ( ) length }

default int get advisor count ( ) { return get advisors ( ) length ; }


gets the information about the queue item for the given project

private list < item > live get items ( task t ) { lock lock ( ) ; try { list < item > result = new array list < > ( ) ; result add all ( blocked projects get all ( t ) ) ; result add all ( buildables get all ( t ) ) ; / / do not include pendings — we have already finalized work unit context actions if ( logger is loggable ( level fine ) ) { list < buildable item > the pendings = pendings get all ( t ) ; if ( ! the pendings is empty ( ) ) { logger log ( level fine , " ignoring { 0 } during schedule internal " , the pendings ) ; } } for ( item item : waiting list ) { if ( item task equals ( t ) ) { result add ( item ) ; } } return result ; } finally { lock unlock ( ) ; } }


public static void w ( string tag , string msg ) { if ( s is log enabled ) { log w ( tag , get content ( get current stack trace element ( ) ) + " > " + msg ) ; } }


whether the view is a view reference specified via a name to be resolved by the dispatcher servlet via a view resolver

public boolean is view reference ( ) { return ( this view instanceof string ) ; }


set the parallelism for this algorithm ' s operators this parameter is necessary because processing a small amount of data with high operator parallelism is slow and wasteful with memory and buffers operator parallelism should be set to this given value unless processing asymptotically more data , in which case the default job parallelism should be inherited

public graph algorithm wrapping base < k , vv , ev , r > set parallelism ( int parallelism ) { preconditions check argument ( parallelism > 0 | | parallelism = = parallelism default , " the parallelism must be at least one , or execution config parallelism default ( use system default ) " ) ; this parallelism = parallelism ; return this ; }


invoked before the start of concurrent handling in the original thread in which the { @ code callable } is submitted for concurrent handling this is useful for capturing the state of the current thread just prior to invoking the { @ link callable } once the state is captured , it can then be transferred to the new { @ link thread } in { @ link # pre process ( native web request , callable ) } capturing the state of spring security ' s security context holder and migrating it to the new thread is a concrete example of where this is useful the default implementation is empty

default < t > void before concurrent handling ( native web request request , callable < t > task ) throws exception { }


get storeinventory : returns pet inventories by status returns a map of status codes to quantities

default mono < response entity < map < string , integer > > > get inventory ( @ api ignore final server web exchange exchange ) { return get delegate ( ) get inventory ( exchange ) ; }


return the names of beans matching the given type ( including subclasses ) , judging from either bean definitions or the value of { @ code get object type } in the case of factory beans < b > note : this method introspects top - level beans only < b > it does not check nested beans which might match the specified type as well does consider objects created by factory beans if the " allow eager init " flag is set , which means that factory beans will get initialized if the object created by the factory bean doesn ' t match , the raw factory bean itself will be matched against the type if " allow eager init " is not set , only raw factory beans will be checked ( which doesn ' t require initialization of each factory bean ) does not consider any hierarchy this factory may participate in use bean factory utils ' { @ code bean names for type including ancestors } to include beans in ancestor factories too note : does not ignore singleton beans that have been registered by other means than bean definitions bean names returned by this method should always return bean names in the order of definition in the backend configuration , as far as possible

string [ ] get bean names for type ( resolvable type type , boolean include non singletons , boolean allow eager init ) ;


returns the { @ link objc provider } to use as input to the support controlling link actoins ; dylib symbols should be subtracted from this provider

abstract objc provider objc link provider ( ) ;


private void live in at statement ( ) { / / if s is the first statement in block n if ( statement index = = 0 ) { / / v is live - in at n block n add live in ( reg v ) ; bit set preds = block n get predecessors ( ) ; live out blocks or ( preds ) ; } else { / / let s ' be the statement preceeding s statement index - = 1 ; next function = next function live out at statement ; } }


public boolean wait for completion ( ) { return wait for completion ; }


type of resource collection that is being requested , e g istionetworkingv 1alpha 3 virtual service k 8s & lt ; api version & gt ; & lt ; kind & gt ; < code > string collection = 2 ; < code >

public builder set collection ( java lang string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } collection = value ; on changed ( ) ; return this ; }


public string get source file name ( ) { string id ms type string id type = pdb get type record ( get source file name string id record number ( ) , string id ms type class ) ; if ( string id type = = null ) { return null ; } return string id type get string ( ) ; }


sets the maximum size of header list allowed to be received this is cumulative size of the headers with some overhead , as defined for < a href = " http : httpwg orgspecsrfc 7 5 4 0 html # rfc section 6 5 2 " > http2 ' s settings max header list size the default is 8 ki b

public netty channel builder max header list size ( int max header list size ) { return max inbound metadata size ( max header list size ) ; }


this mount item represents the top - level root host ( litho view ) which is always mounted

static mount item create root host mount item ( litho view litho view ) { final view node info view node info = new view node info ( ) ; view node info set layout direction ( yoga direction inherit ) ; layout output output = new layout output ( null , null , view node info , host component create ( ) , null , litho view get previous mount bounds ( ) , 0 , 0 , 0 , 0 , important for accessibility auto , litho view get context ( ) get resources ( ) get configuration ( ) orientation , null ) ; mount item item = new mount item ( layout output create ( output , litho view get litho render unit factory ( ) , null , null ) , litho view , litho view ) ; item set mount data ( new litho mount data ( litho view ) ) ; return item ; }


returns the appropriate handler for recursive resolve calls

public abstract data type conflict handler get subsequent handler ( ) ;


creates a monitoring timestamped index using the current template version

protected void create timestamped index ( zoned date time creation date ) { create timestamped index ( creation date , monitoring template utils template version ) ; }


creates a standard conflict count message for an address range this indicates which conflict you are resolving of some total number of conflicts for a given address range

public static string get conflict count ( int conflict num , int total conflicts , address range range ) { string buffer buf = new string buffer ( get conflict count ( conflict num , total conflicts ) ) ; buf append ( " for address range : " ) ; add address ( buf , range get min address ( ) ) ; buf append ( " - " ) ; add address ( buf , range get max address ( ) ) ; return buf to string ( ) ; }


invoked on a background thread after the referent has been garbage collected unless security restrictions prevented starting a background thread , in which case this method is invoked when new references are created


sets the < code > user status < code > property

public void set user status ( integer user status ) { this user status = user status ; }


public static view set status bar color ( @ non null final activity activity , @ color int final int color , final boolean is decor ) { if ( build version sdk int < build version codes kitkat ) return null ; transparent status bar ( activity ) ; return apply status bar color ( activity , color , is decor ) ; }


if the child node or attribute doesn ' t exist , it is created usage example : node property = get first child by attr value ( properties , " property " , " name " ) ;

private static node get first child by name attr value ( node node , string child name , string attr , string value ) { node list child nodes = node get child nodes ( ) ; for ( int i = 0 ; i < child nodes get length ( ) ; i + + ) { if ( child nodes item ( i ) get node name ( ) equals ( child name ) ) { named node map attributes = child nodes item ( i ) get attributes ( ) ; node attribute = attributes get named item ( attr ) ; if ( attribute get node value ( ) equals ( value ) ) return child nodes item ( i ) ; } } node new node = node get owner document ( ) create element ( child name ) ; named node map attributes = new node get attributes ( ) ; attr node attr = node get owner document ( ) create attribute ( attr ) ; node attr set node value ( value ) ; attributes set named item ( node attr ) ; if ( child nodes item ( 0 ) ! = null ) { return node insert before ( new node , child nodes item ( 0 ) ) ; } else { return node append child ( new node ) ; } }


set the prefix that placeholders replaced by this resolver must begin with the default is " $ { "

public void set placeholder prefix ( string placeholder prefix ) { assert not null ( placeholder prefix , " ' placeholder prefix ' must not be null " ) ; this placeholder prefix = placeholder prefix ; }


creates a new blocking - style stub that supports unary and streaming output calls on the service

public static reconnect service blocking stub new blocking stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < reconnect service blocking stub > factory = new io grpc stub abstract stub stub factory < reconnect service blocking stub > ( ) { @ java lang override public reconnect service blocking stub new stub ( io grpc channel channel , io grpc call options call options ) { return new reconnect service blocking stub ( channel , call options ) ; } } ; return reconnect service blocking stub new stub ( factory , channel ) ; }


the context exposes these metadata for use in the processor normally , they are set by the kafka streams framework , but for the purpose of driving unit tests , you can set them directly

public void set record metadata ( final string topic , final int partition , final long offset ) { record metadata = new mock record metadata ( topic , partition , offset ) ; }


sets the children of this node to the given list of child nodes and fires the appropriate tree event to kick the tree to update the display note : this method must be called from the swing thread because it will notify the underlying j tree

protected synchronized void do set children and fire event ( list < g tree node > child list ) { do set children ( child list ) ; do fire node structure changed ( ) ; }


public void set comment ( string comment ) throws zip exception { set comment ( get bytes ( comment ) ) ; }


returns the appropriate { @ code mark - local } rop for the given type the result is a shared instance

public static rop op mark local ( type bearer type ) { switch ( type get basic frame type ( ) ) { case type bt int : return mark local int ; case type bt long : return mark local long ; case type bt float : return mark local float ; case type bt double : return mark local double ; case type bt object : return mark local object ; } return throw bad type ( type ) ; }


public void process ( i node inode ) { if ( inode ! = null ) { inode destroy and collect blocks ( reclaim context ) ; } }


tests that the method { @ code put edge } will silently add the missing nodes to the graph , then add the edge connecting them we are not using the proxy methods here as we want to test { @ code put edge } when the end - points are not elements of the graph

public void put edge nodes not in graph ( ) { assume ( ) that ( graph is mutable ( ) ) is true ( ) ; graph as mutable graph add node ( n1 ) ; assert true ( graph as mutable graph put edge ( n1 , n5 ) ) ; assert true ( graph as mutable graph put edge ( n4 , n1 ) ) ; assert true ( graph as mutable graph put edge ( n2 , n3 ) ) ; assert that ( graph nodes ( ) ) contains exactly ( n1 , n5 , n4 , n2 , n3 ) in order ( ) ; assert that ( graph adjacent nodes ( n1 ) ) contains exactly ( n4 , n5 ) ; assert that ( graph adjacent nodes ( n2 ) ) contains exactly ( n3 ) ; assert that ( graph adjacent nodes ( n3 ) ) contains exactly ( n2 ) ; assert that ( graph adjacent nodes ( n4 ) ) contains exactly ( n1 ) ; assert that ( graph adjacent nodes ( n5 ) ) contains exactly ( n1 ) ; }


protected long get bytes to copy ( ) { return total bytes to copy ; }


determine the connection synchronization order to use for the given { @ link connection factory } decreased for every level of nesting that a { @ link connection factory } has , checked through the level of { @ link delegating connection factory } nesting

private static int get connection synchronization order ( connection factory connection factory ) { int order = connection synchronization order ; connection factory current = connection factory ; while ( current instanceof delegating connection factory ) { order - - ; current = ( ( delegating connection factory ) current ) get target connection factory ( ) ; } return order ; }


returns a { @ link kafka resource } instance if the instance could not be instantiated ( for example , because a mandatory parameter was missing ) , then an empty { @ link optional } should be returned

kafka resource create ( string kafka version ) throws exception ;


closes the zoo keeper utility factory this entails closing the cached { @ link curator framework } instance if cleanup is true , then the initial path and all its children are deleted

public void close ( boolean cleanup ) throws exception { if ( cleanup ) { facade delete ( ) deleting children if needed ( ) for path ( " / " ) ; } root close ( ) ; }


public string get prefix ns string ( ) { return prefix ns string ; }


returns the number of bytes remaining in the compressed data buffer indicates a concatenated data stream if { @ link # finished ( ) } returns < code > true < code > and get remaining ( ) returns a positive value if { @ link # finished ( ) } returns < code > true < code > and get remaining ( ) returns a zero value , indicates that the end of data stream has been reached and is not a concatenated data stream


expose underlying attributes for auditing purposes

public map < string , set < string > > get required attributes ( ) { return required attributes ; }


return the { @ link jdbc template } used by this operation object

public jdbc template get jdbc template ( ) { return this jdbc template ; }


configure filters for the graph , based on the vertex and edge attributes

private void configure filters ( ) { / / close and rebuild filter dialog if exists if ( filter dialog ! = null ) { filter dialog close ( ) ; filter dialog = null ; } set < attributed vertex > vertices = graph vertex set ( ) ; set < attributed edge > edges = graph edge set ( ) ; vertex filters = attribute filters builder ( ) exclude ( set of ( " address " , " code " , " name " ) ) elements ( vertices ) max factor ( 05 ) button supplier ( j radio button : : new ) paint function ( v - > colors vertex type to color map get or default ( v , color blue ) ) build ( ) ; vertex filters add item listener ( item - > { @ suppress warnings ( " unchecked " ) set < string > selected = ( set < string > ) item get item ( ) ; viewer get render context ( ) set vertex include predicate ( v - > v get attribute map ( ) values ( ) stream ( ) none match ( selected : : contains ) ) ; viewer repaint ( ) ; } ) ; edge filters = attribute filters builder ( ) exclude ( set of ( " * to key " , " * from key " , " address " , " name " ) ) elements ( edges ) max factor ( 01 ) button supplier ( j radio button : : new ) paint function ( e - > colors edge type to color map get or default ( e , color green ) ) build ( ) ; edge filters add item listener ( item - > { @ suppress warnings ( " unchecked " ) set < string > selected = ( set < string > ) item get item ( ) ; viewer get render context ( ) set edge include predicate ( e - > e get attribute map ( ) values ( ) stream ( ) none match ( selected : : contains ) ) ; viewer repaint ( ) ; } ) ; }


removes a specific transient variable ( also searching parent scopes ) see { @ link # set transient variable ( string , object ) } for the rules on ' transient ' variables

void remove transient variable local ( string variable name ) ;


public void start element ( string name ) { start element ( name , null , null ) ; }


public boolean get namespace boolean ( ) { return namespace boolean ; }


public static server reflection blocking stub new blocking stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < server reflection blocking stub > factory = new io grpc stub abstract stub stub factory < server reflection blocking stub > ( ) { @ java lang override public server reflection blocking stub new stub ( io grpc channel channel , io grpc call options call options ) { return new server reflection blocking stub ( channel , call options ) ; } } ; return server reflection blocking stub new stub ( factory , channel ) ; }


returns a predicate that returns the result of { @ link file # is file } on input files

public static predicate < file > is file ( ) { return file predicate is file ; }


public collection < nt > non terminals ( ) { return collections unmodifiable collection ( nonterminals values ( ) ) ; }


returns the number of milliseconds since time given by start nano time , which must have been previously returned from a call to { @ link system nano time ( ) }

long millis elapsed since ( long start nano time ) { return nanoseconds to millis ( system nano time ( ) - start nano time ) ; }


returns a predicate to be used for test tag filtering , i e , that only accepts tests that match all of the required tags and none of the excluded tags

public static predicate < target > tag filter ( list < string > tag filter list ) { pair < collection < string > , collection < string > > tag lists = test target utils sort tags by sense ( tag filter list ) ; final collection < string > required tags = tag lists first ; final collection < string > excluded tags = tag lists second ; return input - > { if ( required tags is empty ( ) & & excluded tags is empty ( ) ) { return true ; } if ( ! ( input instanceof rule ) ) { return required tags is empty ( ) ; } / / note that test tags are those originating from the xx test rule , whereas the required tags / / and excluded tags originate from the command line or test suite rule / / todo ( ulfjack ) : get rule tags is inconsistent with test function and other places that use / / tags + size , but consistent with test suite return test target utils test matches filters ( ( ( rule ) input ) get rule tags ( ) , required tags , excluded tags , false ) ; } ; }


subclasses can override this for custom initialization behavior the default implementation is empty called by { @ link # init application context ( org springframework context application context ) }

protected void init application context ( ) throws beans exception { }


verify whether auth to local rules transform a principal name having a local user name " bar @ foo com " may be harmless , so it is noted at info however if what was intended is a transformation to " bar " it can be difficult to debug , hence this check

protected void validate short name ( ) { failif ( principal = = null , cat kerberos , " no principal defined " ) ; try { kerberos name kn = new kerberos name ( principal ) ; string result = kn get short name ( ) ; if ( non simple pattern matcher ( result ) find ( ) ) { warn ( cat kerberos , principal + " short name : " + result + " still contains @ or / " ) ; } } catch ( i o exception e ) { throw new kerberos diags failure ( cat kerberos , e , " failed to get short name for " + principal , e ) ; } catch ( illegal argument exception e ) { error ( cat kerberos , " kerberos name ( " + principal + " ) failed : % s \ n % s " , e , string utils stringify exception ( e ) ) ; } }


private void edit tag comment ( program program , string tag name , string new comment ) throws i o exception { function tag manager tag manager = get tag manager ( program ) ; function tag tag = tag manager get function tag ( tag name ) ; assert not null ( tag ) ; tag set comment ( new comment ) ; }


get a collection of full snapshot paths given file and snapshot dir

static collection < string > get snapshot files ( f s directory fsd , list < directory snapshottable feature > lsf , string file ) throws i o exception { array list < string > snaps = new array list < > ( ) ; for ( directory snapshottable feature sf : lsf ) { / / for each snapshottable dir e g / dir 1 , / dir 2 final read only list < snapshot > lsnap = sf get snapshot list ( ) ; for ( snapshot s : lsnap ) { / / for each snapshot name under snapshottable dir / / e g / dir 1 / snapshot / s 1 , / dir 1 / snapshot / s 2 final string dir name = s get root ( ) get root full path name ( ) ; if ( ! file starts with ( dir name ) ) { / / file not in current snapshot root dir , no need to check other snaps break ; } string snapname = s get root ( ) get full path name ( ) ; if ( dir name equals ( path separator ) ) { / / handle root dir snapname + = path separator ; } snapname + = file substring ( file index of ( dir name ) + dir name length ( ) ) ; hdfs file status stat = fsd get f s namesystem ( ) get file info ( snapname , true , false , false ) ; if ( stat ! = null ) { snaps add ( snapname ) ; } } } return snaps ; }


set a supplier for part writers to use when { @ link # multipart codecs ( ) } are not explicitly configured that ' s the same set of writers as for general except for the multipart writer itself

void set part writers supplier ( supplier < list < http message writer < ? > > > supplier ) { this part writers supplier = supplier ; init typed writers ( ) ; }


returns true if the topic names collide due to a period ( ' ' ) or underscore ( ' ' ) in the same position

public static boolean has collision ( string topic a , string topic b ) { return topic a replace ( ' ' , ' ' ) equals ( topic b replace ( ' ' , ' ' ) ) ; }


boolean on pretreatment ( context context , postcard postcard ) ;


this method will be removed in a certain version after april 5 , 2020 , so please do not use this method

public long earliest msg store time ( message queue mq ) throws m q client exception { return this default m q pull consumer impl earliest msg store time ( queue with namespace ( mq ) ) ; }


< code > optional aapt pb string str = 2 ; < code >

public builder clear str ( ) { copy on write ( ) ; instance clear str ( ) ; return this ; }


creates an { @ link runtime exception } that signals that an operation did not get the type of { @ link state object } that was expected this can mostly happen when a different { @ link state backend } from the one that was used for taking a checkpointsavepoint is used when restoring

public static runtime exception unexpected state handle exception ( class < ? extends state object > expected state handle class , class < ? extends state object > actual state handle class ) { return unexpected state handle exception ( new class [ ] { expected state handle class } , actual state handle class ) ; }


return the more specific of the acceptable and the producible media types with the q - value of the former

private media type get most specific media type ( media type accept type , media type produce type ) { media type produce type to use = produce type copy quality value ( accept type ) ; return ( media type specificity comparator compare ( accept type , produce type to use ) < = 0 ? accept type : produce type to use ) ; }


performs a rollover on a { @ code data stream } instance and returns a new instance containing the updated list of backing indices and incremented generation

public data stream rollover ( string write index uuid , version min node version ) { if ( replicated ) { throw new illegal argument exception ( " data stream [ " + name + " ] cannot be rolled over , " + " because it is a replicated data stream " ) ; } list < index > backing indices = new array list < > ( indices ) ; final string new write index name = data stream get default backing index name ( get name ( ) , get generation ( ) + 1 , min node version ) ; backing indices add ( new index ( new write index name , write index uuid ) ) ; return new data stream ( name , time stamp field , backing indices , generation + 1 , metadata , hidden , replicated ) ; }


public void test no space archive ( ) throws exception { log info ( " test no space archive " ) ; final path policy map path policy map = new path policy map ( 0 ) ; final namespace scheme ns scheme = path policy map new namespace scheme ( ) ; final cluster scheme cluster scheme = new cluster scheme ( default conf , num datanodes , repl , gen storage types ( num datanodes ) , null ) ; final migration test test = new migration test ( cluster scheme , ns scheme ) ; try { test run basic test ( false ) ; / / create 2 hot files with replication 3 final short replication = 3 ; for ( int i = 0 ; i < 2 ; i + + ) { final path p = new path ( path policy map cold , " file " + i ) ; d f s test util create file ( test dfs , p , block size , replication , 0l ) ; wait for all replicas ( replication , p , test dfs , 10 ) ; } / / set all the archive volume to full for ( data node dn : test cluster get data nodes ( ) ) { set volume full ( dn , storage type archive ) ; data node test utils trigger heartbeat ( dn ) ; } { / / test increasing replication but new replicas cannot be created / / since no more archive space final path file 0 = new path ( path policy map cold , " file 0 " ) ; final replication r = test get replication ( file 0 ) ; assert assert equals ( 0 , r disk ) ; final short new replication = ( short ) 5 ; test dfs set replication ( file 0 , new replication ) ; wait for all replicas ( r archive , file 0 , test dfs , 10 ) ; test verify replication ( file 0 , 0 , r archive ) ; } { / / test creating a hot file final path p = new path ( path policy map hot , " foo " ) ; d f s test util create file ( test dfs , p , block size , ( short ) 3 , 0l ) ; } { / / test move a cold file to warm final path file 1 = new path ( path policy map cold , " file 1 " ) ; test dfs rename ( file 1 , path policy map warm ) ; test migrate ( exit status success ) ; test verify ( true ) ; } } finally { test shutdown cluster ( ) ; } }


return the instance of { @ link validator } for a given url


setupdate the input policy of the stream this updates the stream statistics

private void set input policy ( s 3 a input policy input policy ) { this input policy = input policy ; stream statistics input policy set ( input policy ordinal ( ) ) ; }


public void update n clob ( int column index , reader reader ) throws s q l exception { }


determine whether the specified property is readable returns { @ code false } if the property doesn ' t exist

boolean is readable property ( string property name ) ;


check that this metric was captured exactly once

private static void check captured ( argument captor < ? > captor , string name ) { assert assert equals ( " expected exactly one metric for name " + name , 1 , captor get all values ( ) size ( ) ) ; }


public void set capacity ( long capacity ) { this capacity = capacity ; }


visit a parse tree produced by { @ link sql base parser # string }

t visit string ( sql base parser string context ctx ) ;


true if we have manually unmounted content ( e g via unmount all items ) which means that while we may not have a new render tree , the mounted content does not match what the viewport for the litho view may be

public boolean needs remount ( ) { return m needs remount ; }


loads the instructions in the given selection and displays them in the gui

public void load instructions ( program selection selection , instruction search plugin plugin ) throws invalid input exception { if ( selection = = null & & get message panel ( ) ! = null ) { get message panel ( ) set message text ( " select instructions from the listing ( and hit reload ) to populate the table " , color blue ) ; } if ( selection ! = null & & plugin is selection valid ( selection , this ) ) { if ( get control panel ( ) ! = null ) { get control panel ( ) get range widget ( ) update search range by selection ( ) ; } / / load the instructions , but note that we only allow a single selection range if / / there ' s more than one we will process the first one , and display a warning message populate search data ( plugin get current program ( ) , selection ) ; } }


public int hash code ( ) { return method hash code ( ) ; }


post fakeouterstring test serialization of outer string types

default response entity < string > fake outer string serialize ( @ api param ( value = " input string as post body " ) @ valid @ request body ( required = false ) string body ) { return new response entity < > ( http status not implemented ) ; }


returns whether the channel is terminated terminated channels have no running calls and relevant resources released ( like tcp connections )

public abstract boolean is terminated ( ) ;


retrieves the next job that is eligible for execution to be ' eligible ' means that the job : - has no dependencies - has no unmet constraints this method will block until a job is available when the job returned from this method has been run , you must call { @ link # on job finished ( job ) }

synchronized @ non null job pull next eligible job for execution ( @ non null job predicate predicate ) { try { job job ; while ( ( job = get next eligible job for execution ( predicate ) ) = = null ) { if ( running jobs is empty ( ) ) { debouncer publish ( callback : : on empty ) ; } wait ( ) ; } job storage update job running state ( job get id ( ) , true ) ; running jobs put ( job get id ( ) , job ) ; job tracker on state change ( job , job tracker job state running ) ; return job ; } catch ( interrupted exception e ) { log e ( tag , " interrupted " ) ; throw new assertion error ( e ) ; } }


public void test entry set to array ( ) { concurrent map map = map 5 ( ) ; set s = map entry set ( ) ; object [ ] ar = s to array ( ) ; assert equals ( 5 , ar length ) ; for ( int i = 0 ; i < 5 ; + + i ) { assert true ( map contains key ( ( ( map entry ) ( ar [ i ] ) ) get key ( ) ) ) ; assert true ( map contains value ( ( ( map entry ) ( ar [ i ] ) ) get value ( ) ) ) ; } }


invoked when the user has selected an item in the source panel

public void source panel selection changed ( boolean valid function ) { boolean has selection = source panel has selection ( ) ; boolean is immutable = source panel is selection immutable ( ) ; boolean is enabled = source panel is selection enabled ( ) ; add btn set enabled ( has selection & & valid function & & is enabled ) ; remove btn set enabled ( false ) ; if ( ! has selection ) { source panel clear selection ( ) ; } delete btn set enabled ( has selection & & ! is immutable ) ; }


returns true if this parser is liberal in what it accepts

public final boolean is lenient ( ) { return lenient ; }


sets the schema with field names and the types required this method overwrites existing fields added with { @ link # field ( string , data type ) }

public schema schema ( table schema schema ) { table schema clear ( ) ; last field = null ; for ( int i = 0 ; i < schema get field count ( ) ; i + + ) { field ( schema get field name ( i ) get ( ) , schema get field data type ( i ) get ( ) ) ; } return this ; }


execute a named query , binding one value to a " : " named parameter in the query string a named query is defined in a hibernate mapping file

list < ? > find by named query and named param ( string query name , string param name , object value ) throws data access exception ;


tests that { @ link aggregating attribute mapper # visit attribute } returns every possible value that a configurable attribute can resolve to

public void test get possible values configurable attribute ( ) throws exception { rule rule = scratch rule ( " a " , " myrule " , " sh binary ( name = ' myrule ' , " , " srcs = select ( { " , " ' / / conditions : a ' : [ ' a sh ' ] , " , " ' / / conditions : b ' : [ ' b sh ' ] , " , " ' " + build type selector default condition key + " ' : [ ' default sh ' ] , " , " } ) ) " ) ; assert that ( aggregating attribute mapper of ( rule ) visit attribute ( " srcs " , build type label list ) ) contains exactly ( immutable list of ( label ( " / / a : a sh " ) ) , immutable list of ( label ( " / / a : b sh " ) ) , immutable list of ( label ( " / / a : default sh " ) ) ) ; }


checks if the specified url is pointing to the local file system and if it does , resolves the specified url against the list of configured repository roots if the specified url doesn ' t match any of the roots , returns null

public url resolve repo u r l ( url url ) { try { if ( " file " equals ignore case ( url get protocol ( ) ) ) { if ( url get host ( ) = = null | | " " equals ( url get host ( ) ) ) { / / only local file urls are supported path path = path utils get ( repo files , url to u r i ( ) ) ; if ( path = = null ) { / / couldn ' t resolve against known repo locations return null ; } / / normalize url return path to uri ( ) to u r l ( ) ; } return null ; } else if ( " jar " equals ( url get protocol ( ) ) ) { string file = url get file ( ) ; int pos = file index of ( " ! / " ) ; if ( pos < 0 ) { return null ; } string jar tail = file substring ( pos ) ; string file path = file substring ( 0 , pos ) ; url internal url = new url ( file path ) ; url normalized url = resolve repo u r l ( internal url ) ; if ( normalized url = = null ) { return null ; } return new url ( " jar " , " " , normalized url to external form ( ) + jar tail ) ; } else { / / it ' s not file or jar url and it didn ' t match the white list - reject return null ; } } catch ( malformed u r l exception ex ) { / / cannot make sense of this file url return null ; } catch ( u r i syntax exception ex ) { return null ; } }


get a list of { @ link url } s from the context classloader for all the resources found at the specified path

protected static list < url > get resources ( string path ) throws i o exception { return collections list ( thread current thread ( ) get context class loader ( ) get resources ( path ) ) ; }


returns an image descriptor for the image file at the given plug - in relative path

public static image descriptor get image descriptor ( string path ) { return image descriptor from plugin ( plugin id , path ) ; }


compute the header separately because we need to wait for the bounding box

protected string builder header ( ) { string builder b = new string builder ( ) ; b append ( " % ! ps - adobe - 3 0 epsf - 3 0 \ n " ) ; b append ( bounding box ) append ( " \ n " ) ; b append ( " 0 3 setlinewidth \ n " ) ; b append ( " % % x y w h highlight \ n " + " / highlight { \ n " + " 4 dict begin \ n " + " / h exch def \ n " + " / w exch def \ n " + " / y exch def \ n " + " / x exch def \ n " + " gsave \ n " + " newpath \ n " + " x y moveto \ n " + " 0 h rlineto % up to left corner \ n " + " w 0 rlineto % to upper right corner \ n " + " 0 h neg rlineto % to lower right corner \ n " + " w neg 0 rlineto % back home to lower left corner \ n " + " closepath \ n " + " 95 83 82 setrgbcolor \ n " + " fill \ n " + " grestore \ n " + " end \ n " + " } def \ n " ) ; return b ; }


update property for array ( list ) container

protected void update property for array ( codegen property property , codegen property inner property ) { if ( inner property = = null ) { logger warn ( " skipping invalid array property " + json pretty ( property ) ) ; return ; } property data format = inner property data format ; if ( ! language specific primitives contains ( inner property base type ) ) { property complex type = inner property base type ; } else { property is primitive type = true ; } property items = inner property ; / / inner item is enum if ( is property inner most enum ( property ) ) { / / we use the data type instead of the enum class / / at the moment is not supported / / is enum is set to true when the type is an enum / / or the inner type of an array / map is an enum / / property is enum = true ; / / update datatype with enum and default value for array / / e g list < string > = > list < status enum > / / update data type with enum for array ( property ) ; / / set allowable values to enum values ( including array / map of enum ) / / property allowable values = get inner enum allowable values ( property ) ; } }


returns the result of loading a collection of packages note that the returned { @ link package } s may contain errors - see { @ link package # contains errors ( ) } for details

result load packages ( iterable < package identifier > pkg ids ) throws interrupted exception ;