target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void callsBeatBoxPlayOnButtonClicked() { mSubject.onButtonClicked(); verify(mBeatBox).play(mSound); }
public void onButtonClicked() { mBeatBox.play(mSound); }
SoundViewModel extends BaseObservable { public void onButtonClicked() { mBeatBox.play(mSound); } }
SoundViewModel extends BaseObservable { public void onButtonClicked() { mBeatBox.play(mSound); } SoundViewModel(BeatBox beatBox); }
SoundViewModel extends BaseObservable { public void onButtonClicked() { mBeatBox.play(mSound); } SoundViewModel(BeatBox beatBox); @Bindable String getTitle(); Sound getSound(); void setSound(Sound sound); void onButtonClicked(); }
SoundViewModel extends BaseObservable { public void onButtonClicked() { mBeatBox.play(mSound); } SoundViewModel(BeatBox beatBox); @Bindable String getTitle(); Sound getSound(); void setSound(Sound sound); void onButtonClicked(); }
@Test public void exposesSoundNameAsTitle() { assertThat(mSubject.getTitle(), is(mSound.getName())); }
@Bindable public String getTitle() { return mSound.getName(); }
SoundViewModel extends BaseObservable { @Bindable public String getTitle() { return mSound.getName(); } }
SoundViewModel extends BaseObservable { @Bindable public String getTitle() { return mSound.getName(); } SoundViewModel(BeatBox beatBox); }
SoundViewModel extends BaseObservable { @Bindable public String getTitle() { return mSound.getName(); } SoundViewModel(BeatBox beatBox); @Bindable String getTitle(); Sound getSound(); void setSound(Sound sound); void onButtonClicked(); }
SoundViewModel extends BaseObservable { @Bindable public String getTitle() { return mSound.getName(); } SoundViewModel(BeatBox beatBox); @Bindable String getTitle(); Sound getSound(); void setSound(Sound sound); void onButtonClicked(); }
@Test public void testCreateBeer() { assertEquals(0, service.getBeersCount()); Beer myBeer = service.createBeer("mine", 0); assertEquals(1, service.getBeersCount()); Iterable<Beer> founds = service.getAllBeers(); Beer mine = founds.iterator().next(); assertEquals(myBeer.getName(), mine.getName()); }
public Beer createBeer(final String name, final int alcoholPercentage) { return beerRepository.save(new Beer(name, alcoholPercentage)); }
PubService { public Beer createBeer(final String name, final int alcoholPercentage) { return beerRepository.save(new Beer(name, alcoholPercentage)); } }
PubService { public Beer createBeer(final String name, final int alcoholPercentage) { return beerRepository.save(new Beer(name, alcoholPercentage)); } }
PubService { public Beer createBeer(final String name, final int alcoholPercentage) { return beerRepository.save(new Beer(name, alcoholPercentage)); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String name); Iterable<Beer> getAllBeer...
PubService { public Beer createBeer(final String name, final int alcoholPercentage) { return beerRepository.save(new Beer(name, alcoholPercentage)); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String name); Iterable<Beer> getAllBeer...
@Test public void testFindBeerById() { service.populateData(); for (Beer beer : service.getAllBeers()) { Beer foundBeer = service.findBeerById(beer.getId()); assertNotNull(foundBeer); } }
public Beer findBeerById(final long id) { return beerRepository.findOne(id); }
PubService { public Beer findBeerById(final long id) { return beerRepository.findOne(id); } }
PubService { public Beer findBeerById(final long id) { return beerRepository.findOne(id); } }
PubService { public Beer findBeerById(final long id) { return beerRepository.findOne(id); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String name); Iterable<Beer> getAllBeers(); Beer findBeerById(final long id); Beer findBeerByName(...
PubService { public Beer findBeerById(final long id) { return beerRepository.findOne(id); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String name); Iterable<Beer> getAllBeers(); Beer findBeerById(final long id); Beer findBeerByName(...
@Test public void testGetAllBeers() { Collection<Beer> madeBeers = service.populateData(); Iterable<Beer> foundBeers = service.getAllBeers(); int founds = 0; for (Beer foundBeer : foundBeers) { assertTrue(madeBeers.contains(foundBeer)); founds++; } assertEquals(madeBeers.size(), founds); }
public Iterable<Beer> getAllBeers() { return beerRepository.findAll(); }
PubService { public Iterable<Beer> getAllBeers() { return beerRepository.findAll(); } }
PubService { public Iterable<Beer> getAllBeers() { return beerRepository.findAll(); } }
PubService { public Iterable<Beer> getAllBeers() { return beerRepository.findAll(); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String name); Iterable<Beer> getAllBeers(); Beer findBeerById(final long id); Beer findBeerByName(final ...
PubService { public Iterable<Beer> getAllBeers() { return beerRepository.findAll(); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String name); Iterable<Beer> getAllBeers(); Beer findBeerById(final long id); Beer findBeerByName(final ...
@Test public void testFindBeerByAlcoholPercentage() { service.populateData(); for (Beer beer : service.findBeerByAlcoholPercentage(7)) { assertThat( beer.getName(), is(anyOf(containsString("Chimay Rood"), containsString("Florival Bruin")))); } }
public Iterable<Beer> findBeerByAlcoholPercentage(final int alcoholPercentage) { return beerRepository.findAllByPropertyValue("alcoholPercentage", alcoholPercentage); }
PubService { public Iterable<Beer> findBeerByAlcoholPercentage(final int alcoholPercentage) { return beerRepository.findAllByPropertyValue("alcoholPercentage", alcoholPercentage); } }
PubService { public Iterable<Beer> findBeerByAlcoholPercentage(final int alcoholPercentage) { return beerRepository.findAllByPropertyValue("alcoholPercentage", alcoholPercentage); } }
PubService { public Iterable<Beer> findBeerByAlcoholPercentage(final int alcoholPercentage) { return beerRepository.findAllByPropertyValue("alcoholPercentage", alcoholPercentage); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String n...
PubService { public Iterable<Beer> findBeerByAlcoholPercentage(final int alcoholPercentage) { return beerRepository.findAllByPropertyValue("alcoholPercentage", alcoholPercentage); } long getBeersCount(); Beer createBeer(final String name, final int alcoholPercentage); BrewingCompany createBrewingCompany(final String n...
@Test public void testEqualsAndHashCode() { assertSoftly( softly -> { SimpleGlobPattern equalPattern = SimpleGlobPattern.compile( patternString ); softly.assertThat( pattern ) .isEqualTo( equalPattern ) .isNotEqualTo( SimpleGlobPattern.compile( patternString + "a" ) ) .isNotEqualTo( SimpleGlobPattern.compile( "a" + pat...
public static SimpleGlobPattern compile(String patternString) { SimpleGlobPattern pattern = EmptyGlobPattern.INSTANCE; int endIndexInclusive = patternString.length() - 1; while ( endIndexInclusive >= 0 ) { int lastWildcardIndex = patternString.lastIndexOf( WILDCARD_MANY, endIndexInclusive ); if ( lastWildcardIndex < en...
SimpleGlobPattern { public static SimpleGlobPattern compile(String patternString) { SimpleGlobPattern pattern = EmptyGlobPattern.INSTANCE; int endIndexInclusive = patternString.length() - 1; while ( endIndexInclusive >= 0 ) { int lastWildcardIndex = patternString.lastIndexOf( WILDCARD_MANY, endIndexInclusive ); if ( la...
SimpleGlobPattern { public static SimpleGlobPattern compile(String patternString) { SimpleGlobPattern pattern = EmptyGlobPattern.INSTANCE; int endIndexInclusive = patternString.length() - 1; while ( endIndexInclusive >= 0 ) { int lastWildcardIndex = patternString.lastIndexOf( WILDCARD_MANY, endIndexInclusive ); if ( la...
SimpleGlobPattern { public static SimpleGlobPattern compile(String patternString) { SimpleGlobPattern pattern = EmptyGlobPattern.INSTANCE; int endIndexInclusive = patternString.length() - 1; while ( endIndexInclusive >= 0 ) { int lastWildcardIndex = patternString.lastIndexOf( WILDCARD_MANY, endIndexInclusive ); if ( la...
SimpleGlobPattern { public static SimpleGlobPattern compile(String patternString) { SimpleGlobPattern pattern = EmptyGlobPattern.INSTANCE; int endIndexInclusive = patternString.length() - 1; while ( endIndexInclusive >= 0 ) { int lastWildcardIndex = patternString.lastIndexOf( WILDCARD_MANY, endIndexInclusive ); if ( la...
@Test public void failure_work() { RuntimeException work1Exception = new RuntimeException( "work1" ); Long work2Result = 41L; Long work3Result = 43L; ArgumentCaptor<CompletableFuture<Long>> work1FutureCaptor = futureCaptor(); ArgumentCaptor<CompletableFuture<Long>> work2FutureCaptor = futureCaptor(); ArgumentCaptor<Com...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test public void failure_multipleWorks() { RuntimeException work1Exception = new RuntimeException( "work1" ); Long work2Result = 41L; RuntimeException work3Exception = new RuntimeException( "work3" ); Long work4Result = 44L; ArgumentCaptor<CompletableFuture<Long>> work1FutureCaptor = futureCaptor(); ArgumentCaptor<Com...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test @TestForIssue(jiraKey = "HSEARCH-3851") public void failure_multipleWorksAndCreateEntityReference() { RuntimeException work1Exception = new RuntimeException( "work1" ); Long work2Result = 41L; RuntimeException work3Exception = new RuntimeException( "work3" ); Long work4Result = 44L; ArgumentCaptor<CompletableFutu...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test public void failure_commit() { assumeTrue( "This test only makes sense when commit is forced", DocumentCommitStrategy.FORCE.equals( commitStrategy ) ); Long work1Result = 42L; Long work2Result = 41L; Long work3Result = 43L; ArgumentCaptor<CompletableFuture<Long>> work1FutureCaptor = futureCaptor(); ArgumentCaptor...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test public void failure_refresh() { assumeTrue( "This test only makes sense when refresh is forced", DocumentRefreshStrategy.FORCE.equals( refreshStrategy ) ); Long work1Result = 42L; Long work2Result = 41L; Long work3Result = 43L; ArgumentCaptor<CompletableFuture<Long>> work1FutureCaptor = futureCaptor(); ArgumentCa...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test public void failure_workAndCommit() { assumeTrue( "This test only makes sense when commit is forced", DocumentCommitStrategy.FORCE.equals( commitStrategy ) ); RuntimeException work1Exception = new RuntimeException( "work1" ); Long work2Result = 41L; Long work3Result = 43L; ArgumentCaptor<CompletableFuture<Long>> ...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test public void failure_workAndRefresh() { assumeTrue( "This test only makes sense when refresh is forced", DocumentRefreshStrategy.FORCE.equals( refreshStrategy ) ); RuntimeException work1Exception = new RuntimeException( "work1" ); Long work2Result = 41L; Long work3Result = 43L; ArgumentCaptor<CompletableFuture<Lon...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Long> future = futures[i]; Sing...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
LuceneIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFut...
@Test public void testEnableInfoStream() throws Exception { LoggerInfoStream infoStream = new LoggerInfoStream(); ByteBuffersDirectory directory = new ByteBuffersDirectory(); IndexWriterConfig indexWriterConfig = new IndexWriterConfig( new StandardAnalyzer() ); indexWriterConfig.setInfoStream( infoStream ); IndexWriter...
@Override public void close() { }
LoggerInfoStream extends InfoStream { @Override public void close() { } }
LoggerInfoStream extends InfoStream { @Override public void close() { } }
LoggerInfoStream extends InfoStream { @Override public void close() { } @Override void message(String component, String message); @Override boolean isEnabled(String component); @Override void close(); }
LoggerInfoStream extends InfoStream { @Override public void close() { } @Override void message(String component, String message); @Override boolean isEnabled(String component); @Override void close(); }
@Test public void shardKey() { assertThat( LuceneIndexSettings.shardKey( "shardId", "foo.bar" ) ) .isEqualTo( "hibernate.search.backend.shards.shardId.foo.bar" ); assertThat( LuceneIndexSettings.shardKey( "indexName", "shardId", "foo.bar" ) ) .isEqualTo( "hibernate.search.backend.indexes.indexName.shards.shardId.foo.ba...
public static String shardKey(String shardId, String radical) { return join( ".", EngineSettings.BACKEND, SHARDS, shardId, radical ); }
LuceneIndexSettings { public static String shardKey(String shardId, String radical) { return join( ".", EngineSettings.BACKEND, SHARDS, shardId, radical ); } }
LuceneIndexSettings { public static String shardKey(String shardId, String radical) { return join( ".", EngineSettings.BACKEND, SHARDS, shardId, radical ); } private LuceneIndexSettings(); }
LuceneIndexSettings { public static String shardKey(String shardId, String radical) { return join( ".", EngineSettings.BACKEND, SHARDS, shardId, radical ); } private LuceneIndexSettings(); static String shardKey(String shardId, String radical); static String shardKey(String indexName, String shardId, String radical); ...
LuceneIndexSettings { public static String shardKey(String shardId, String radical) { return join( ".", EngineSettings.BACKEND, SHARDS, shardId, radical ); } private LuceneIndexSettings(); static String shardKey(String shardId, String radical); static String shardKey(String indexName, String shardId, String radical); ...
@Test public void forceCommit() { processor.forceCommit(); verify( indexAccessorMock ).commit(); verifyNoOtherIndexInteractionsAndClear(); }
public void forceCommit() { try { indexAccessor.commit(); } catch (RuntimeException e) { indexAccessor.cleanUpAfterFailure( e, "Commit after a set of index works" ); throw e; } }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceCommit() { try { indexAccessor.commit(); } catch (RuntimeException e) { indexAccessor.cleanUpAfterFailure( e, "Commit after a set of index works" ); throw e; } } }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceCommit() { try { indexAccessor.commit(); } catch (RuntimeException e) { indexAccessor.cleanUpAfterFailure( e, "Commit after a set of index works" ); throw e; } } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAcce...
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceCommit() { try { indexAccessor.commit(); } catch (RuntimeException e) { indexAccessor.cleanUpAfterFailure( e, "Commit after a set of index works" ); throw e; } } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAcce...
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceCommit() { try { indexAccessor.commit(); } catch (RuntimeException e) { indexAccessor.cleanUpAfterFailure( e, "Commit after a set of index works" ); throw e; } } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAcce...
@Test public void someNonFailingCloseables() { Throwable mainException = new Exception(); RuntimeException exception1 = new RuntimeException(); RuntimeException exception2 = new RuntimeException(); RuntimeException exception3 = new RuntimeException(); new SuppressingCloser( mainException ) .push( () -> { } ) .push( ign...
public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoCloseable ... clo...
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoCloseable ... clo...
@Test public void forceRefresh() { processor.forceRefresh(); verify( indexAccessorMock ).refresh(); verifyNoOtherIndexInteractionsAndClear(); }
public void forceRefresh() { indexAccessor.refresh(); }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAccessor); }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAccessor); @Override void beginBatch(); @Override CompletableFuture<?> endBatch(); @Override void complete(); T submit(IndexMan...
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAccessor); @Override void beginBatch(); @Override CompletableFuture<?> endBatch(); @Override void complete(); T submit(IndexMan...
@Test public void error_forceRefresh() { RuntimeException refreshException = new RuntimeException( "Some message" ); doThrow( refreshException ).when( indexAccessorMock ).refresh(); assertThatThrownBy( () -> processor.forceRefresh() ) .isSameAs( refreshException ); verifyNoOtherIndexInteractionsAndClear(); }
public void forceRefresh() { indexAccessor.refresh(); }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAccessor); }
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAccessor); @Override void beginBatch(); @Override CompletableFuture<?> endBatch(); @Override void complete(); T submit(IndexMan...
LuceneBatchedWorkProcessor implements BatchedWorkProcessor { public void forceRefresh() { indexAccessor.refresh(); } LuceneBatchedWorkProcessor(EventContext eventContext, IndexAccessor indexAccessor); @Override void beginBatch(); @Override CompletableFuture<?> endBatch(); @Override void complete(); T submit(IndexMan...
@Test public void success() { ArgumentCaptor<CompletableFuture<Void>> work1FutureCaptor = futureCaptor(); ArgumentCaptor<CompletableFuture<Void>> work2FutureCaptor = futureCaptor(); ArgumentCaptor<CompletableFuture<Void>> work3FutureCaptor = futureCaptor(); CompletableFuture<IndexIndexingPlanExecutionReport<StubEntityR...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Void> future = futures[i]; Sing...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
@Test public void failure_work() { RuntimeException work1Exception = new RuntimeException( "work1" ); ArgumentCaptor<CompletableFuture<Void>> work1FutureCaptor = futureCaptor(); ArgumentCaptor<CompletableFuture<Void>> work2FutureCaptor = futureCaptor(); ArgumentCaptor<CompletableFuture<Void>> work3FutureCaptor = future...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Void> future = futures[i]; Sing...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
@Test public void failure_multipleWorks() { RuntimeException work1Exception = new RuntimeException( "work1" ); RuntimeException work3Exception = new RuntimeException( "work3" ); ArgumentCaptor<CompletableFuture<Void>> work1FutureCaptor = futureCaptor(); ArgumentCaptor<CompletableFuture<Void>> work2FutureCaptor = future...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Void> future = futures[i]; Sing...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
@Test @TestForIssue(jiraKey = "HSEARCH-3851") public void failure_multipleWorksAndCreateEntityReference() { RuntimeException work1Exception = new RuntimeException( "work1" ); RuntimeException work3Exception = new RuntimeException( "work3" ); ArgumentCaptor<CompletableFuture<Void>> work1FutureCaptor = futureCaptor(); Ar...
CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { CompletableFuture<Void> future = futures[i]; Sing...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
ElasticsearchIndexIndexingPlanExecution { CompletableFuture<IndexIndexingPlanExecutionReport<R>> execute() { CompletableFuture<IndexIndexingPlanExecutionReport<R>> reportFuture = CompletableFuture.allOf( futures ) .handle( (result, throwable) -> onAllWorksFinished() ); for ( int i = 0; i < works.size(); i++ ) { Complet...
@Test public void initialContentLength() { assumeTrue( expectedContentLength < 1024 ); assertThat( gsonEntity.getContentLength() ).isEqualTo( expectedContentLength ); }
@Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
@Test public void contentType() { Header contentType = gsonEntity.getContentType(); assertThat( contentType.getName() ).isEqualTo( "Content-Type" ); assertThat( contentType.getValue() ).isEqualTo( "application/json; charset=UTF-8" ); }
@Override public Header getContentType() { return CONTENT_TYPE; }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public Header getContentType() { return CONTENT_TYPE; } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public Header getContentType() { return CONTENT_TYPE; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public Header getContentType() { return CONTENT_TYPE; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContentLength(); @Override Header getContentType();...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public Header getContentType() { return CONTENT_TYPE; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContentLength(); @Override Header getContentType();...
@Test public void produceContent_noPushBack() throws IOException { int pushBackPeriod = Integer.MAX_VALUE; for ( int i = 0; i < 2; i++ ) { assertThat( doProduceContent( gsonEntity, pushBackPeriod ) ) .isEqualTo( expectedPayloadString ); assertThat( gsonEntity.getContentLength() ) .isEqualTo( expectedContentLength ); } ...
@Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
@Test public void produceContent_pushBack_every5Bytes() throws IOException { int pushBackPeriod = 5; for ( int i = 0; i < 2; i++ ) { assertThat( doProduceContent( gsonEntity, pushBackPeriod ) ) .isEqualTo( expectedPayloadString ); assertThat( gsonEntity.getContentLength() ) .isEqualTo( expectedContentLength ); } }
@Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
@Test public void onlyNonFailingCloseables() { Throwable mainException = new Exception(); new SuppressingCloser( mainException ) .push( () -> { } ) .push( () -> { } ); assertThat( mainException ) .hasNoSuppressedExceptions(); }
public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoCloseable ... clo...
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoCloseable ... clo...
@Test public void produceContent_pushBack_every100Bytes() throws IOException { int pushBackPeriod = 100; for ( int i = 0; i < 2; i++ ) { assertThat( doProduceContent( gsonEntity, pushBackPeriod ) ) .isEqualTo( expectedPayloadString ); assertThat( gsonEntity.getContentLength() ) .isEqualTo( expectedContentLength ); } }
@Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
@Test public void produceContent_pushBack_every500Bytes() throws IOException { int pushBackPeriod = 500; for ( int i = 0; i < 2; i++ ) { assertThat( doProduceContent( gsonEntity, pushBackPeriod ) ) .isEqualTo( expectedPayloadString ); assertThat( gsonEntity.getContentLength() ) .isEqualTo( expectedContentLength ); } }
@Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public long getContentLength() { this.contentLengthWasProvided = true; return this.contentLength; } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override long getContent...
@Test public void writeTo() throws IOException { for ( int i = 0; i < 2; i++ ) { assertThat( doWriteTo( gsonEntity ) ) .isEqualTo( expectedPayloadString ); assertThat( gsonEntity.getContentLength() ) .isEqualTo( expectedContentLength ); } }
@Override public void writeTo(OutputStream out) throws IOException { CountingOutputStream countingStream = new CountingOutputStream( out ); Writer writer = new OutputStreamWriter( countingStream, CHARSET ); for ( JsonObject bodyPart : bodyParts ) { gson.toJson( bodyPart, writer ); writer.append( '\n' ); } writer.flush(...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public void writeTo(OutputStream out) throws IOException { CountingOutputStream countingStream = new CountingOutputStream( out ); Writer writer = new OutputStreamWriter( countingStream, CHARSET ); for ( JsonObject bodyPart : bodyParts ) { gson.t...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public void writeTo(OutputStream out) throws IOException { CountingOutputStream countingStream = new CountingOutputStream( out ); Writer writer = new OutputStreamWriter( countingStream, CHARSET ); for ( JsonObject bodyPart : bodyParts ) { gson.t...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public void writeTo(OutputStream out) throws IOException { CountingOutputStream countingStream = new CountingOutputStream( out ); Writer writer = new OutputStreamWriter( countingStream, CHARSET ); for ( JsonObject bodyPart : bodyParts ) { gson.t...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public void writeTo(OutputStream out) throws IOException { CountingOutputStream countingStream = new CountingOutputStream( out ); Writer writer = new OutputStreamWriter( countingStream, CHARSET ); for ( JsonObject bodyPart : bodyParts ) { gson.t...
@Test public void getContent() throws IOException { for ( int i = 0; i < 2; i++ ) { assertThat( doGetContent( gsonEntity ) ) .isEqualTo( expectedPayloadString ); assertThat( gsonEntity.getContentLength() ) .isEqualTo( expectedContentLength ); } }
@Override public InputStream getContent() { return new HttpAsyncContentProducerInputStream( this, BYTE_BUFFER_PAGE_SIZE ); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public InputStream getContent() { return new HttpAsyncContentProducerInputStream( this, BYTE_BUFFER_PAGE_SIZE ); } }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public InputStream getContent() { return new HttpAsyncContentProducerInputStream( this, BYTE_BUFFER_PAGE_SIZE ); } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); }
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public InputStream getContent() { return new HttpAsyncContentProducerInputStream( this, BYTE_BUFFER_PAGE_SIZE ); } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override ...
GsonHttpEntity implements HttpEntity, HttpAsyncContentProducer { @Override public InputStream getContent() { return new HttpAsyncContentProducerInputStream( this, BYTE_BUFFER_PAGE_SIZE ); } GsonHttpEntity(Gson gson, List<JsonObject> bodyParts); @Override boolean isRepeatable(); @Override boolean isChunked(); @Override ...
@Test public void customCloseable() { Throwable mainException = new Exception(); MyException1 exception1 = new MyException1(); RuntimeException exception2 = new IllegalStateException(); @SuppressWarnings("resource") MyException1Closeable closeable = () -> { throw exception1; }; new SuppressingCloser( mainException ) .p...
public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoCloseable ... clo...
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser push(AutoCloseable closeable) { return push( AutoCloseable::close, closeable ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoCloseable ... clo...
@Test public void iterable() throws IOException { Throwable mainException = new Exception(); IOException exception1 = new IOException(); RuntimeException exception2 = new IllegalStateException(); IOException exception3 = new IOException(); RuntimeException exception4 = new UnsupportedOperationException(); List<Closeabl...
public SuppressingCloser pushAll(AutoCloseable ... closeables) { return pushAll( AutoCloseable::close, closeables ); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser pushAll(AutoCloseable ... closeables) { return pushAll( AutoCloseable::close, closeables ); } }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser pushAll(AutoCloseable ... closeables) { return pushAll( AutoCloseable::close, closeables ); } SuppressingCloser(Throwable mainThrowable); }
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser pushAll(AutoCloseable ... closeables) { return pushAll( AutoCloseable::close, closeables ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoClose...
SuppressingCloser extends AbstractCloser<SuppressingCloser, Exception> { public SuppressingCloser pushAll(AutoCloseable ... closeables) { return pushAll( AutoCloseable::close, closeables ); } SuppressingCloser(Throwable mainThrowable); SuppressingCloser push(AutoCloseable closeable); SuppressingCloser pushAll(AutoClose...
@Test public void deserializeInt_fromInt() throws Exception { int i = SerializationUtil.parseIntegerParameter( "My parameter", "1" ); assertThat( i ).isEqualTo( 1 ); }
public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
@Test public void deserializeInt_fromDouble() throws Exception { thrown.expect( SearchException.class ); thrown.expectMessage( "HSEARCH500029: Unable to parse value '1.0' for job parameter 'My parameter'." ); SerializationUtil.parseIntegerParameter( "My parameter", "1.0" ); }
public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
@Test public void deserializeInt_fromOther() throws Exception { thrown.expect( SearchException.class ); thrown.expectMessage( "HSEARCH500029: Unable to parse value 'foo' for job parameter 'My parameter'." ); SerializationUtil.parseIntegerParameter( "My parameter", "foo" ); }
public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
@Test public void deserializeInt_missing() throws Exception { thrown.expect( SearchException.class ); thrown.expectMessage( "HSEARCH500029: Unable to parse value 'null' for job parameter 'My parameter'." ); SerializationUtil.parseIntegerParameter( "My parameter", null ); }
public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); }
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
SerializationUtil { public static int parseIntegerParameter(String key, String value) { try { return Integer.parseInt( value ); } catch (NumberFormatException e) { throw log.unableToParseJobParameter( key, value, e ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(St...
@Test public void deserializeInt_defaultValue() throws Exception { int i = SerializationUtil.parseIntegerParameterOptional( "My parameter", null, 1 ); assertThat( i ).isEqualTo( 1 ); }
public static Integer parseIntegerParameterOptional(String key, String value, Integer defaultValue) { if ( value == null ) { return defaultValue; } else { return parseIntegerParameter( key, value ); } }
SerializationUtil { public static Integer parseIntegerParameterOptional(String key, String value, Integer defaultValue) { if ( value == null ) { return defaultValue; } else { return parseIntegerParameter( key, value ); } } }
SerializationUtil { public static Integer parseIntegerParameterOptional(String key, String value, Integer defaultValue) { if ( value == null ) { return defaultValue; } else { return parseIntegerParameter( key, value ); } } private SerializationUtil(); }
SerializationUtil { public static Integer parseIntegerParameterOptional(String key, String value, Integer defaultValue) { if ( value == null ) { return defaultValue; } else { return parseIntegerParameter( key, value ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(S...
SerializationUtil { public static Integer parseIntegerParameterOptional(String key, String value, Integer defaultValue) { if ( value == null ) { return defaultValue; } else { return parseIntegerParameter( key, value ); } } private SerializationUtil(); static String serialize(Object object); static Object deserialize(S...
@Test public void deserializeBoolean_fromLowerCase() throws Exception { boolean t = SerializationUtil.parseBooleanParameterOptional( "My parameter 1", "true", false ); boolean f = SerializationUtil.parseBooleanParameterOptional( "My parameter 2", "false", true ); assertThat( t ).isTrue(); assertThat( f ).isFalse(); }
public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter( key, value, null );...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
@Test public void matches() { assertSoftly( softly -> { for ( String candidate : expectedMatching ) { softly.assertThat( pattern.matches( candidate ) ) .as( "'" + patternString + "' matches '" + candidate + "'" ) .isTrue(); } for ( String candidate : expectedNonMatching ) { softly.assertThat( pattern.matches( candidate...
public boolean matches(String candidate) { return matches( candidate, 0 ); }
SimpleGlobPattern { public boolean matches(String candidate) { return matches( candidate, 0 ); } }
SimpleGlobPattern { public boolean matches(String candidate) { return matches( candidate, 0 ); } private SimpleGlobPattern(); }
SimpleGlobPattern { public boolean matches(String candidate) { return matches( candidate, 0 ); } private SimpleGlobPattern(); static SimpleGlobPattern compile(String patternString); boolean matches(String candidate); SimpleGlobPattern prependLiteral(String literal); SimpleGlobPattern prependMany(); Optional<String> to...
SimpleGlobPattern { public boolean matches(String candidate) { return matches( candidate, 0 ); } private SimpleGlobPattern(); static SimpleGlobPattern compile(String patternString); boolean matches(String candidate); SimpleGlobPattern prependLiteral(String literal); SimpleGlobPattern prependMany(); Optional<String> to...
@Test public void deserializeBoolean_fromUpperCase() throws Exception { boolean t = SerializationUtil.parseBooleanParameterOptional( "My parameter 1", "TRUE", false ); boolean f = SerializationUtil.parseBooleanParameterOptional( "My parameter 2", "FALSE", true ); assertThat( t ).isTrue(); assertThat( f ).isFalse(); }
public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter( key, value, null );...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
@Test public void deserializeBoolean_fromIrregularCase() throws Exception { boolean t = SerializationUtil.parseBooleanParameterOptional( "My parameter 1", "TruE", false ); boolean f = SerializationUtil.parseBooleanParameterOptional( "My parameter 2", "FalSe", true ); assertThat( t ).as( "Case should be ignored." ).isTr...
public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter( key, value, null );...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
@Test public void deserializeBoolean_fromMissing() throws Exception { boolean t = SerializationUtil.parseBooleanParameterOptional( "My parameter 1", null, true ); boolean f = SerializationUtil.parseBooleanParameterOptional( "My parameter 2", null, false ); assertThat( t ).as( "Default value should be returned." ).isTru...
public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter( key, value, null );...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
@Test public void deserializeBoolean_fromOthers() throws Exception { for ( String value : new String[] { "", "0", "1", "t", "f" } ) { try { SerializationUtil.parseBooleanParameterOptional( "My parameter", value, true ); fail(); } catch (SearchException e) { String expectedMsg = "HSEARCH500029: Unable to parse value '" ...
public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter( key, value, null );...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
SerializationUtil { public static boolean parseBooleanParameterOptional(String key, String value, boolean defaultValue) { if ( value == null ) { return defaultValue; } if ( "true".equalsIgnoreCase( value ) ) { return true; } if ( "false".equalsIgnoreCase( value ) ) { return false; } throw log.unableToParseJobParameter(...
@Test public void validateEntityTypes_whenAllTypesAreAvailableInEMF() throws Exception { String serializedEntityTypes = Stream .of( Company.class, Person.class ) .map( Class::getName ) .collect( Collectors.joining( "," ) ); ValidationUtil.validateEntityTypes( null, EMF_SCOPE, PERSISTENCE_UNIT_NAME, serializedEntityType...
public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityManagerFactoryReferen...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
@Test public void validateEntityTypes_whenContainingNonIndexedTypes() throws Exception { String serializedEntityTypes = Stream .of( Company.class, Person.class, NotIndexed.class ) .map( Class::getName ) .collect( Collectors.joining( "," ) ); thrown.expect( SearchException.class ); thrown.expectMessage( "HSEARCH500032: ...
public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityManagerFactoryReferen...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
ValidationUtil { public static void validateEntityTypes( EntityManagerFactoryRegistry emfRegistry, String entityManagerFactoryScope, String entityManagerFactoryReference, String serializedEntityTypes) { EntityManagerFactory emf = JobContextUtil.getEntityManagerFactory( emfRegistry, entityManagerFactoryScope, entityMana...
@Test(expected = SearchException.class) public void validatePositive_valueIsNegative() throws Exception { ValidationUtil.validatePositive( "MyParameter", -1 ); }
public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition); static void v...
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition); static void v...
@Test(expected = SearchException.class) public void validatePositive_valueIsZero() throws Exception { ValidationUtil.validatePositive( "MyParameter", 0 ); }
public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition); static void v...
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition); static void v...
@Test public void validatePositive_valueIsPositive() throws Exception { ValidationUtil.validatePositive( "MyParameter", 1 ); }
public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); }
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition); static void v...
ValidationUtil { public static void validatePositive(String parameterName, int parameterValue) { if ( parameterValue <= 0 ) { throw log.negativeValueOrZero( parameterName, parameterValue ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition); static void v...
@Test public void validateCheckpointInterval_lessThanRowsPerPartition() throws Exception { ValidationUtil.validateCheckpointInterval( 99, 100 ); }
public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointI...
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointI...
@Test public void toPatternString() { assertThat( pattern.toPatternString() ).isEqualTo( expectedToPatternString ); }
public abstract String toPatternString();
SimpleGlobPattern { public abstract String toPatternString(); }
SimpleGlobPattern { public abstract String toPatternString(); private SimpleGlobPattern(); }
SimpleGlobPattern { public abstract String toPatternString(); private SimpleGlobPattern(); static SimpleGlobPattern compile(String patternString); boolean matches(String candidate); SimpleGlobPattern prependLiteral(String literal); SimpleGlobPattern prependMany(); Optional<String> toLiteral(); abstract String toPatter...
SimpleGlobPattern { public abstract String toPatternString(); private SimpleGlobPattern(); static SimpleGlobPattern compile(String patternString); boolean matches(String candidate); SimpleGlobPattern prependLiteral(String literal); SimpleGlobPattern prependMany(); Optional<String> toLiteral(); abstract String toPatter...
@Test public void validateCheckpointInterval_equalToRowsPerPartition() { ValidationUtil.validateCheckpointInterval( 100, 100 ); }
public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointI...
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointI...
@Test(expected = SearchException.class) public void validateCheckpointInterval_greaterThanRowsPerPartition() throws Exception { ValidationUtil.validateCheckpointInterval( 101, 100 ); }
public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); }
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointI...
ValidationUtil { public static void validateCheckpointInterval(int checkpointInterval, int rowsPerPartition) { if ( checkpointInterval > rowsPerPartition ) { throw log.illegalCheckpointInterval( checkpointInterval, rowsPerPartition ); } } private ValidationUtil(); static void validateCheckpointInterval(int checkpointI...
@Test public void validateSessionClearInterval_lessThanCheckpointInterval() throws Exception { ValidationUtil.validateSessionClearInterval( 99, 100 ); }
public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); static void validateCheckpointInterval...
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); static void validateCheckpointInterval...
@Test public void validateSessionClearInterval_equalToCheckpointInterval() { ValidationUtil.validateSessionClearInterval( 100, 100 ); }
public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); static void validateCheckpointInterval...
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); static void validateCheckpointInterval...
@Test(expected = SearchException.class) public void validateSessionClearInterval_greaterThanCheckpointInterval() throws Exception { ValidationUtil.validateSessionClearInterval( 101, 100 ); }
public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); }
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); static void validateCheckpointInterval...
ValidationUtil { public static void validateSessionClearInterval(int sessionClearInterval, int checkpointInterval) { if ( sessionClearInterval > checkpointInterval ) { throw log.illegalSessionClearInterval( sessionClearInterval, checkpointInterval ); } } private ValidationUtil(); static void validateCheckpointInterval...
@Test public void testMapPartitions() throws Exception { JobContextData jobData = new JobContextData(); jobData.setEntityManagerFactory( emf ); jobData.setCustomQueryCriteria( new HashSet<>() ); jobData.setEntityTypeDescriptors( Arrays.asList( JobTestUtil.createSimpleEntityTypeDescriptor( emf, Company.class ), JobTestU...
@Override public PartitionPlan mapPartitions() throws Exception { JobContextData jobData = (JobContextData) jobContext.getTransientUserData(); emf = jobData.getEntityManagerFactory(); try ( StatelessSession ss = PersistenceUtil.openStatelessSession( emf, tenantId ) ) { Integer maxResults = SerializationUtil.parseIntege...
PartitionMapper implements javax.batch.api.partition.PartitionMapper { @Override public PartitionPlan mapPartitions() throws Exception { JobContextData jobData = (JobContextData) jobContext.getTransientUserData(); emf = jobData.getEntityManagerFactory(); try ( StatelessSession ss = PersistenceUtil.openStatelessSession(...
PartitionMapper implements javax.batch.api.partition.PartitionMapper { @Override public PartitionPlan mapPartitions() throws Exception { JobContextData jobData = (JobContextData) jobContext.getTransientUserData(); emf = jobData.getEntityManagerFactory(); try ( StatelessSession ss = PersistenceUtil.openStatelessSession(...
PartitionMapper implements javax.batch.api.partition.PartitionMapper { @Override public PartitionPlan mapPartitions() throws Exception { JobContextData jobData = (JobContextData) jobContext.getTransientUserData(); emf = jobData.getEntityManagerFactory(); try ( StatelessSession ss = PersistenceUtil.openStatelessSession(...
PartitionMapper implements javax.batch.api.partition.PartitionMapper { @Override public PartitionPlan mapPartitions() throws Exception { JobContextData jobData = (JobContextData) jobContext.getTransientUserData(); emf = jobData.getEntityManagerFactory(); try ( StatelessSession ss = PersistenceUtil.openStatelessSession(...
@Test public void exactType() { PojoRawTypeModel typeToMatchMock = mock( PojoRawTypeModel.class ); PojoGenericTypeModel typeToInspectMock = mock( PojoGenericTypeModel.class ); PojoRawTypeModel typeToInspectRawTypeMock = mock( PojoRawTypeModel.class ); when( introspectorMock.typeModel( String.class ) ) .thenReturn( type...
public TypePatternMatcher createExactRawTypeMatcher(Class<?> exactTypeToMatch) { PojoRawTypeModel<?> exactTypeToMatchModel = introspector.typeModel( exactTypeToMatch ); return new ExactRawTypeMatcher( exactTypeToMatchModel ); }
TypePatternMatcherFactory { public TypePatternMatcher createExactRawTypeMatcher(Class<?> exactTypeToMatch) { PojoRawTypeModel<?> exactTypeToMatchModel = introspector.typeModel( exactTypeToMatch ); return new ExactRawTypeMatcher( exactTypeToMatchModel ); } }
TypePatternMatcherFactory { public TypePatternMatcher createExactRawTypeMatcher(Class<?> exactTypeToMatch) { PojoRawTypeModel<?> exactTypeToMatchModel = introspector.typeModel( exactTypeToMatch ); return new ExactRawTypeMatcher( exactTypeToMatchModel ); } TypePatternMatcherFactory(PojoBootstrapIntrospector introspector...
TypePatternMatcherFactory { public TypePatternMatcher createExactRawTypeMatcher(Class<?> exactTypeToMatch) { PojoRawTypeModel<?> exactTypeToMatchModel = introspector.typeModel( exactTypeToMatch ); return new ExactRawTypeMatcher( exactTypeToMatchModel ); } TypePatternMatcherFactory(PojoBootstrapIntrospector introspector...
TypePatternMatcherFactory { public TypePatternMatcher createExactRawTypeMatcher(Class<?> exactTypeToMatch) { PojoRawTypeModel<?> exactTypeToMatchModel = introspector.typeModel( exactTypeToMatch ); return new ExactRawTypeMatcher( exactTypeToMatchModel ); } TypePatternMatcherFactory(PojoBootstrapIntrospector introspector...
@Test public void wildcardType() { assertThatThrownBy( () -> factory.createExtractingMatcher( new WildcardTypeCapture<Of<?>>() { }.getType(), String.class ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void typeVariable() { Type type = new TypeCapture<T>() { }.getType(); assertThatThrownBy( () -> factory.createExtractingMatcher( type, String.class ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public void rawSuperType() { PojoRawTypeModel<String> typeToMatchMock = mock( PojoRawTypeModel.class ); PojoGenericTypeModel<Integer> resultTypeMock = mock( PojoGenericTypeModel.class ); PojoGenericTypeModel<?> typeToInspectMock = mock( PojoGenericTypeModel.class ); PojoRawTypeModel typeToInspectRawTypeMock = moc...
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public void toLiteral() { assertThat( pattern.toLiteral() ).isEqualTo( expectedToLiteral ); }
public Optional<String> toLiteral() { return Optional.empty(); }
SimpleGlobPattern { public Optional<String> toLiteral() { return Optional.empty(); } }
SimpleGlobPattern { public Optional<String> toLiteral() { return Optional.empty(); } private SimpleGlobPattern(); }
SimpleGlobPattern { public Optional<String> toLiteral() { return Optional.empty(); } private SimpleGlobPattern(); static SimpleGlobPattern compile(String patternString); boolean matches(String candidate); SimpleGlobPattern prependLiteral(String literal); SimpleGlobPattern prependMany(); Optional<String> toLiteral(); a...
SimpleGlobPattern { public Optional<String> toLiteral() { return Optional.empty(); } private SimpleGlobPattern(); static SimpleGlobPattern compile(String patternString); boolean matches(String candidate); SimpleGlobPattern prependLiteral(String literal); SimpleGlobPattern prependMany(); Optional<String> toLiteral(); a...
@Test public <T> void rawSuperType_resultIsTypeVariable() { assertThatThrownBy( () -> factory.createExtractingMatcher( String.class, new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void rawSuperType_resultIsWildcard() { assertThatThrownBy( () -> factory.createExtractingMatcher( String.class, new WildcardTypeCapture<Of<?>>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public void rawSuperType_resultIsParameterized() { assertThatThrownBy( () -> factory.createExtractingMatcher( String.class, new TypeCapture<List<String>>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public void nonGenericArrayElement() { PojoRawTypeModel<String[]> typeToMatchMock = mock( PojoRawTypeModel.class ); PojoGenericTypeModel<Integer> resultTypeMock = mock( PojoGenericTypeModel.class ); PojoGenericTypeModel<?> typeToInspectMock = mock( PojoGenericTypeModel.class ); PojoRawTypeModel typeToInspectRawTy...
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void genericArrayElement() { PojoGenericTypeModel<?> typeToInspectMock = mock( PojoGenericTypeModel.class ); PojoGenericTypeModel<T> resultTypeMock = mock( PojoGenericTypeModel.class ); ExtractingTypePatternMatcher matcher = factory.createExtractingMatcher( new TypeCapture<T[]>() { }.getType(), new Typ...
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T extends Iterable<?>> void genericArrayElement_boundedTypeVariable() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<T[]>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T extends Object & Serializable> void genericArrayElement_multiBoundedTypeVariable() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<T[]>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void genericArrayElement_resultIsRawType() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<T[]>() { }.getType(), Object.class ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T, U> void genericArrayElement_resultIsDifferentTypeArgument() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<T[]>() { }.getType(), new TypeCapture<U>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void parameterizedType() { PojoGenericTypeModel<?> typeToInspectMock = mock( PojoGenericTypeModel.class ); PojoGenericTypeModel<Integer> resultTypeMock = mock( PojoGenericTypeModel.class ); ExtractingTypePatternMatcher matcher = factory.createExtractingMatcher( new TypeCapture<Map<?, T>>() { }.getType(...
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public void runnable_cancel() throws InterruptedException { AtomicBoolean started = new AtomicBoolean( false ); AtomicBoolean finished = new AtomicBoolean( false ); CompletableFuture<Void> future = new CancellableExecutionCompletableFuture<>( () -> { started.set( true ); try { Thread.sleep( Long.MAX_VALUE ); } ca...
@Override public boolean cancel(boolean mayInterruptIfRunning) { super.cancel( mayInterruptIfRunning ); return future.cancel( mayInterruptIfRunning ); }
CancellableExecutionCompletableFuture extends CompletableFuture<T> { @Override public boolean cancel(boolean mayInterruptIfRunning) { super.cancel( mayInterruptIfRunning ); return future.cancel( mayInterruptIfRunning ); } }
CancellableExecutionCompletableFuture extends CompletableFuture<T> { @Override public boolean cancel(boolean mayInterruptIfRunning) { super.cancel( mayInterruptIfRunning ); return future.cancel( mayInterruptIfRunning ); } CancellableExecutionCompletableFuture(Runnable runnable, ExecutorService executor); }
CancellableExecutionCompletableFuture extends CompletableFuture<T> { @Override public boolean cancel(boolean mayInterruptIfRunning) { super.cancel( mayInterruptIfRunning ); return future.cancel( mayInterruptIfRunning ); } CancellableExecutionCompletableFuture(Runnable runnable, ExecutorService executor); @Override bool...
CancellableExecutionCompletableFuture extends CompletableFuture<T> { @Override public boolean cancel(boolean mayInterruptIfRunning) { super.cancel( mayInterruptIfRunning ); return future.cancel( mayInterruptIfRunning ); } CancellableExecutionCompletableFuture(Runnable runnable, ExecutorService executor); @Override bool...
@Test public <T> void parameterizedType_upperBoundedWildcard() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<? extends Long, T>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void parameterizedType_lowerBoundedWildcard() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<? super Long, T>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void parameterizedType_onlyWildcards() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<?, ?>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T> void parameterizedType_rawType() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<?, String>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T extends Iterable<?>> void parameterizedType_boundedTypeVariable() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<?, T>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T extends Object & Serializable> void parameterizedType_multiBoundedTypeVariable() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<?, T>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T, U> void parameterizedType_multipleTypeVariables() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<T, U>>() { }.getType(), new TypeCapture<T>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T, U> void parameterizedType_resultIsRawType() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<?, T>>() { }.getType(), Object.class ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public <T, U> void parameterizedType_resultIsDifferentTypeArgument() { assertThatThrownBy( () -> factory.createExtractingMatcher( new TypeCapture<Map<?, T>>() { }.getType(), new TypeCapture<U>() { }.getType() ) ) .isInstanceOf( UnsupportedOperationException.class ); }
public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw new UnsupportedOperationExcep...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
TypePatternMatcherFactory { public ExtractingTypePatternMatcher createExtractingMatcher(Type typePattern, Type typeToExtract) { if ( typePattern instanceof TypeVariable ) { throw new UnsupportedOperationException( "Matching a type variable is not supported" ); } else if ( typePattern instanceof WildcardType ) { throw n...
@Test public void ofProperty() { assertThat( PojoModelPath.ofProperty( "foo" ) ) .satisfies( isPath( "foo" ) ); assertThatThrownBy( () -> PojoModelPath.ofProperty( null ) ) .isInstanceOf( IllegalArgumentException.class ); assertThatThrownBy( () -> PojoModelPath.ofProperty( "" ) ) .isInstanceOf( IllegalArgumentException...
public static PojoModelPathPropertyNode ofProperty(String propertyName) { return new PojoModelPathPropertyNode( null, propertyName ); }
PojoModelPath { public static PojoModelPathPropertyNode ofProperty(String propertyName) { return new PojoModelPathPropertyNode( null, propertyName ); } }
PojoModelPath { public static PojoModelPathPropertyNode ofProperty(String propertyName) { return new PojoModelPathPropertyNode( null, propertyName ); } PojoModelPath(); }
PojoModelPath { public static PojoModelPathPropertyNode ofProperty(String propertyName) { return new PojoModelPathPropertyNode( null, propertyName ); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName);...
PojoModelPath { public static PojoModelPathPropertyNode ofProperty(String propertyName) { return new PojoModelPathPropertyNode( null, propertyName ); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName);...
@Test public void split() { MyException1 exception1 = new MyException1(); MyException2 exception2 = new MyException2(); IOException exception3 = new IOException(); assertThatThrownBy( () -> { try ( Closer<IOException> closer1 = new Closer<>(); Closer<MyException1> closer2 = closer1.split(); Closer<MyException2> closer3...
public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } Closer(); private Closer(CloseableState state); }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } Closer(); private Closer(CloseableState state); Closer<E2> split(); @Override void close(); }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } Closer(); private Closer(CloseableState state); Closer<E2> split(); @Override void close(); }
@Test public void ofValue_property() { assertThat( PojoModelPath.ofValue( "foo" ) ) .satisfies( isPath( "foo", ContainerExtractorPath.defaultExtractors() ) ); assertThatThrownBy( () -> PojoModelPath.ofValue( null ) ) .isInstanceOf( IllegalArgumentException.class ); assertThatThrownBy( () -> PojoModelPath.ofValue( "" ) ...
public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); }
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } }
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } PojoModelPath(); }
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String prop...
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String prop...
@Test public void ofValue_propertyAndContainerExtractorPath() { assertThat( PojoModelPath.ofValue( "foo", ContainerExtractorPath.explicitExtractor( BuiltinContainerExtractors.MAP_KEY ) ) ) .satisfies( isPath( "foo", ContainerExtractorPath.explicitExtractor( BuiltinContainerExtractors.MAP_KEY ) ) ); assertThatThrownBy( ...
public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); }
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } }
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } PojoModelPath(); }
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String prop...
PojoModelPath { public static PojoModelPathValueNode ofValue(String propertyName) { return ofValue( propertyName, ContainerExtractorPath.defaultExtractors() ); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String prop...
@Test public void parse() { assertThat( PojoModelPath.parse( "foo" ) ) .satisfies( isPath( "foo", ContainerExtractorPath.defaultExtractors() ) ); assertThat( PojoModelPath.parse( "foo.bar" ) ) .satisfies( isPath( "foo", ContainerExtractorPath.defaultExtractors(), "bar", ContainerExtractorPath.defaultExtractors() ) ); a...
public static PojoModelPathValueNode parse(String dotSeparatedPath) { Contracts.assertNotNullNorEmpty( dotSeparatedPath, "dotSeparatedPath" ); Builder builder = builder(); for ( String propertyName : DOT_PATTERN.split( dotSeparatedPath, -1 ) ) { builder.property( propertyName ).valueWithDefaultExtractors(); } return bu...
PojoModelPath { public static PojoModelPathValueNode parse(String dotSeparatedPath) { Contracts.assertNotNullNorEmpty( dotSeparatedPath, "dotSeparatedPath" ); Builder builder = builder(); for ( String propertyName : DOT_PATTERN.split( dotSeparatedPath, -1 ) ) { builder.property( propertyName ).valueWithDefaultExtractor...
PojoModelPath { public static PojoModelPathValueNode parse(String dotSeparatedPath) { Contracts.assertNotNullNorEmpty( dotSeparatedPath, "dotSeparatedPath" ); Builder builder = builder(); for ( String propertyName : DOT_PATTERN.split( dotSeparatedPath, -1 ) ) { builder.property( propertyName ).valueWithDefaultExtractor...
PojoModelPath { public static PojoModelPathValueNode parse(String dotSeparatedPath) { Contracts.assertNotNullNorEmpty( dotSeparatedPath, "dotSeparatedPath" ); Builder builder = builder(); for ( String propertyName : DOT_PATTERN.split( dotSeparatedPath, -1 ) ) { builder.property( propertyName ).valueWithDefaultExtractor...
PojoModelPath { public static PojoModelPathValueNode parse(String dotSeparatedPath) { Contracts.assertNotNullNorEmpty( dotSeparatedPath, "dotSeparatedPath" ); Builder builder = builder(); for ( String propertyName : DOT_PATTERN.split( dotSeparatedPath, -1 ) ) { builder.property( propertyName ).valueWithDefaultExtractor...
@Test public void builder() { PojoModelPath.Builder builder = PojoModelPath.builder(); builder.property( "foo" ).value( BuiltinContainerExtractors.COLLECTION ) .property( "bar" ).valueWithoutExtractors() .property( "fubar" ).valueWithDefaultExtractors() .property( "other" ).value( BuiltinContainerExtractors.MAP_KEY ) ....
public static Builder builder() { return new Builder(); }
PojoModelPath { public static Builder builder() { return new Builder(); } }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
@Test public void builder_missingContainerExtractorPath_middle() { PojoModelPath.Builder builder = PojoModelPath.builder(); builder.property( "foo" ).property( "bar" ).value( BuiltinContainerExtractors.MAP_KEY ); assertThat( builder.toValuePath() ) .satisfies( isPath( "foo", ContainerExtractorPath.defaultExtractors(), ...
public static Builder builder() { return new Builder(); }
PojoModelPath { public static Builder builder() { return new Builder(); } }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
@Test public void builder_missingContainerExtractorPath_end() { PojoModelPath.Builder builder = PojoModelPath.builder(); builder.property( "foo" ).value( BuiltinContainerExtractors.COLLECTION ).property( "bar" ); assertThat( builder.toValuePath() ) .satisfies( isPath( "foo", ContainerExtractorPath.explicitExtractor( Bu...
public static Builder builder() { return new Builder(); }
PojoModelPath { public static Builder builder() { return new Builder(); } }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
@Test public void builder_missingPropertyName() { assertThat( PojoModelPath.builder().toValuePathOrNull() ).isNull(); assertThat( PojoModelPath.builder().toPropertyPathOrNull() ).isNull(); String errorMessage = "A PojoModelPath must include at least one property"; assertThatThrownBy( () -> PojoModelPath.builder().toVal...
public static Builder builder() { return new Builder(); }
PojoModelPath { public static Builder builder() { return new Builder(); } }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
@Test public void builder_chainedContainerExtractors() { PojoModelPath.Builder builder = PojoModelPath.builder(); builder.property( "foo" ).value( BuiltinContainerExtractors.COLLECTION ).value( BuiltinContainerExtractors.ITERABLE ) .property( "bar" ).value( BuiltinContainerExtractors.MAP_KEY ); assertThat( builder.toVa...
public static Builder builder() { return new Builder(); }
PojoModelPath { public static Builder builder() { return new Builder(); } }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
@Test public void builder_chainedContainerExtractors_defaultExtractors() { assertThat( PojoModelPath.builder().property( "foo" ) .valueWithoutExtractors().valueWithDefaultExtractors() .toValuePath() ) .satisfies( isPath( "foo", ContainerExtractorPath.defaultExtractors() ) ); String errorMessage = "chain of multiple con...
public static Builder builder() { return new Builder(); }
PojoModelPath { public static Builder builder() { return new Builder(); } }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); }
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
PojoModelPath { public static Builder builder() { return new Builder(); } PojoModelPath(); static Builder builder(); static PojoModelPathPropertyNode ofProperty(String propertyName); static PojoModelPathValueNode ofValue(String propertyName); static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractor...
@Test public void identifierBridge() { IdentifierBridgeToDocumentIdentifierContext toDocumentContext = new IdentifierBridgeToDocumentIdentifierContextImpl( mappingContext ); assertThat( toDocumentContext.extension( HibernateOrmExtension.get() ) ).isSameAs( mappingContext ); IdentifierBridgeFromDocumentIdentifierContext...
public static HibernateOrmExtension get() { return INSTANCE; }
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
@Test public void split_transitive() { MyException1 exception1 = new MyException1(); MyException2 exception2 = new MyException2(); IOException exception3 = new IOException(); assertThatThrownBy( () -> { try ( Closer<IOException> closer1 = new Closer<>(); Closer<MyException1> closer2 = closer1.split(); Closer<MyExceptio...
public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } Closer(); private Closer(CloseableState state); }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } Closer(); private Closer(CloseableState state); Closer<E2> split(); @Override void close(); }
Closer extends AbstractCloser<Closer<E>, E> implements AutoCloseable { public <E2 extends Exception> Closer<E2> split() { return new Closer<>( state ); } Closer(); private Closer(CloseableState state); Closer<E2> split(); @Override void close(); }
@Test public void routingBridge() { RoutingBridgeRouteContext context = new SessionBasedBridgeOperationContext( sessionContext ); assertThat( context.extension( HibernateOrmExtension.get() ) ).isSameAs( sessionContext ); }
public static HibernateOrmExtension get() { return INSTANCE; }
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
@Test @SuppressWarnings("deprecation") public void routingKeyBridge() { org.hibernate.search.mapper.pojo.bridge.runtime.RoutingKeyBridgeToRoutingKeyContext context = new SessionBasedBridgeOperationContext( sessionContext ); assertThat( context.extension( HibernateOrmExtension.get() ) ).isSameAs( sessionContext ); }
public static HibernateOrmExtension get() { return INSTANCE; }
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
@Test public void typeBridge() { TypeBridgeWriteContext context = new SessionBasedBridgeOperationContext( sessionContext ); assertThat( context.extension( HibernateOrmExtension.get() ) ).isSameAs( sessionContext ); }
public static HibernateOrmExtension get() { return INSTANCE; }
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...
HibernateOrmExtension implements IdentifierBridgeToDocumentIdentifierContextExtension<HibernateOrmMappingContext>, IdentifierBridgeFromDocumentIdentifierContextExtension<HibernateOrmSessionContext>, RoutingBridgeRouteContextExtension<HibernateOrmSessionContext>, org.hibernate.search.mapper.pojo.bridge.runti...