conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
private DataReader getDataReader(String fileName) throws IOException {
return new DataReaderSun1_6_0G1(new GCResource(fileName), getInputStream(fileName), GcLogType.SUN1_7G1);
}
private DataReader getDataReader(GCResource gcResource) throws IOException {
return new DataReaderSun1_6_0G1(gcResource, getInputStream(gcResource.getResourceName()), GcLogType.SUN1_7G1);
}
=======
>>>>>>>
private DataReader getDataReader(String fileName) throws IOException {
return new DataReaderSun1_6_0G1(new GCResource(fileName), getInputStream(fileName), GcLogType.SUN1_7G1);
}
private DataReader getDataReader(GCResource gcResource) throws IOException {
return new DataReaderSun1_6_0G1(gcResource, getInputStream(gcResource.getResourceName()), GcLogType.SUN1_7G1);
}
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0-01_G1_young.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0-01_G1_young.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0-01_G1_young.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0-02_G1_young.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0-02_G1_young.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0-02_G1_young.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0_02_G1_young_datestamp.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0_02_G1_young_datestamp.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0_02_G1_young_datestamp.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0G1_DateStamp_Detailed-mixedLine2.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0G1_DateStamp_Detailed-mixedLine2.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0G1_DateStamp_Detailed-mixedLine2.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
<<<<<<<
final DataReader reader = new DataReaderSun1_6_0G1(gcResource, in, GcLogType.SUN1_7G1);
=======
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
DataReader reader = new DataReaderSun1_6_0G1(gcResource, in, GcLogType.SUN1_7G1);
<<<<<<<
final DataReader reader = new DataReaderSun1_6_0G1(gcResource, in, GcLogType.SUN1_7G1);
=======
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
DataReader reader = new DataReaderSun1_6_0G1(gcResource, in, GcLogType.SUN1_7G1);
<<<<<<<
final DataReader reader = new DataReaderSun1_6_0G1(new GCResource("byteArray"), in, GcLogType.SUN1_7G1);
=======
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
DataReader reader = new DataReaderSun1_6_0G1(new GCResource("byteArray"), in, GcLogType.SUN1_7G1);
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0G1TenuringDistribution.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0G1TenuringDistribution.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0G1TenuringDistribution.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0_02PrintApplicationTimeTenuringDistribution.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0_02PrintApplicationTimeTenuringDistribution.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0_02PrintApplicationTimeTenuringDistribution.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource);
<<<<<<<
final DataReader reader = new DataReaderSun1_6_0G1(new GCResource("bytearray"), in, GcLogType.SUN1_7G1);
=======
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
DataReader reader = new DataReaderSun1_6_0G1(new GCResource("bytearray"), in, GcLogType.SUN1_7G1);
<<<<<<<
GCResource gcResource = new GCResource("SampleSun1_7_0G1_PrintHeapAtGC_withConcurrent.txt");
gcResource.getLogger().addHandler(handler);
final DataReader reader = getDataReader(gcResource);
=======
IMP_LOGGER.addHandler(handler);
DATA_READER_FACTORY_LOGGER.addHandler(handler);
final InputStream in = getInputStream("SampleSun1_7_0G1_PrintHeapAtGC_withConcurrent.txt");
final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
>>>>>>>
GCResource gcResource = new GCResource("SampleSun1_7_0G1_PrintHeapAtGC_withConcurrent.txt");
gcResource.getLogger().addHandler(handler);
DataReader reader = getDataReader(gcResource); |
<<<<<<<
import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasName;
import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasCodespaceName;
import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasDeletedFlag;
import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasOfferings;
=======
>>>>>>>
import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasDescription;
import org.n52.sos.ds.hibernate.entities.HibernateRelations.HasIdentifier;
<<<<<<<
public boolean isDeleted() {
return deleted;
}
@Override
public AbstractValue setDeleted(boolean deleted) {
this.deleted = deleted;
return this;
}
@Override
public boolean getDeleted() {
return deleted;
}
/**
* Is unit set
*
* @return <code>true</code>, if unit is set
*/
=======
>>>>>>> |
<<<<<<<
getLogger().severe("printCmsStatisticsIterationsMatcher did not match for line " + lineNumber + ": '" + line + "'");
=======
LOG.severe("printCmsStatisticsIterationsMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
>>>>>>>
getLogger().severe("printCmsStatisticsIterationsMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
<<<<<<<
getLogger().severe("printDistributionMatcher did not match for line " + lineNumber + ": '" + line + "'");
=======
LOG.severe("printDistributionMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
>>>>>>>
getLogger().severe("printDistributionMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
<<<<<<<
getLogger().severe("printAdaptiveSizePolicyMatcher did not match for line " + lineNumber + ": '" + line + "'");
=======
LOG.severe("printAdaptiveSizePolicyMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
>>>>>>>
getLogger().severe("printAdaptiveSizePolicyMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
<<<<<<<
getLogger().severe("adaptiveSizePolicyMatcher did not match for line " + lineNumber + ": '" + line + "'");
=======
LOG.severe("adaptiveSizePolicyMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'");
>>>>>>>
getLogger().severe("adaptiveSizePolicyMatcher did not match for line " + in.getLineNumber() + ": '" + line + "'"); |
<<<<<<<
request.setSelectedAuthProfileAndAuthType( ProfileSelectionForm.BASIC_AUTH_PROFILE, authType );
request.setPreemptive( true );
=======
request.setSelectedAuthProfileAndAuthType( AbstractHttpRequest.BASIC_AUTH_PROFILE, authType );
>>>>>>>
request.setSelectedAuthProfileAndAuthType( AbstractHttpRequest.BASIC_AUTH_PROFILE, authType );
request.setPreemptive( true );
<<<<<<<
request.setSelectedAuthProfileAndAuthType( ProfileSelectionForm.BASIC_AUTH_PROFILE, authType );
request.setPreemptive( false );
=======
request.setSelectedAuthProfileAndAuthType( AbstractHttpRequest.BASIC_AUTH_PROFILE, authType );
>>>>>>>
request.setSelectedAuthProfileAndAuthType( AbstractHttpRequest.BASIC_AUTH_PROFILE, authType );
request.setPreemptive( false ); |
<<<<<<<
profile.setAccessTokenInProfile( token.getAccessToken() );
=======
profile.setAccessToken( token.getAccessToken() );
browserFacade.close();
>>>>>>>
profile.setAccessTokenInProfile( token.getAccessToken() );
browserFacade.close(); |
<<<<<<<
import com.eviware.soapui.analytics.providers.OSUserProviderFactory;
=======
import com.eviware.soapui.autoupdate.SoapUIAutoUpdaterUtils;
import com.eviware.soapui.autoupdate.SoapUIUpdateProvider;
>>>>>>>
import com.eviware.soapui.analytics.providers.OSUserProviderFactory;
import com.eviware.soapui.autoupdate.SoapUIAutoUpdaterUtils;
import com.eviware.soapui.autoupdate.SoapUIUpdateProvider;
<<<<<<<
initializeAnalytics();
Analytics.trackOSUser("Ilya", "Avdeev", "[email protected]");
=======
>>>>>>>
<<<<<<<
private static boolean analyticsDisabled() {
Settings settings = SoapUI.getSettings();
boolean disableAnalytics = settings.getBoolean(UISettings.DISABLE_ANALYTICS, true);
if (!disableAnalytics) {
return false;
}
Version optOutVersion = new Version(settings.getString(UISettings.ANALYTICS_OPT_OUT_VERSION, "0.0"));
Version currentSoapUIVersion = new Version(SoapUI.SOAPUI_VERSION);
if (!optOutVersion.getMajorVersion().equals(currentSoapUIVersion.getMajorVersion())) {
disableAnalytics = JOptionPane.showConfirmDialog(null, "Do you want to help us improve SoapUI by sending anonymous usage statistics?",
"Usage statistics", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION;
settings.setBoolean(UISettings.DISABLE_ANALYTICS, disableAnalytics);
}
if (disableAnalytics) {
settings.setString(UISettings.ANALYTICS_OPT_OUT_VERSION, currentSoapUIVersion.getMajorVersion());
}
return disableAnalytics;
}
private void initializeAnalytics() {
AnalyticsManager manager = Analytics.getAnalyticsManager();
manager.setExecutorService(SoapUI.getThreadPool());
//We send non-anonymous (license) data to Keen IO anyway, even if user has opted out
manager.registerAnalyticsProviderFactory(new OSUserProviderFactory());
if (analyticsDisabled()) {
return;
}
manager.registerAnalyticsProviderFactory(new GoogleAnalyticsProviderFactory());
if (System.getProperty("soapui.analytics.logtab", "false").equals("true")) {
manager.registerAnalyticsProviderFactory(new LogTabAnalyticsProvider.LogTabAnalyticsProviderFactory());
}
}
=======
>>>>>>> |
<<<<<<<
public static final String EXPIRED_TOKEN = "EXPIRED#TOKEN";
=======
private static final String EXPIRED_TOKEN = "EXPIRED#TOKEN";
private static final String ACCESS_TOKEN = "ACDFECDSFKJFK#SDFSD8df#ACCESS-TOKEN";
private static final String RETRIEVED_ACCESS_TOKEN = "yyCDFECDSFKJFK#dsfsddf#28317";
>>>>>>>
public static final String EXPIRED_TOKEN = "EXPIRED#TOKEN";
private static final String ACCESS_TOKEN = "ACDFECDSFKJFK#SDFSD8df#ACCESS-TOKEN";
private static final String RETRIEVED_ACCESS_TOKEN = "yyCDFECDSFKJFK#dsfsddf#28317";
<<<<<<<
restRequest = ModelItemFactory.makeRestRequest();
restRequest.setAuthType( O_AUTH_2.toString() );
WsdlProject project = restRequest.getOperation().getInterface().getProject();
oAuth2ProfileContainer = project.getOAuth2ProfileContainer();
oAuth2Profile = oAuth2ProfileContainer.addNewOAuth2Profile("profile");
oAuth2Profile.setAccessToken( accessToken );
=======
oAuth2RequestFilter = new OAuth2RequestFilter();
>>>>>>>
oAuth2RequestFilter = new OAuth2RequestFilter();
<<<<<<<
httpRequest = new ExtendedPostMethod();
httpRequest.setURI( new URI( "endpoint/path" ) );
mockContext = Mockito.mock( SubmitContext.class );
Mockito.when( mockContext.getProperty( BaseHttpRequestTransport.HTTP_METHOD ) ).thenReturn( httpRequest );
=======
@After
public void restoreLogger() throws Exception
{
OAuth2RequestFilter.setLog(realLogger);
>>>>>>>
@After
public void restoreLogger() throws Exception
{
OAuth2RequestFilter.setLog( realLogger );
<<<<<<<
assertThat( httpRequest.getHeaders( OAuth.HeaderType.AUTHORIZATION ).length, is( 0 ) );
=======
assertThat( httpRequest.getHeaders( OAuth.HeaderType.AUTHORIZATION ), is( anEmptyArray() ) );
>>>>>>>
assertThat( httpRequest.getHeaders( OAuth.HeaderType.AUTHORIZATION ), is( anEmptyArray() ) );
<<<<<<<
return profileWithRefreshToken;
}
private void oAuth2FilterWithMockOAuth2ClientFacade( final OAuth2Profile profileWithRefreshToken )
{
oAuth2RequestFilter = new OAuth2RequestFilter()
{
=======
return profileWithRefreshToken;
}
@Test
public void automaticallyReloadsAccessTokenWhenProfileHasAutomationScripts() throws Exception
{
setupProfileWithAutomationScripts();
oAuth2RequestFilter.filterRestRequest( mockContext, restRequest );
String actualAccessTokenHeader = httpRequest.getHeaders( ( OAuth.HeaderType.AUTHORIZATION ) )[0].getValue();
assertThat( actualAccessTokenHeader, is( "Bearer " + RETRIEVED_ACCESS_TOKEN ) );
}
@Test
public void addsLogStatementsWhenRefreshingAccessToken() throws Exception
{
setupProfileWithRefreshToken();
oAuth2RequestFilter.filterRestRequest( mockContext, restRequest );
verify( mockLogger, times(2) ).info( any( String.class ) );
}
@Test
public void addsLogStatementsWhenReloadingAccessToken() throws Exception
{
setupProfileWithAutomationScripts();
oAuth2RequestFilter.filterRestRequest( mockContext, restRequest );
verify( mockLogger, times(2) ).info( any( String.class ) );
}
/*
Setup helpers.
*/
private void setupRequest() throws URISyntaxException
{
httpRequest = new ExtendedPostMethod();
httpRequest.setURI( new URI( "endpoint/path" ) );
when( mockContext.getProperty( BaseHttpRequestTransport.HTTP_METHOD ) ).thenReturn( httpRequest );
}
private void setupModelItems() throws SoapUIException
{
restRequest = ModelItemFactory.makeRestRequest();
restRequest.setAuthType( O_AUTH_2.toString());
WsdlProject project = restRequest.getOperation().getInterface().getProject();
oAuth2ProfileContainer = project.getOAuth2ProfileContainer();
oAuth2Profile = oAuth2ProfileContainer.getOAuth2ProfileList().get( 0 );
oAuth2Profile.setAccessToken( ACCESS_TOKEN );
}
private void replaceLogger()
{
realLogger = OAuth2RequestFilter.getLog();
OAuth2RequestFilter.setLog( mockLogger );
}
private void setupProfileWithRefreshToken() throws SoapUIException
{
final OAuth2Profile profileWithRefreshToken = OAuth2TestUtils.getOAuthProfileWithRefreshToken();
setExpiredAccessToken( profileWithRefreshToken );
injectProfile( profileWithRefreshToken );
oAuth2ProfileContainer.getOAuth2ProfileList().set( 0, profileWithRefreshToken );
oAuth2Profile = profileWithRefreshToken;
oAuth2FilterWithMockOAuth2ClientFacade( oAuth2Profile );
}
private void oAuth2FilterWithMockOAuth2ClientFacade( final OAuth2Profile profileWithRefreshToken )
{
oAuth2RequestFilter = new OAuth2RequestFilter()
{
>>>>>>>
return profileWithRefreshToken;
}
@Test
public void automaticallyReloadsAccessTokenWhenProfileHasAutomationScripts() throws Exception
{
setupProfileWithAutomationScripts();
oAuth2RequestFilter.filterRestRequest( mockContext, restRequest );
String actualAccessTokenHeader = httpRequest.getHeaders( ( OAuth.HeaderType.AUTHORIZATION ) )[0].getValue();
assertThat( actualAccessTokenHeader, is( "Bearer " + RETRIEVED_ACCESS_TOKEN ) );
}
@Test
public void addsLogStatementsWhenRefreshingAccessToken() throws Exception
{
setupProfileWithRefreshToken();
oAuth2RequestFilter.filterRestRequest( mockContext, restRequest );
verify( mockLogger, times( 2 ) ).info( any( String.class ) );
}
@Test
public void addsLogStatementsWhenReloadingAccessToken() throws Exception
{
setupProfileWithAutomationScripts();
oAuth2RequestFilter.filterRestRequest( mockContext, restRequest );
verify( mockLogger, times( 2 ) ).info( any( String.class ) );
}
/*
Setup helpers.
*/
private void setupRequest() throws URISyntaxException
{
httpRequest = new ExtendedPostMethod();
httpRequest.setURI( new URI( "endpoint/path" ) );
when( mockContext.getProperty( BaseHttpRequestTransport.HTTP_METHOD ) ).thenReturn( httpRequest );
}
private void setupModelItems() throws SoapUIException
{
restRequest = ModelItemFactory.makeRestRequest();
restRequest.setAuthType( O_AUTH_2.toString() );
WsdlProject project = restRequest.getOperation().getInterface().getProject();
oAuth2ProfileContainer = project.getOAuth2ProfileContainer();
List<OAuth2Profile> oAuth2ProfileList = oAuth2ProfileContainer.getOAuth2ProfileList();
if(oAuth2ProfileList.isEmpty())
{
oAuth2Profile = oAuth2ProfileContainer.addNewOAuth2Profile( "OAuth2 - Profile" );
}
else
{
oAuth2Profile = oAuth2ProfileList.get( 0 );
}
oAuth2Profile.setAccessToken( ACCESS_TOKEN );
}
private void replaceLogger()
{
realLogger = OAuth2RequestFilter.getLog();
OAuth2RequestFilter.setLog( mockLogger );
}
private void setupProfileWithRefreshToken() throws SoapUIException
{
final OAuth2Profile profileWithRefreshToken = OAuth2TestUtils.getOAuthProfileWithRefreshToken();
setExpiredAccessToken( profileWithRefreshToken );
injectProfile( profileWithRefreshToken );
oAuth2ProfileContainer.getOAuth2ProfileList().set( 0, profileWithRefreshToken );
oAuth2Profile = profileWithRefreshToken;
oAuth2FilterWithMockOAuth2ClientFacade( oAuth2Profile );
}
private void oAuth2FilterWithMockOAuth2ClientFacade( final OAuth2Profile profileWithRefreshToken )
{
oAuth2RequestFilter = new OAuth2RequestFilter()
{
<<<<<<<
=======
}
private void setupProfileWithAutomationScripts() throws SoapUIException
{
final OAuth2Profile profileWithAutomationScripts = makeProfileWithAutomationScripts();
setExpiredAccessToken( profileWithAutomationScripts );
injectProfile( profileWithAutomationScripts );
oAuth2FilterWithMockOAuth2ClientFacade( profileWithAutomationScripts );
Runnable browserCallbackSimulator = new Runnable()
{
public void run()
{
try
{
Thread.sleep(50);
}
catch( InterruptedException ignore )
{
}
profileWithAutomationScripts.applyRetrievedAccessToken( RETRIEVED_ACCESS_TOKEN );
}
};
new Thread(browserCallbackSimulator).start();
}
private void injectProfile( final OAuth2Profile profileWithAutomationScripts )
{
oAuth2ProfileContainer.getOAuth2ProfileList().set( 0, profileWithAutomationScripts );
oAuth2Profile = profileWithAutomationScripts;
}
private OAuth2Profile makeProfileWithAutomationScripts() throws SoapUIException
{
final OAuth2Profile profileWithAutomationScripts = OAuth2TestUtils.getOAuthProfileWithDefaultValues();
profileWithAutomationScripts.setAutomationJavaScripts( Arrays.asList( "doLoginAndConsent()" ) );
return profileWithAutomationScripts;
>>>>>>>
}
private void setupProfileWithAutomationScripts() throws SoapUIException
{
final OAuth2Profile profileWithAutomationScripts = makeProfileWithAutomationScripts();
setExpiredAccessToken( profileWithAutomationScripts );
injectProfile( profileWithAutomationScripts );
oAuth2FilterWithMockOAuth2ClientFacade( profileWithAutomationScripts );
Runnable browserCallbackSimulator = new Runnable()
{
public void run()
{
try
{
Thread.sleep( 50 );
}
catch( InterruptedException ignore )
{
}
profileWithAutomationScripts.applyRetrievedAccessToken( RETRIEVED_ACCESS_TOKEN );
}
};
new Thread( browserCallbackSimulator ).start();
}
private void injectProfile( final OAuth2Profile profileWithAutomationScripts )
{
oAuth2ProfileContainer.getOAuth2ProfileList().set( 0, profileWithAutomationScripts );
oAuth2Profile = profileWithAutomationScripts;
}
private OAuth2Profile makeProfileWithAutomationScripts() throws SoapUIException
{
final OAuth2Profile profileWithAutomationScripts = OAuth2TestUtils.getOAuthProfileWithDefaultValues();
profileWithAutomationScripts.setAutomationJavaScripts( Arrays.asList( "doLoginAndConsent()" ) );
return profileWithAutomationScripts; |
<<<<<<<
void applyAccessToken( OAuth2Profile profile, RestRequestInterface request );
=======
void refreshAccessToken( OAuth2Profile profile ) throws Exception;
>>>>>>>
void applyAccessToken( OAuth2Profile profile, RestRequestInterface request );
void refreshAccessToken( OAuth2Profile profile ) throws Exception; |
<<<<<<<
import com.eviware.soapui.impl.rest.panels.component.RestResourceEditor;
import com.eviware.soapui.impl.rest.support.RestUtils;
=======
>>>>>>>
import com.eviware.soapui.impl.rest.panels.component.RestResourceEditor;
<<<<<<<
import javax.swing.*;
import java.awt.*;
=======
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.BorderLayout;
>>>>>>>
import javax.swing.*;
import java.awt.*;
<<<<<<<
queryPanel.setText( RestUtils.makeSuffixParameterString( getRequest() ) );
updating.setValue( false );
=======
queryPanel.updateTextField();
>>>>>>>
queryPanel.updateTextField();
updating.setValue( false );
<<<<<<<
TextPanelWithTopLabel( String label, String text, JTextField textField )
=======
TextPanelWithTopLabel( String label, String text )
>>>>>>>
TextPanelWithTopLabel( String label, String text, JTextField textField )
<<<<<<<
=======
>>>>>>> |
<<<<<<<
@When( "^selects the OAuth 2 Authorization Type$" )
public void clicksOnTheOAuth2AuthorizationType()
{
selectAuthorizationType( rootWindow, OAUTH_2_COMBOBOX_ITEM );
}
=======
>>>>>>> |
<<<<<<<
=======
import com.eviware.soapui.support.StringUtils;
import com.eviware.soapui.support.Tools;
>>>>>>>
import com.eviware.soapui.support.StringUtils; |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
public static final String WSS_FORM_LABEL = "WSS form";
>>>>>>>
public static final String WSS_FORM_LABEL = "WSS form";
<<<<<<<
request.setAuthType( CredentialsConfig.AuthType.O_AUTH_2.toString() );
oAuth2Form = new OAuth2Form( getProfileForName( selectedOption ), this );
cardPanel.add( oAuth2Form.getComponent(), OAUTH_2_FORM_LABEL );
showCard( OAUTH_2_FORM_LABEL );
=======
request.setAuthType( selectedOption );
if( isSoapRequest( request ) )
{
showCard( WSS_FORM_LABEL );
}
else
{
showCard( BASIC_FORM_LABEL );
}
>>>>>>>
request.setAuthType( selectedOption );
if( isSoapRequest( request ) )
{
showCard( WSS_FORM_LABEL );
}
else
{
showCard( BASIC_FORM_LABEL );
}
<<<<<<<
options.removeAll( request.getBasicAuthenticationProfiles() );
final JTextFieldFormField profileNameField = ( JTextFieldFormField )dialog.getFormField( AuthorizationTypeForm.OAUTH2_PROFILE_NAME_FIELD );
profileNameField.getComponent().setVisible( false );
profileNameField.addFormFieldListener( new XFormFieldListener()
{
@Override
public void valueChanged( XFormField sourceField, String newValue, String oldValue )
{
if( StringUtils.isNullOrEmpty( newValue ) )
{
//TODO: disable Ok button
}
}
} );
JComboBoxFormField accessTokenPositionField = ( JComboBoxFormField )dialog.getFormField( AuthorizationTypeForm.AUTHORIZATION_TYPE );
accessTokenPositionField.setOptions( options.toArray( new String[options.size()] ) );
accessTokenPositionField.addFormFieldListener( new XFormFieldListener()
{
@Override
public void valueChanged( XFormField sourceField, String newValue, String oldValue )
{
if( newValue.equals( CredentialsConfig.AuthType.O_AUTH_2.toString() ) )
{
profileNameField.getComponent().setVisible( true );
}
else
{
profileNameField.getComponent().setVisible( false );
}
}
} );
dialog.setValue( AuthorizationTypeForm.AUTHORIZATION_TYPE, request.getAuthType() );
if( dialog.show() )
=======
else if( getBasicAuthenticationTypes().contains( profileName ) )
>>>>>>>
else if( getBasicAuthenticationTypes().contains( profileName ) )
<<<<<<<
@AForm(name = "AuthorizationTypeForm.Title", description = "AuthorizationTypeForm.Description")
public interface AuthorizationTypeForm
{
public static final MessageSupport messages = MessageSupport.getMessages( ProfileSelectionForm.class );
@AField(description = "Form.AccessTokenPosition.Description", type = AField.AFieldType.COMBOBOX)
public final static String AUTHORIZATION_TYPE = messages.get( "Form.AccessTokenPosition.Label" );
@AField(description = "Form.OAuth2ProfileName.Description", type = AField.AFieldType.STRING)
public final static String OAUTH2_PROFILE_NAME_FIELD = messages.get( "Form.OAuth2ProfileName.Label" );
}
=======
>>>>>>> |
<<<<<<<
public void setSelectedAuthProfile( String authProfile )
{
String old = getSelectedAuthProfile();
CredentialsConfig credentialsConfig = getCredentialsConfig();
credentialsConfig.setSelectedAuthProfile( authProfile );
notifyPropertyChanged( SELECTED_AUTH_PROFILE_PROPERTY_NAME, old, authProfile );
}
public void setAuthType( String authType )
=======
public void setSelectedAuthProfileAndAuthType( String authProfile, String authType )
{
setSelectedAuthProfile( authProfile );
setAuthType( authType );
}
private void setSelectedAuthProfile( String authProfile )
{
String old = getSelectedAuthProfile();
CredentialsConfig credentialsConfig = getCredentialsConfig();
credentialsConfig.setSelectedAuthProfile( authProfile );
notifyPropertyChanged( "selectedAuthProfile", old, authProfile );
}
private void setAuthType( String authType )
>>>>>>>
public void setSelectedAuthProfileAndAuthType( String authProfile, String authType )
{
setSelectedAuthProfile( authProfile );
setAuthType( authType );
}
private void setSelectedAuthProfile( String authProfile )
{
String old = getSelectedAuthProfile();
CredentialsConfig credentialsConfig = getCredentialsConfig();
credentialsConfig.setSelectedAuthProfile( authProfile );
notifyPropertyChanged( SELECTED_AUTH_PROFILE_PROPERTY_NAME, old, authProfile );
}
private void setAuthType( String authType ) |
<<<<<<<
Tag testsuite = new Tag("testsuite");
Tag testcase;
static String hostname;
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
long startTime;
long testStartTime;
int tests = 0;
PrintWriter out;
boolean finished;
boolean progress;
Bundle bundle;
BasicTestReport basic;
=======
Tag testsuite = new Tag("testsuite");
Tag testcase;
static String hostname;
static DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
long startTime;
long testStartTime;
int tests = 0;
int failures = 0;
int errors = 0;
int skipped = 0;
PrintWriter out;
boolean finished;
boolean progress;
Bundle bundle;
BasicTestReport basic;
>>>>>>>
Tag testsuite = new Tag("testsuite");
Tag testcase;
static String hostname;
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
long startTime;
long testStartTime;
int tests = 0;
int failures = 0;
int errors = 0;
int skipped = 0;
PrintWriter out;
boolean finished;
boolean progress;
Bundle bundle;
BasicTestReport basic;
<<<<<<<
testcase.addAttribute("time", getFraction(System.currentTimeMillis() - testStartTime, 1000));
tests++;
=======
testcase
.addAttribute("time", getFraction(System.currentTimeMillis() - testStartTime, 1000));
tests++;
>>>>>>>
testcase.addAttribute("time", getFraction(System.currentTimeMillis() - testStartTime, 1000));
tests++;
tests++; |
<<<<<<<
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.api.data.type.HandTypes;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.item.ItemType;
import org.spongepowered.api.item.inventory.ItemStack;
=======
import org.spongepowered.api.Sponge;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.entity.living.player.User;
import org.spongepowered.api.service.permission.Subject;
import org.spongepowered.api.service.permission.option.OptionSubjectData;
import org.spongepowered.api.service.user.UserStorageService;
>>>>>>>
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.type.HandTypes;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.entity.living.player.User;
import org.spongepowered.api.item.ItemType;
import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.service.permission.Subject;
import org.spongepowered.api.service.user.UserStorageService;
<<<<<<<
public static RayTraceResult rayTracePlayerEyes(EntityPlayerMP player) {
double distance = SpongeImplHooks.getBlockReachDistance(player) + 1;
Vec3d startPos = new Vec3d(player.posX, player.posY + player.getEyeHeight(), player.posZ);
Vec3d endPos = startPos.add(new Vec3d(player.getLookVec().xCoord * distance, player.getLookVec().yCoord * distance, player.getLookVec().zCoord * distance));
return player.worldObj.rayTraceBlocks(startPos, endPos);
}
public static Vec3d rayTracePlayerEyeHitVec(EntityPlayerMP player) {
RayTraceResult result = rayTracePlayerEyes(player);
return result == null ? null : result.hitVec;
}
=======
public static int getOptionIntValue(Subject subject, String key, int defaultValue) {
final OptionSubjectData subjectData = ((OptionSubjectData) subject.getSubjectData());
String optionValue = subjectData.getOptions(new HashSet<>()).get(key);
if (optionValue != null) {
try {
return Integer.parseInt(optionValue);
} catch (NumberFormatException e) {
return defaultValue;
}
}
// Set default option
((OptionSubjectData) GriefPrevention.GLOBAL_SUBJECT.getTransientSubjectData()).setOption(new HashSet<>(), key, String.valueOf(defaultValue));
return defaultValue;
}
public static double getOptionDoubleValue(Subject subject, String key, double defaultValue) {
final OptionSubjectData subjectData = ((OptionSubjectData) subject.getSubjectData());
String optionValue = subjectData.getOptions(new HashSet<>()).get(key);
if (optionValue != null) {
try {
return Double.parseDouble(optionValue);
} catch (NumberFormatException e) {
return defaultValue;
}
}
// Set default option
((OptionSubjectData) GriefPrevention.GLOBAL_SUBJECT.getTransientSubjectData()).setOption(new HashSet<>(), key, String.valueOf(defaultValue));
return defaultValue;
}
public static Optional<User> resolvePlayerByName(String name) {
// try online players first
Optional<Player> targetPlayer = Sponge.getGame().getServer().getPlayer(name);
if (targetPlayer.isPresent()) {
return Optional.of((User) targetPlayer.get());
}
Optional<User> user = Sponge.getGame().getServiceManager().provide(UserStorageService.class).get().get(name);
if (user.isPresent()) {
return user;
}
return Optional.empty();
}
// string overload for above helper
public static String lookupPlayerName(String uuid) {
if (uuid.equals(GriefPrevention.WORLD_USER_UUID.toString())) {
return "administrator";
}
Optional<User> user = Sponge.getGame().getServiceManager().provide(UserStorageService.class).get().get(UUID.fromString(uuid));
if (!user.isPresent()) {
GriefPrevention.addLogEntry("Error: Tried to look up a local player name for invalid UUID: " + uuid);
return "someone";
}
return user.get().getName();
}
>>>>>>>
public static RayTraceResult rayTracePlayerEyes(EntityPlayerMP player) {
double distance = SpongeImplHooks.getBlockReachDistance(player) + 1;
Vec3d startPos = new Vec3d(player.posX, player.posY + player.getEyeHeight(), player.posZ);
Vec3d endPos = startPos.add(new Vec3d(player.getLookVec().xCoord * distance, player.getLookVec().yCoord * distance, player.getLookVec().zCoord * distance));
return player.worldObj.rayTraceBlocks(startPos, endPos);
}
public static Vec3d rayTracePlayerEyeHitVec(EntityPlayerMP player) {
RayTraceResult result = rayTracePlayerEyes(player);
return result == null ? null : result.hitVec;
}
public static int getOptionIntValue(Subject subject, String key, int defaultValue) {
String optionValue = subject.getOption(key).orElse(null);
if (optionValue != null) {
try {
return Integer.parseInt(optionValue);
} catch (NumberFormatException e) {
return defaultValue;
}
}
// Set default option
GriefPrevention.GLOBAL_SUBJECT.getTransientSubjectData().setOption(new HashSet<>(), key, String.valueOf(defaultValue));
return defaultValue;
}
public static double getOptionDoubleValue(Subject subject, String key, double defaultValue) {
String optionValue = subject.getOption(key).orElse(null);
if (optionValue != null) {
try {
return Double.parseDouble(optionValue);
} catch (NumberFormatException e) {
return defaultValue;
}
}
// Set default option
GriefPrevention.GLOBAL_SUBJECT.getTransientSubjectData().setOption(new HashSet<>(), key, String.valueOf(defaultValue));
return defaultValue;
}
public static Optional<User> resolvePlayerByName(String name) {
// try online players first
Optional<Player> targetPlayer = Sponge.getGame().getServer().getPlayer(name);
if (targetPlayer.isPresent()) {
return Optional.of((User) targetPlayer.get());
}
Optional<User> user = Sponge.getGame().getServiceManager().provide(UserStorageService.class).get().get(name);
if (user.isPresent()) {
return user;
}
return Optional.empty();
}
// string overload for above helper
public static String lookupPlayerName(String uuid) {
if (uuid.equals(GriefPrevention.WORLD_USER_UUID.toString())) {
return "administrator";
}
Optional<User> user = Sponge.getGame().getServiceManager().provide(UserStorageService.class).get().get(UUID.fromString(uuid));
if (!user.isPresent()) {
GriefPrevention.addLogEntry("Error: Tried to look up a local player name for invalid UUID: " + uuid);
return "someone";
}
return user.get().getName();
} |
<<<<<<<
List<Claim> claimsInChunk = claimWorldManager.getChunksToClaimsMap().get(ChunkPos.chunkXZ2Int(location.getBlockX() >> 4, location.getBlockZ() >> 4));
=======
Set<Claim> claimsInChunk = claimWorldManager.getChunksToClaimsMap().get(ChunkCoordIntPair.chunkXZ2Int(location.getBlockX() >> 4, location.getBlockZ() >> 4));
>>>>>>>
Set<Claim> claimsInChunk = claimWorldManager.getChunksToClaimsMap().get(ChunkPos.chunkXZ2Int(location.getBlockX() >> 4, location.getBlockZ() >> 4));
<<<<<<<
List<Claim> claimsInChunk = claimWorldManager.getChunksToClaimsMap().get(ChunkPos.chunkXZ2Int(chunkX, chunkZ));
=======
Set<Claim> claimsInChunk = claimWorldManager.getChunksToClaimsMap().get(ChunkCoordIntPair.chunkXZ2Int(chunkX, chunkZ));
>>>>>>>
Set<Claim> claimsInChunk = claimWorldManager.getChunksToClaimsMap().get(ChunkPos.chunkXZ2Int(chunkX, chunkZ)); |
<<<<<<<
public static final String CONFIG_HEADER = "3.0.0\n"
=======
@Inject @ConfigDir(sharedRoot = false)
private Path configPath;
public static final String CONFIG_HEADER = "2.2.0\n"
>>>>>>>
@Inject @ConfigDir(sharedRoot = false)
private Path configPath;
public static final String CONFIG_HEADER = "3.0.0\n" |
<<<<<<<
public void onPlayerDispenseItem(DropItemEvent.Dispense event, @Root Entity spawncause) {
=======
public void onPlayerDispenseItem(DropItemEvent.Dispense event, @Root EntitySpawnCause spawncause) {
if (!GPFlags.ITEM_DROP) {
return;
}
>>>>>>>
public void onPlayerDispenseItem(DropItemEvent.Dispense event, @Root Entity spawncause) {
if (!GPFlags.ITEM_DROP) {
return;
}
<<<<<<<
final Cause cause = event.getCause();
final EventContext context = cause.getContext();
final BlockSnapshot blockSnapshot = context.get(EventContextKeys.BLOCK_HIT).orElse(BlockSnapshot.NONE);
=======
GPTimings.PLAYER_INTERACT_INVENTORY_OPEN_EVENT.startTimingIfSync();
final BlockSnapshot blockSnapshot = event.getCause().get(NamedCause.HIT_TARGET, BlockSnapshot.class).orElse(BlockSnapshot.NONE);
>>>>>>>
GPTimings.PLAYER_INTERACT_INVENTORY_OPEN_EVENT.startTimingIfSync();
final Cause cause = event.getCause();
final EventContext context = cause.getContext();
final BlockSnapshot blockSnapshot = context.get(EventContextKeys.BLOCK_HIT).orElse(BlockSnapshot.NONE); |
<<<<<<<
=======
import org.spongepowered.api.plugin.PluginContainer;
import org.spongepowered.api.service.permission.option.OptionSubjectData;
>>>>>>>
import org.spongepowered.api.plugin.PluginContainer; |
<<<<<<<
GPPlayerData playerData = GriefPreventionPlugin.instance.dataStore.getPlayerData(event.getLocations().get(0).getExtent(), user.getUniqueId());
=======
GPPlayerData playerData = GriefPreventionPlugin.instance.dataStore.getPlayerData(event.getTargetWorld(), user.getUniqueId());
GPClaim targetClaim = null;
>>>>>>>
GPPlayerData playerData = GriefPreventionPlugin.instance.dataStore.getPlayerData(event.getLocations().get(0).getExtent(), user.getUniqueId());
GPClaim targetClaim = null;
<<<<<<<
GPClaim claim = GriefPreventionPlugin.instance.dataStore.getClaimAt(blockSnapshot.getLocation().get(), false, null);
if (GPPermissionHandler.getClaimPermission(claim, GPPermissions.EXPLOSION_SURFACE, source, blockSnapshot.getLocation(), creator, true) == Tristate.FALSE && location.getPosition().getY() > ((net.minecraft.world.World) world).getSeaLevel()) {
=======
targetClaim = GriefPreventionPlugin.instance.dataStore.getClaimAt(blockSnapshot.getLocation().get(), false, targetClaim);
if (location.getPosition().getY() > ((net.minecraft.world.World) event.getTargetWorld()).getSeaLevel() && GPPermissionHandler.getClaimPermission(event, location, targetClaim, GPPermissions.EXPLOSION_SURFACE, source, blockSnapshot.getLocation(), creator, true) == Tristate.FALSE) {
>>>>>>>
targetClaim = GriefPreventionPlugin.instance.dataStore.getClaimAt(blockSnapshot.getLocation().get(), false, targetClaim);
if (location.getPosition().getY() > ((net.minecraft.world.World) world).getSeaLevel() && GPPermissionHandler.getClaimPermission(event, location, targetClaim, GPPermissions.EXPLOSION_SURFACE, source, blockSnapshot.getLocation(), creator, true) == Tristate.FALSE) {
<<<<<<<
if (player != null) {
GriefPreventionPlugin.sendClaimDenyMessage(targetClaim, player, TextMode.Err, Messages.NoBuildPermission, "administrator");
}
GriefPreventionPlugin.addEventLogEntry(event, targetClaim, location, source, block, user, null);
GPTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return;
}
if (user == null && sourceClaim != null && sourceClaim.getOwnerUniqueId().equals(targetClaim.getOwnerUniqueId())) {
GPTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return;
}
String denyReason = GriefPreventionPlugin.instance.allowBuild(source, location, user);
if (denyReason != null) {
if (source instanceof PortalTeleportCause) {
if (targetClaim != null && player != null) {
// cancel and inform about the reason
GriefPreventionPlugin.addEventLogEntry(event, targetClaim, location, source, block, user, denyReason);
event.setCancelled(true);
GriefPreventionPlugin.sendClaimDenyMessage(targetClaim, player, TextMode.Err, Messages.NoBuildPortalPermission, targetClaim.getOwnerName());
GPTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return;
}
}
if (source instanceof Player) {
GriefPreventionPlugin.sendClaimDenyMessage(targetClaim, player, TextMode.Err, denyReason);
}
GriefPreventionPlugin.addEventLogEntry(event, targetClaim, location, source, block, user, denyReason);
event.setCancelled(true);
=======
>>>>>>> |
<<<<<<<
if (context.containsKey(EventContextKeys.FIRE_SPREAD)) {
=======
if (GPFlags.FIRE_SPREAD && event.getCause().containsNamed(NamedCause.FIRE_SPREAD)) {
>>>>>>>
if (GPFlags.FIRE_SPREAD && context.containsKey(EventContextKeys.FIRE_SPREAD)) {
<<<<<<<
GPTimings.EXPLOSION_EVENT.startTimingIfSync();
final World world = event.getExplosion().getWorld();
if (!GriefPreventionPlugin.instance.claimsEnabledForWorld(world.getProperties())) {
GPTimings.EXPLOSION_EVENT.stopTimingIfSync();
=======
if (!GPFlags.EXPLOSION || !GriefPreventionPlugin.instance.claimsEnabledForWorld(event.getTargetWorld().getProperties())) {
>>>>>>>
final World world = event.getExplosion().getWorld();
if (!GPFlags.EXPLOSION || !GriefPreventionPlugin.instance.claimsEnabledForWorld(world.getProperties())) {
<<<<<<<
if (location.getPosition().getY() > ((net.minecraft.world.World) world).getSeaLevel() && GPPermissionHandler.getClaimPermission(event, location, targetClaim, GPPermissions.EXPLOSION_SURFACE, source, blockSnapshot, user, true) == Tristate.FALSE) {
=======
if (GPFlags.EXPLOSION_SURFACE && location.getPosition().getY() > ((net.minecraft.world.World) event.getTargetWorld()).getSeaLevel() && GPPermissionHandler.getClaimPermission(event, location, targetClaim, GPPermissions.EXPLOSION_SURFACE, source, blockSnapshot, creator, true) == Tristate.FALSE) {
>>>>>>>
if (GPFlags.EXPLOSION_SURFACE && location.getPosition().getY() > ((net.minecraft.world.World) world).getSeaLevel() && GPPermissionHandler.getClaimPermission(event, location, targetClaim, GPPermissions.EXPLOSION_SURFACE, source, blockSnapshot, user, true) == Tristate.FALSE) {
<<<<<<<
final World world = event.getTransactions().get(0).getFinal().getLocation().get().getExtent();
if (!GriefPreventionPlugin.instance.claimsEnabledForWorld(world.getProperties())) {
GPTimings.BLOCK_BREAK_EVENT.stopTimingIfSync();
=======
if (!GriefPreventionPlugin.instance.claimsEnabledForWorld(event.getTargetWorld().getProperties())) {
>>>>>>>
final World world = event.getTransactions().get(0).getFinal().getLocation().get().getExtent();
if (!GriefPreventionPlugin.instance.claimsEnabledForWorld(world.getProperties())) {
<<<<<<<
public void onSignChanged(ChangeSignEvent event) {
final User user = CauseContextHelper.getEventUser(event);
if (user == null) {
return;
}
GPTimings.SIGN_CHANGE_EVENT.startTimingIfSync();
=======
public void onSignChanged(ChangeSignEvent event, @First User user) {
>>>>>>>
public void onSignChanged(ChangeSignEvent event) {
final User user = CauseContextHelper.getEventUser(event);
if (user == null) {
return;
} |
<<<<<<<
import serializers.flatbuffers.FlatBuffers;
=======
import serializers.colfer.Colfer;
>>>>>>>
import serializers.colfer.Colfer;
import serializers.flatbuffers.FlatBuffers;
<<<<<<<
DSLPlatform.register(groups);
FlatBuffers.register(groups);
CapNProto.register(groups);
=======
DSLPlatform.register(groups);
Colfer.register(groups);
>>>>>>>
DSLPlatform.register(groups);
FlatBuffers.register(groups);
CapNProto.register(groups);
Colfer.register(groups); |
<<<<<<<
=======
import java.util.Optional;
>>>>>>>
import java.util.Optional;
<<<<<<<
private void initJavaSubtitle() {
VersionSetting versionSetting = lastVersionSetting;
if (versionSetting == null)
return;
Task.of(variables -> variables.set("java", versionSetting.getJavaVersion()))
.subscribe(Task.of(Schedulers.javafx(),
variables -> javaItem.setSubtitle(variables.<JavaVersion>getOptional("java")
.map(JavaVersion::getBinary).map(Path::toString).orElse("Invalid Java Path"))));
=======
private void initJavaSubtitle(VersionSetting versionSetting) {
Task.ofResult(versionSetting::getJavaVersion)
.thenVoid(Schedulers.javafx(), javaVersion -> javaItem.setSubtitle(Optional.ofNullable(javaVersion)
.map(JavaVersion::getBinary).map(Path::toString).orElse("Invalid Java Directory")))
.start();
>>>>>>>
private void initJavaSubtitle() {
VersionSetting versionSetting = lastVersionSetting;
if (versionSetting == null)
return;
Task.ofResult(versionSetting::getJavaVersion)
.thenVoid(Schedulers.javafx(), javaVersion -> javaItem.setSubtitle(Optional.ofNullable(javaVersion)
.map(JavaVersion::getBinary).map(Path::toString).orElse("Invalid Java Path")))
.start(); |
<<<<<<<
register(MnBlocks.ARCHAIC_ORE, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
register(MnBlocks.ARCHAIC_GLASS, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
//TODO need to make multipart things code
//register(MnBlocks.ARCHAIC_GLASS_PANE, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
=======
register(MnBlocks.TENEBRUM_ORE, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
register(MnBlocks.TENEBRUM_BLOCK, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
>>>>>>>
register(MnBlocks.ARCHAIC_ORE, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
register(MnBlocks.ARCHAIC_GLASS, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
//TODO need to make multipart things code
//register(MnBlocks.ARCHAIC_GLASS_PANE, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
register(MnBlocks.TENEBRUM_ORE, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s"))));
register(MnBlocks.TENEBRUM_BLOCK, block -> simple(name(block, "block/%s"), cubeAll(name(block, "block/%s")))); |
<<<<<<<
=======
import com.github.gwtd3.demo.client.democases.behaviors.ZoomDemo;
import com.github.gwtd3.demo.client.democases.charts.AxisDemo;
import com.github.gwtd3.demo.client.democases.charts.LineChartDemo;
>>>>>>>
import com.github.gwtd3.demo.client.democases.behaviors.ZoomDemo;
<<<<<<<
public static final String DEMO_CONTAINER_ID = "demoContainer";
private ComplexPanel demoContainer;
private DemoCase currentDemo;
private TestSessionContainer testContainer;
/**
* This is the entry point method.
*/
@Override
public void onModuleLoad() {
DebugInfo.setDebugIdPrefix("");
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(final Throwable e) {
GWT.log("Uncaught error", e);
Window.alert("Error. Go to see the logs");
}
});
DockLayoutPanel container = new DockLayoutPanel(Unit.PX);
container.setSize("100%", "100%");
container.addNorth(new Label("GWT-D3 : A thin GWT wrapper around D3.", false), 20);
container.addNorth(new Label("D3 API version: " + D3.version(), false), 20);
FlowPanel p = new FlowPanel();
ComplexPanel buttonContainer = new VerticalPanel();
buttonContainer.add(new TestButton());
//buttonContainer.add(new DemoButton("Arc", ArcDemo.factory()));
buttonContainer.add(new DemoButton("Stupid example", StupidExample.factory()));
buttonContainer.add(new DemoButton("Stupid example 2", StupidExample2.factory()));
buttonContainer.add(new DemoButton("General Update Pattern I", GeneralUpdatePattern1.factory()));
buttonContainer.add(new DemoButton("General Update Pattern II", GeneralUpdatePattern2.factory()));
buttonContainer.add(new DemoButton("General Update Pattern III", GeneralUpdatePattern3.factory()));
buttonContainer.add(new DemoButton("Arc Tween", ArcTween.factory()));
buttonContainer.add(new DemoButton("Axis component", AxisComponent.factory()));
buttonContainer.add(new DemoButton("Focus and context", FocusAndContext.factory()));
buttonContainer.add(new DemoButton("Bar chart", BarChart.factory()));
buttonContainer.add(new DemoButton("Chord diagram", ChordDiagram.factory()));
buttonContainer.add(new DemoButton("Lorenz System", LorenzSystem.factory()));
buttonContainer.add(new DemoButton("Drag Multiples", DragMultiples.factory()));
p.add(buttonContainer);
container.addWest(p, 200);
demoContainer = new FlowPanel();
demoContainer.ensureDebugId(D3Demo.DEMO_CONTAINER_ID);
demoContainer.setSize("100%", "100%");
container.add(demoContainer);
RootLayoutPanel.get().add(container);
container.forceLayout();
}
public class DemoButton extends Button {
public DemoButton(final String title, final Factory demoClass) {
super(title, new DemoClickHandler(demoClass));
ensureDebugId(demoClass.id());
}
}
public class DemoClickHandler implements ClickHandler {
private final Factory demoClass;
public DemoClickHandler(final Factory demoClass) {
super();
this.demoClass = demoClass;
}
/*
* (non-Javadoc)
*
* @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt .event.dom.client.ClickEvent)
*/
@Override
public void onClick(final ClickEvent event) {
stopCurrentDemo();
DemoCase demo = demoClass.newInstance();
demoContainer.add(demo);
currentDemo = demo;
demo.start();
}
}
public class TestButton extends Button {
public static final String ID = "testSuiteButton";
public TestButton() {
super("Test Suite", new ClickHandler() {
private boolean firstTime = true;
private TestRunner runner;
@Override
public void onClick(final ClickEvent event) {
stopCurrentDemo();
if (firstTime) {
testContainer = new TestSessionContainer();
runner = new TestRunner(testContainer);
runner.setTests(D3TestSuite.get().getTests());
firstTime = false;
}
demoContainer.add(testContainer);
}
});
ensureDebugId(TestButton.ID);
}
}
private void stopCurrentDemo() {
if (currentDemo != null) {
currentDemo.stop();
demoContainer.remove(currentDemo);
currentDemo = null;
} else if ((testContainer != null) && testContainer.getParent().equals(demoContainer)) {
demoContainer.remove(testContainer);
}
}
=======
public static final String DEMO_CONTAINER_ID = "demoContainer";
private ComplexPanel demoContainer;
private DemoCase currentDemo;
private TestSessionContainer testContainer;
/**
* This is the entry point method.
*/
@Override
public void onModuleLoad() {
DebugInfo.setDebugIdPrefix("");
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(final Throwable e) {
GWT.log("Uncaught error", e);
Window.alert("Error. Go to see the logs");
}
});
DockLayoutPanel container = new DockLayoutPanel(Unit.PX);
container.setSize("100%", "100%");
container.addNorth(new Label("GWT-D3 : A thin GWT wrapper around D3.", false), 20);
container.addNorth(new Label("D3 API version: " + D3.version(), false), 20);
FlowPanel p = new FlowPanel();
ComplexPanel buttonContainer = new VerticalPanel();
buttonContainer.add(new TestButton());
buttonContainer.add(new DemoButton("Arc", ArcDemo.factory()));
buttonContainer.add(new DemoButton("Stupid example", StupidExample.factory()));
buttonContainer.add(new DemoButton("Stupid example 2", StupidExample2.factory()));
buttonContainer.add(new DemoButton("General Update Pattern I", GeneralUpdatePattern1.factory()));
buttonContainer.add(new DemoButton("General Update Pattern II", GeneralUpdatePattern2.factory()));
buttonContainer.add(new DemoButton("General Update Pattern III", GeneralUpdatePattern3.factory()));
buttonContainer.add(new DemoButton("Arc Tween", ArcTween.factory()));
buttonContainer.add(new DemoButton("Axis component", AxisComponent.factory()));
buttonContainer.add(new DemoButton("Focus and context", FocusAndContext.factory()));
buttonContainer.add(new DemoButton("Bar chart", BarChart.factory()));
buttonContainer.add(new DemoButton("Chord diagram", ChordDiagram.factory()));
buttonContainer.add(new DemoButton("Drag Multiples", DragMultiples.factory()));
buttonContainer.add(new DemoButton("Axis Demo", AxisDemo.factory()));
buttonContainer.add(new DemoButton("Line Chart", LineChartDemo.factory()));
buttonContainer.add(new DemoButton("Zoom", ZoomDemo.factory()));
p.add(buttonContainer);
container.addWest(p, 200);
demoContainer = new FlowPanel();
demoContainer.ensureDebugId(D3Demo.DEMO_CONTAINER_ID);
demoContainer.setSize("100%", "100%");
container.add(demoContainer);
RootLayoutPanel.get().add(container);
container.forceLayout();
}
public class DemoButton extends Button {
public DemoButton(final String title, final Factory demoClass) {
super(title, new DemoClickHandler(demoClass));
ensureDebugId(demoClass.id());
}
}
public class DemoClickHandler implements ClickHandler {
private final Factory demoClass;
public DemoClickHandler(final Factory demoClass) {
super();
this.demoClass = demoClass;
}
/*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt
* .event.dom.client.ClickEvent)
*/
@Override
public void onClick(final ClickEvent event) {
stopCurrentDemo();
DemoCase demo = demoClass.newInstance();
demoContainer.add(demo);
currentDemo = demo;
demo.start();
}
}
public class TestButton extends Button {
public static final String ID = "testSuiteButton";
public TestButton() {
super("Test Suite", new ClickHandler() {
private boolean firstTime = true;
private TestRunner runner;
@Override
public void onClick(final ClickEvent event) {
stopCurrentDemo();
if (firstTime) {
testContainer = new TestSessionContainer();
runner = new TestRunner(testContainer);
runner.setTests(D3TestSuite.get().getTests());
firstTime = false;
}
demoContainer.add(testContainer);
}
});
ensureDebugId(TestButton.ID);
}
}
private void stopCurrentDemo() {
if (currentDemo != null) {
currentDemo.stop();
demoContainer.remove(currentDemo);
currentDemo = null;
} else if ((testContainer != null) && testContainer.getParent().equals(demoContainer)) {
demoContainer.remove(testContainer);
}
}
>>>>>>>
public static final String DEMO_CONTAINER_ID = "demoContainer";
private ComplexPanel demoContainer;
private DemoCase currentDemo;
private TestSessionContainer testContainer;
/**
* This is the entry point method.
*/
@Override
public void onModuleLoad() {
DebugInfo.setDebugIdPrefix("");
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(final Throwable e) {
GWT.log("Uncaught error", e);
Window.alert("Error. Go to see the logs");
}
});
DockLayoutPanel container = new DockLayoutPanel(Unit.PX);
container.setSize("100%", "100%");
container.addNorth(new Label("GWT-D3 : A thin GWT wrapper around D3.",
false), 20);
container.addNorth(new Label("D3 API version: " + D3.version(), false),
20);
FlowPanel p = new FlowPanel();
ComplexPanel buttonContainer = new VerticalPanel();
buttonContainer.add(new TestButton());
// buttonContainer.add(new DemoButton("Arc", ArcDemo.factory()));
buttonContainer.add(new DemoButton("Stupid example", StupidExample
.factory()));
buttonContainer.add(new DemoButton("Stupid example 2", StupidExample2
.factory()));
buttonContainer.add(new DemoButton("General Update Pattern I",
GeneralUpdatePattern1.factory()));
buttonContainer.add(new DemoButton("General Update Pattern II",
GeneralUpdatePattern2.factory()));
buttonContainer.add(new DemoButton("General Update Pattern III",
GeneralUpdatePattern3.factory()));
buttonContainer.add(new DemoButton("Arc Tween", ArcTween.factory()));
buttonContainer.add(new DemoButton("Axis component", AxisComponent
.factory()));
buttonContainer.add(new DemoButton("Focus and context", FocusAndContext
.factory()));
buttonContainer.add(new DemoButton("Bar chart", BarChart.factory()));
buttonContainer.add(new DemoButton("Chord diagram", ChordDiagram
.factory()));
buttonContainer.add(new DemoButton("Lorenz System", LorenzSystem
.factory()));
buttonContainer.add(new DemoButton("Drag Multiples", DragMultiples
.factory()));
buttonContainer.add(new DemoButton("Zoom", ZoomDemo.factory()));
p.add(buttonContainer);
container.addWest(p, 200);
demoContainer = new FlowPanel();
demoContainer.ensureDebugId(D3Demo.DEMO_CONTAINER_ID);
demoContainer.setSize("100%", "100%");
container.add(demoContainer);
RootLayoutPanel.get().add(container);
container.forceLayout();
}
public class DemoButton extends Button {
public DemoButton(final String title, final Factory demoClass) {
super(title, new DemoClickHandler(demoClass));
ensureDebugId(demoClass.id());
}
}
public class DemoClickHandler implements ClickHandler {
private final Factory demoClass;
public DemoClickHandler(final Factory demoClass) {
super();
this.demoClass = demoClass;
}
/*
* (non-Javadoc)
*
* @see
* com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt
* .event.dom.client.ClickEvent)
*/
@Override
public void onClick(final ClickEvent event) {
stopCurrentDemo();
DemoCase demo = demoClass.newInstance();
demoContainer.add(demo);
currentDemo = demo;
demo.start();
}
}
public class TestButton extends Button {
public static final String ID = "testSuiteButton";
public TestButton() {
super("Test Suite", new ClickHandler() {
private boolean firstTime = true;
private TestRunner runner;
@Override
public void onClick(final ClickEvent event) {
stopCurrentDemo();
if (firstTime) {
testContainer = new TestSessionContainer();
runner = new TestRunner(testContainer);
runner.setTests(D3TestSuite.get().getTests());
firstTime = false;
}
demoContainer.add(testContainer);
}
});
ensureDebugId(TestButton.ID);
}
}
private void stopCurrentDemo() {
if (currentDemo != null) {
currentDemo.stop();
demoContainer.remove(currentDemo);
currentDemo = null;
} else if ((testContainer != null)
&& testContainer.getParent().equals(demoContainer)) {
demoContainer.remove(testContainer);
}
} |
<<<<<<<
import org.apache.olingo.jpa.processor.core.filter.JPAFilterElementComplier;
import org.apache.olingo.jpa.processor.core.filter.JPAFilterExpression;
import org.apache.olingo.jpa.processor.core.filter.JPAMemberOperator;
=======
import org.apache.olingo.server.api.OData;
>>>>>>>
import org.apache.olingo.jpa.processor.core.filter.JPAFilterElementComplier;
import org.apache.olingo.jpa.processor.core.filter.JPAFilterExpression;
import org.apache.olingo.jpa.processor.core.filter.JPAMemberOperator;
import org.apache.olingo.server.api.OData;
<<<<<<<
super(sd, (EdmEntityType) ((UriResourcePartTyped) uriResourceItem).getType(), em);
this.keyPredicates = Util.determineKeyPredicates(uriResourceItem);
=======
super(odata, sd, (EdmEntityType) ((UriResourcePartTyped) uriResourceItem).getType(), em);
this.keyPredicates = determineKeyPredicates(uriResourceItem);
>>>>>>>
super(odata, sd, (EdmEntityType) ((UriResourcePartTyped) uriResourceItem).getType(), em);
this.keyPredicates = Util.determineKeyPredicates(uriResourceItem); |
<<<<<<<
// If the background is very bright, we should use dark icons
backgroundNeedsDarkIcons = (ColorUtils.calculateLuminance(backgroundHeaderColor) > LUMINANCE_MIDPOINT);
ActionBar actionBar = getSupportActionBar();
if(actionBar != null)
{
actionBar.setHomeAsUpIndicator(getIcon(R.drawable.ic_arrow_back_white, backgroundNeedsDarkIcons));
}
if(barcodeImage.getHeight() == 0)
=======
if(format != null)
>>>>>>>
// If the background is very bright, we should use dark icons
backgroundNeedsDarkIcons = (ColorUtils.calculateLuminance(backgroundHeaderColor) > LUMINANCE_MIDPOINT);
ActionBar actionBar = getSupportActionBar();
if(actionBar != null)
{
actionBar.setHomeAsUpIndicator(getIcon(R.drawable.ic_arrow_back_white, backgroundNeedsDarkIcons));
}
if(format != null) |
<<<<<<<
import android.app.Fragment;
import android.app.FragmentManager;
import android.support.v13.app.FragmentStatePagerAdapter;
=======
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.view.ViewGroup;
>>>>>>>
import android.support.v13.app.FragmentStatePagerAdapter;
import android.app.Fragment;
import android.app.FragmentManager;
import android.support.v4.view.PagerAdapter;
import android.view.ViewGroup;
<<<<<<<
return FragmentStatePagerAdapter.POSITION_NONE;
=======
final Integer rowId = mObjectRowMap.get(object);
if (rowId == null) {
return PagerAdapter.POSITION_NONE;
} else {
return rowId;
}
>>>>>>>
final Integer rowId = mObjectRowMap.get(object);
if (rowId == null) {
return PagerAdapter.POSITION_NONE;
} else {
return rowId;
} |
<<<<<<<
return new StringMetricBuilder().with(new BlockDistance<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new BlockDistance<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new BlockDistance<String>())
.tokenize(new WhitespaceTokenizer()).build();
<<<<<<<
return new StringMetricBuilder().with(new CosineSimilarity<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new CosineSimilarity<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new CosineSimilarity<String>())
.tokenize(new WhitespaceTokenizer()).build();
<<<<<<<
return new StringMetricBuilder().with(new DiceSimilarity<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new DiceSimilarity<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new DiceSimilarity<String>())
.tokenize(new WhitespaceTokenizer()).build();
<<<<<<<
return new StringMetricBuilder().with(new EuclideanDistance<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new EuclideanDistance<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new EuclideanDistance<String>())
.tokenize(new WhitespaceTokenizer()).build();
<<<<<<<
return new StringMetricBuilder().with(new JaccardSimilarity<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new JaccardSimilarity<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new JaccardSimilarity<String>())
.tokenize(new WhitespaceTokenizer()).build();
<<<<<<<
return new StringMetricBuilder()
.with(new MatchingCoefficient<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new MatchingCoefficient<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new MatchingCoefficient<String>())
.tokenize(new WhitespaceTokenizer())
.build();
<<<<<<<
return new StringMetricBuilder()
.with(new MongeElkan(new SmithWatermanGotoh()))
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(
new MongeElkan(new SmithWatermanGotoh()))
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(
new MongeElkan(new SmithWatermanGotoh()))
.tokenize(new WhitespaceTokenizer())
.build();
<<<<<<<
return new StringMetricBuilder().with(new OverlapCoefficient<String>())
.tokenize(new WhitespaceTokenizer()).build();
=======
return with(new OverlapCoefficient<String>())
.tokenize(new WhitespaceTokenizer())
.build();
>>>>>>>
return with(new OverlapCoefficient<String>())
.tokenize(new WhitespaceTokenizer()).build();
<<<<<<<
return new StringMetricBuilder().with(new BlockDistance<String>())
.tokenize(new QGramExtendedTokenizer(3)).build();
=======
return with(new BlockDistance<String>())
.tokenize(new QGramExtendedTokenizer(3))
.build();
>>>>>>>
return with(new BlockDistance<String>())
.tokenize(new QGramExtendedTokenizer(3)).build();
<<<<<<<
return new StringMetricBuilder().with(new JaroWinkler())
.simplify(new SoundexSimplifier()).build();
=======
return with(new JaroWinkler())
.simplify(new SoundexSimplifier())
.build();
>>>>>>>
return with(new JaroWinkler())
.simplify(new SoundexSimplifier()).build(); |
<<<<<<<
panel.add(getEnabledForDesktop(), LayoutHelper.getGBC(0, ++i, 2, 1.0));
panel.add(getEnabledForDaemon(), LayoutHelper.getGBC(0, ++i, 2, 1.0));
=======
panel.add(directoryLabel, LayoutHelper.getGBC(0, i, 1, 1.0, new Insets(2, 2, 2, 2)));
panel.add(overridesPanel, LayoutHelper.getGBC(1, i, 1, 1.0, new Insets(2, 2, 2, 2)));
panel.add(getShowWelcomeScreen(), LayoutHelper.getGBC(0, ++i, 2, 1.0));
>>>>>>>
panel.add(getEnabledForDesktop(), LayoutHelper.getGBC(0, ++i, 2, 1.0));
panel.add(getEnabledForDaemon(), LayoutHelper.getGBC(0, ++i, 2, 1.0));
panel.add(getShowWelcomeScreen(), LayoutHelper.getGBC(0, ++i, 2, 1.0)); |
<<<<<<<
@Test
public void testFname() {
final String expectKey = "世/界";
File f = null;
try {
f = TempFile.createFile(1);
} catch (IOException e) {
e.printStackTrace();
}
assert f != null;
final String returnBody = "{\"key\":\"$(key)\",\"hash\":\"$(etag)\",\"fsize\":\"$(fsize)\""
+ ",\"fname\":\"$(fname)\",\"mimeType\":\"$(mimeType)\"}";
String token = TestConfig.testAuth.uploadToken(TestConfig.bucket, expectKey, 3600,
new StringMap().put("returnBody", returnBody));
try {
Response res = uploadManager.put(f, expectKey, token, null, null, true);
MyRet ret = res.jsonToObject(MyRet.class);
assertEquals(f.getName(), ret.fname);
} catch (QiniuException e) {
TempFile.remove(f);
fail();
}
TempFile.remove(f);
}
class MyRet {
public String hash;
public String key;
public String fsize;
public String fname;
public String mimeType;
}
=======
@Test
public void testSizeMin() {
final String expectKey = "世/界";
File f = null;
try {
f = TempFile.createFile(1);
} catch (IOException e) {
e.printStackTrace();
}
assert f != null;
StringMap params = new StringMap().put("x:foo", "foo_val");
String token = TestConfig.testAuth.uploadToken(TestConfig.bucket, expectKey, 3600,
new StringMap().put("fsizeMin", 1024 * 1025));
try {
Response res = uploadManager.put(f, expectKey, token, params, null, true);
} catch (QiniuException e) {
Response res = e.response;
try {
assertEquals("{\"error\":\"request entity size is smaller than FsizeMin\"}", res.bodyString());
} catch (QiniuException e1) {
e1.printStackTrace();
}
} finally {
TempFile.remove(f);
}
}
@Test
public void testSizeMin2() {
final String expectKey = "世/界";
File f = null;
try {
f = TempFile.createFile(1);
} catch (IOException e) {
e.printStackTrace();
}
assert f != null;
StringMap params = new StringMap().put("x:foo", "foo_val");
String token = TestConfig.testAuth.uploadToken(TestConfig.bucket, expectKey, 3600,
new StringMap().put("fsizeMin", 1023));
try {
uploadManager.put(f, expectKey, token, params, null, true);
} catch (QiniuException e) {
fail();
} finally {
TempFile.remove(f);
}
}
>>>>>>>
@Test
public void testFname() {
final String expectKey = "世/界";
File f = null;
try {
f = TempFile.createFile(1);
} catch (IOException e) {
e.printStackTrace();
}
assert f != null;
final String returnBody = "{\"key\":\"$(key)\",\"hash\":\"$(etag)\",\"fsize\":\"$(fsize)\""
+ ",\"fname\":\"$(fname)\",\"mimeType\":\"$(mimeType)\"}";
String token = TestConfig.testAuth.uploadToken(TestConfig.bucket, expectKey, 3600,
new StringMap().put("returnBody", returnBody));
try {
Response res = uploadManager.put(f, expectKey, token, null, null, true);
MyRet ret = res.jsonToObject(MyRet.class);
assertEquals(f.getName(), ret.fname);
} catch (QiniuException e) {
TempFile.remove(f);
fail();
}
TempFile.remove(f);
}
public void testSizeMin() {
final String expectKey = "世/界";
File f = null;
try {
f = TempFile.createFile(1);
} catch (IOException e) {
e.printStackTrace();
}
assert f != null;
StringMap params = new StringMap().put("x:foo", "foo_val");
String token = TestConfig.testAuth.uploadToken(TestConfig.bucket, expectKey, 3600,
new StringMap().put("fsizeMin", 1024 * 1025));
try {
Response res = uploadManager.put(f, expectKey, token, params, null, true);
} catch (QiniuException e) {
Response res = e.response;
try {
assertEquals("{\"error\":\"request entity size is smaller than FsizeMin\"}", res.bodyString());
} catch (QiniuException e1) {
e1.printStackTrace();
}
} finally {
TempFile.remove(f);
}
}
@Test
public void testSizeMin2() {
final String expectKey = "世/界";
File f = null;
try {
f = TempFile.createFile(1);
} catch (IOException e) {
e.printStackTrace();
}
assert f != null;
StringMap params = new StringMap().put("x:foo", "foo_val");
String token = TestConfig.testAuth.uploadToken(TestConfig.bucket, expectKey, 3600,
new StringMap().put("fsizeMin", 1023));
try {
uploadManager.put(f, expectKey, token, params, null, true);
} catch (QiniuException e) {
fail();
} finally {
TempFile.remove(f);
}
}
class MyRet {
public String hash;
public String key;
public String fsize;
public String fname;
public String mimeType;
} |
<<<<<<<
@Override
public int getDirectMethodCount() {
return directMethodCount;
}
@Override
public int getVirtualMethodCount() {
return virtualMethodCount;
}
@Override
public int getStaticFieldCount() {
return staticFieldCount;
}
@Override
public int getInstanceFieldCount() {
return instanceFieldCount;
}
=======
/**
* Calculate and return the private size of a class definition.
*
* Calculated as: class_def_item size + type_id size + interfaces type_list +
* annotations_directory_item overhead + class_data_item + static values overhead +
* methods size + fields size
*
* @return size in bytes
*/
public int getSize() {
int size = 8 * 4; //class_def_item has 8 uint fields in dex files
size += TypeIdItem.ITEM_SIZE; //type_ids size
//add interface list size if any
int interfacesLength = getInterfaces().size();
if (interfacesLength > 0) {
//add size of the type_list
size += 4; //uint for size
size += interfacesLength * 2; //ushort per type_item
}
//annotations directory size if it exists
AnnotationsDirectory directory = getAnnotationsDirectory();
if (!AnnotationsDirectory.EMPTY.equals(directory)) {
size += 4 * 4; //4 uints in annotations_directory_item
Set<? extends DexBackedAnnotation> classAnnotations = directory.getClassAnnotations();
if (!classAnnotations.isEmpty()) {
size += 4; //uint for size
size += classAnnotations.size() * 4; //uint per annotation_off
//TODO: should we add annotation_item size? what if it's shared?
}
}
//static values and/or metadata
int staticInitialValuesOffset =
dexFile.readSmallUint(classDefOffset + ClassDefItem.STATIC_VALUES_OFFSET);
if (staticInitialValuesOffset != 0) {
DexReader reader = dexFile.readerAt(staticInitialValuesOffset);
size += reader.peekSmallUleb128Size(); //encoded_array size field
}
//class_data_item
int classDataOffset = dexFile.readSmallUint(classDefOffset + ClassDefItem.CLASS_DATA_OFFSET);
if (classDataOffset > 0) {
DexReader reader = dexFile.readerAt(classDataOffset);
reader.readSmallUleb128(); //staticFieldCount
reader.readSmallUleb128(); //instanceFieldCount
reader.readSmallUleb128(); //directMethodCount
reader.readSmallUleb128(); //virtualMethodCount
size += reader.getOffset() - classDataOffset;
}
for (DexBackedField dexBackedField : getFields()) {
size += dexBackedField.getSize();
}
for (DexBackedMethod dexBackedMethod : getMethods()) {
size += dexBackedMethod.getSize();
}
return size;
}
>>>>>>>
@Override
public int getDirectMethodCount() {
return directMethodCount;
}
@Override
public int getVirtualMethodCount() {
return virtualMethodCount;
}
@Override
public int getStaticFieldCount() {
return staticFieldCount;
}
@Override
public int getInstanceFieldCount() {
return instanceFieldCount;
}
/**
* Calculate and return the private size of a class definition.
*
* Calculated as: class_def_item size + type_id size + interfaces type_list +
* annotations_directory_item overhead + class_data_item + static values overhead +
* methods size + fields size
*
* @return size in bytes
*/
public int getSize() {
int size = 8 * 4; //class_def_item has 8 uint fields in dex files
size += TypeIdItem.ITEM_SIZE; //type_ids size
//add interface list size if any
int interfacesLength = getInterfaces().size();
if (interfacesLength > 0) {
//add size of the type_list
size += 4; //uint for size
size += interfacesLength * 2; //ushort per type_item
}
//annotations directory size if it exists
AnnotationsDirectory directory = getAnnotationsDirectory();
if (!AnnotationsDirectory.EMPTY.equals(directory)) {
size += 4 * 4; //4 uints in annotations_directory_item
Set<? extends DexBackedAnnotation> classAnnotations = directory.getClassAnnotations();
if (!classAnnotations.isEmpty()) {
size += 4; //uint for size
size += classAnnotations.size() * 4; //uint per annotation_off
//TODO: should we add annotation_item size? what if it's shared?
}
}
//static values and/or metadata
int staticInitialValuesOffset =
dexFile.readSmallUint(classDefOffset + ClassDefItem.STATIC_VALUES_OFFSET);
if (staticInitialValuesOffset != 0) {
DexReader reader = dexFile.readerAt(staticInitialValuesOffset);
size += reader.peekSmallUleb128Size(); //encoded_array size field
}
//class_data_item
int classDataOffset = dexFile.readSmallUint(classDefOffset + ClassDefItem.CLASS_DATA_OFFSET);
if (classDataOffset > 0) {
DexReader reader = dexFile.readerAt(classDataOffset);
reader.readSmallUleb128(); //staticFieldCount
reader.readSmallUleb128(); //instanceFieldCount
reader.readSmallUleb128(); //directMethodCount
reader.readSmallUleb128(); //virtualMethodCount
size += reader.getOffset() - classDataOffset;
}
for (DexBackedField dexBackedField : getFields()) {
size += dexBackedField.getSize();
}
for (DexBackedMethod dexBackedMethod : getMethods()) {
size += dexBackedMethod.getSize();
}
return size;
} |
<<<<<<<
import org.jf.dexlib2.dexbacked.util.CompactOffsetTable;
=======
import org.jf.dexlib2.dexbacked.util.FixedSizeList;
>>>>>>>
import org.jf.dexlib2.dexbacked.util.CompactOffsetTable;
import org.jf.dexlib2.dexbacked.util.FixedSizeList;
<<<<<<<
public final int fileSize;
public final int dataSize;
final int dataOffset;
static class CompactInfo { // libdexfile/dex/compact_dex_file.h
final int featureFlags;
// Position in the compact dex file for the debug info table data starts.
final int debugInfoOffsetsPos;
// Offset into the debug info table data where the lookup table is.
final int debugInfoOffsetsTableOffset;
// Base offset of where debug info starts in the dex file.
final int debugInfoBase;
CompactInfo(DexBackedDexFile dexFile) {
featureFlags = dexFile.readSmallUint(HeaderItem.ITEM_SIZE);
debugInfoOffsetsPos = dexFile.readSmallUint(HeaderItem.ITEM_SIZE + 4);
debugInfoOffsetsTableOffset = dexFile.readSmallUint(HeaderItem.ITEM_SIZE + 8);
debugInfoBase = dexFile.readSmallUint(HeaderItem.ITEM_SIZE + 12);
}
}
public final boolean isCompact;
// The value of compact fields are 0, null if this is not a compact dex.
public final int compactDataOffset;
final CompactInfo compactInfo;
final CompactOffsetTable debugInfoOffsets;
protected DexBackedDexFile(@Nonnull Opcodes opcodes, @Nonnull byte[] buf, int offset, boolean verifyMagic) {
=======
protected DexBackedDexFile(@Nullable Opcodes opcodes, @Nonnull byte[] buf, int offset, boolean verifyMagic) {
>>>>>>>
public final int fileSize;
public final int dataSize;
final int dataOffset;
static class CompactInfo { // libdexfile/dex/compact_dex_file.h
final int featureFlags;
// Position in the compact dex file for the debug info table data starts.
final int debugInfoOffsetsPos;
// Offset into the debug info table data where the lookup table is.
final int debugInfoOffsetsTableOffset;
// Base offset of where debug info starts in the dex file.
final int debugInfoBase;
CompactInfo(DexBackedDexFile dexFile) {
featureFlags = dexFile.readSmallUint(HeaderItem.ITEM_SIZE);
debugInfoOffsetsPos = dexFile.readSmallUint(HeaderItem.ITEM_SIZE + 4);
debugInfoOffsetsTableOffset = dexFile.readSmallUint(HeaderItem.ITEM_SIZE + 8);
debugInfoBase = dexFile.readSmallUint(HeaderItem.ITEM_SIZE + 12);
}
}
public final boolean isCompact;
// The value of compact fields are 0, null if this is not a compact dex.
public final int compactDataOffset;
final CompactInfo compactInfo;
final CompactOffsetTable debugInfoOffsets;
protected DexBackedDexFile(@Nullable Opcodes opcodes, @Nonnull byte[] buf, int offset, boolean verifyMagic) {
<<<<<<<
dataSize = readSmallUint(HeaderItem.DATA_SIZE);
dataOffset = readSmallUint(HeaderItem.DATA_OFFSET);
// See https://android.googlesource.com/platform/art/+/c3a22aa19bbe35ff8447460b29e07d42937a39de
// Shared separate data section for compact dex.
isCompact = dataOffset >= fileSize;
if (isCompact) {
compactDataOffset = dataOffset;
compactInfo = new CompactInfo(this);
debugInfoOffsets = new CompactOffsetTable(new CompactOffsetTable.DexReader(this),
dataOffset + compactInfo.debugInfoOffsetsPos,
compactInfo.debugInfoBase, compactInfo.debugInfoOffsetsTableOffset);
} else {
compactDataOffset = 0;
compactInfo = null;
debugInfoOffsets = null;
}
=======
mapOffset = readSmallUint(HeaderItem.MAP_OFFSET);
>>>>>>>
mapOffset = readSmallUint(HeaderItem.MAP_OFFSET);
dataSize = readSmallUint(HeaderItem.DATA_SIZE);
dataOffset = readSmallUint(HeaderItem.DATA_OFFSET);
// See https://android.googlesource.com/platform/art/+/c3a22aa19bbe35ff8447460b29e07d42937a39de
// Shared separate data section for compact dex.
isCompact = dataOffset >= fileSize;
if (isCompact) {
compactDataOffset = dataOffset;
compactInfo = new CompactInfo(this);
debugInfoOffsets = new CompactOffsetTable(new CompactOffsetTable.DexReader(this),
dataOffset + compactInfo.debugInfoOffsetsPos,
compactInfo.debugInfoBase, compactInfo.debugInfoOffsetsTableOffset);
} else {
compactDataOffset = 0;
compactInfo = null;
debugInfoOffsets = null;
}
<<<<<<<
public int readSmallUintPlusDataOffset(int offset) {
return super.readSmallUint(offset) + compactDataOffset;
}
=======
public List<MapItem> getMapItems() {
final int mapSize = readSmallUint(mapOffset);
return new FixedSizeList<MapItem>() {
@Override
public MapItem readItem(int index) {
int mapItemOffset = mapOffset + 4 + index * MapItem.ITEM_SIZE;
return new MapItem(DexBackedDexFile.this, mapItemOffset);
}
@Override public int size() {
return mapSize;
}
};
}
@Nullable
public MapItem getMapItemForSection(int itemType) {
for (MapItem mapItem: getMapItems()) {
if (mapItem.getType() == itemType) {
return mapItem;
}
}
return null;
}
>>>>>>>
public int readSmallUintPlusDataOffset(int offset) {
return super.readSmallUint(offset) + compactDataOffset;
}
public List<MapItem> getMapItems() {
final int mapSize = readSmallUint(mapOffset);
return new FixedSizeList<MapItem>() {
@Override
public MapItem readItem(int index) {
int mapItemOffset = mapOffset + 4 + index * MapItem.ITEM_SIZE;
return new MapItem(DexBackedDexFile.this, mapItemOffset);
}
@Override public int size() {
return mapSize;
}
};
}
@Nullable
public MapItem getMapItemForSection(int itemType) {
for (MapItem mapItem: getMapItems()) {
if (mapItem.getType() == itemType) {
return mapItem;
}
}
return null;
} |
<<<<<<<
import com.google.common.base.Predicates;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.primitives.Ints;
=======
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.TreeSet;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
>>>>>>>
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.PriorityQueue;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
<<<<<<<
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.*;
=======
import com.google.common.base.Predicates;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
>>>>>>>
import com.google.common.base.Predicates;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.primitives.Ints;
<<<<<<<
=======
@Nonnull private final Supplier<SparseArray<FieldReference>> instanceFieldsSupplier;
@Nonnull private final FieldOffsetCalculator fieldOffsetCalculator;
>>>>>>>
<<<<<<<
=======
fieldOffsetCalculator = classPath.apiLevel < Opcode.LOLLIPOP
? new DalvikIFieldSupplier(this) : new ArtIFieldSupplier(this);
instanceFieldsSupplier = Suppliers.memoize(fieldOffsetCalculator);
>>>>>>>
<<<<<<<
public int findMethodIndexInVtable(@Nonnull MethodReference method) {
List<Method> vtable = getVtable();
for (int i=0; i<vtable.size(); i++) {
Method candidate = vtable.get(i);
if (MethodUtil.methodSignaturesMatch(candidate, method)) {
if (!classPath.shouldCheckPackagePrivateAccess() ||
AnalyzedMethodUtil.canAccess(this, candidate, true, false, false)) {
return i;
}
}
=======
@Nonnull SparseArray<FieldReference> getInstanceFields() {
return instanceFieldsSupplier.get();
}
public static void dump(TypeProto type) {
if (type instanceof ClassProto) {
((ClassProto) type).dump();
}
}
public void dump() {
fieldOffsetCalculator.debugOffset(null, getInstanceFields());
debugVtable(null, getVtable());
}
void debugVtable(String className, List<Method> vtable) {
final String type = getClassDef().getType();
if (className != null && !type.equals(className)) {
return;
}
System.out.println("## Vtable of " + type);
for (int i = 0; i < vtable.size(); i++) {
Method m = vtable.get(i);
System.out.println("#" + i + " " + m.getName() + " " + m.getReturnType());
>>>>>>>
public int findMethodIndexInVtable(@Nonnull MethodReference method) {
List<Method> vtable = getVtable();
for (int i=0; i<vtable.size(); i++) {
Method candidate = vtable.get(i);
if (MethodUtil.methodSignaturesMatch(candidate, method)) {
if (!classPath.shouldCheckPackagePrivateAccess() ||
AnalyzedMethodUtil.canAccess(this, candidate, true, false, false)) {
return i;
}
}
<<<<<<<
fieldOffset = instanceFields.keyAt(superFieldCount-1);
=======
// References should be at the front.
GapContainer gaps = new GapContainer(classProto.classPath.apiLevel > Opcode.M
? new FieldGapCreator() : new FieldGapCreatorM());
int currentField = 0;
for (; currentField < fieldCount; currentField++) {
Field f = fields.get(0);
int type = getTypeAsPrimitiveType(f);
boolean isPrimitive = type != kPrimNot;
if (isPrimitive) {
break;
}
if (!isAligned(sizeof_mirror_HeapReference_mirror_Object, fieldOffset)) {
int oldFieldOffset = fieldOffset;
fieldOffset = roundUp(fieldOffset, 4);
FieldGap.add(oldFieldOffset, fieldOffset, gaps);
}
assert isAligned(sizeof_mirror_HeapReference_mirror_Object, fieldOffset);
fields.remove(0);
instanceFields.append(fieldOffset, f);
fieldOffset += sizeof_mirror_HeapReference_mirror_Object;
}
FieldOffsetData data = new FieldOffsetData();
data.currentField = currentField;
data.fieldOffset = fieldOffset;
data.fields = fields;
data.gaps = gaps;
data.instanceFields = instanceFields;
shuffleForward(8, data);
shuffleForward(4, data);
shuffleForward(2, data);
shuffleForward(1, data);
assert fields.isEmpty();
//debugFieldsOrder(null, fields);
// See runtime/mirror/class.h
classProto.objectSize = data.fieldOffset; // not for IsVariableSize (String and Array)
return instanceFields;
}
>>>>>>>
fieldOffset = instanceFields.keyAt(superFieldCount-1);
<<<<<<<
@Nonnull private final Supplier<SparseArray<FieldReference>> artInstanceFieldsSupplier =
Suppliers.memoize(new Supplier<SparseArray<FieldReference>>() {
@Override public SparseArray<FieldReference> get() {
// We need to follow the same algorithm that art uses to arrange fields, so that we end up with the
// same field offsets, which is needed for deodexing.
// See LinkFields() in art/runtime/class_linker.cc
PriorityQueue<FieldGap> gaps = new PriorityQueue<FieldGap>();
SparseArray<FieldReference> linkedFields = new SparseArray<FieldReference>();
ArrayList<Field> fields = getSortedInstanceFields(getClassDef());
int fieldOffset = 0;
String superclassType = getSuperclass();
if (superclassType != null) {
// TODO: what to do if superclass doesn't exist?
ClassProto superclass = (ClassProto) classPath.getClass(superclassType);
SparseArray<FieldReference> superFields = superclass.getInstanceFields();
FieldReference field = null;
int lastOffset = 0;
for (int i=0; i<superFields.size(); i++) {
int offset = superFields.keyAt(i);
field = superFields.valueAt(i);
linkedFields.put(offset, field);
lastOffset = offset;
}
if (field != null) {
fieldOffset = lastOffset + getFieldSize(field);
}
}
=======
static boolean isAligned(int n, int x) {
assert ((n & (n - 1)) == 0); // n_not_power_of_two
return (x & (n - 1)) == 0;
}
// runtime/primitive.h
final static int kObjectReferenceSize = 4;
final static int kPrimNot = 0;
final static int kPrimBoolean = 1;
final static int kPrimByte = 2;
final static int kPrimChar = 3;
final static int kPrimShort = 4;
final static int kPrimInt = 5;
final static int kPrimLong = 6;
final static int kPrimFloat = 7;
final static int kPrimDouble = 8;
final static int kPrimVoid = 9;
static int getTypeAsPrimitiveType(Field field) {
return getPrimitiveType(field.getType().charAt(0));
}
static int getPrimitiveType(char type) {
switch (type) {
case 'B':
return kPrimByte;
case 'C':
return kPrimChar;
case 'D':
return kPrimDouble;
case 'F':
return kPrimFloat;
case 'I':
return kPrimInt;
case 'J':
return kPrimLong;
case 'S':
return kPrimShort;
case 'Z':
return kPrimBoolean;
case 'V':
return kPrimVoid;
default:
return kPrimNot;
}
}
static int getComponentSize(int type) {
switch (type) {
case kPrimVoid:
return 0;
case kPrimBoolean:
case kPrimByte:
return 1;
case kPrimChar:
case kPrimShort:
return 2;
case kPrimInt:
case kPrimFloat:
return 4;
case kPrimLong:
case kPrimDouble:
return 8;
case kPrimNot:
return kObjectReferenceSize;
default:
assert false;
return 0;
}
}
}
static class DalvikIFieldSupplier extends FieldOffsetCalculator {
>>>>>>>
@Nonnull private final Supplier<SparseArray<FieldReference>> artInstanceFieldsSupplier =
Suppliers.memoize(new Supplier<SparseArray<FieldReference>>() {
@Override public SparseArray<FieldReference> get() {
// We need to follow the same algorithm that art uses to arrange fields, so that we end up with the
// same field offsets, which is needed for deodexing.
// See LinkFields() in art/runtime/class_linker.cc
PriorityQueue<FieldGap> gaps = new PriorityQueue<FieldGap>();
SparseArray<FieldReference> linkedFields = new SparseArray<FieldReference>();
ArrayList<Field> fields = getSortedInstanceFields(getClassDef());
int fieldOffset = 0;
String superclassType = getSuperclass();
if (superclassType != null) {
// TODO: what to do if superclass doesn't exist?
ClassProto superclass = (ClassProto) classPath.getClass(superclassType);
SparseArray<FieldReference> superFields = superclass.getInstanceFields();
FieldReference field = null;
int lastOffset = 0;
for (int i=0; i<superFields.size(); i++) {
int offset = superFields.keyAt(i);
field = superFields.valueAt(i);
linkedFields.put(offset, field);
lastOffset = offset;
}
if (field != null) {
fieldOffset = lastOffset + getFieldSize(field);
}
} |
<<<<<<<
JsonObject config = config();
config.put("signal", "asr");
=======
skipLogs = config().getBoolean("skip-logs", false);
>>>>>>>
JsonObject config = config();
config.put("signal", "asr");
skipLogs = config().getBoolean("skip-logs", false); |
<<<<<<<
private long pressedTimestamp;
private Set<Integer> keySet = new HashSet<>();
=======
private Map<String, Set<Integer>> actionMap = new HashMap<>();
>>>>>>>
private long pressedTimestamp;
private Set<Integer> keySet = new HashSet<>();
private Map<String, Set<Integer>> actionMap = new HashMap<>();
<<<<<<<
if (!keySet.isEmpty() && pressedKeys.containsAll(keySet)) {
log.info("Keyset detected");
pressedTimestamp = System.currentTimeMillis();
vertx.eventBus().publish("asr.start", null);
}
=======
actionMap.entrySet().stream().filter(entry -> pressedKeys.containsAll(entry.getValue())).forEach(entry -> {
log.info("Keyset detected for " + entry.getKey());
vertx.eventBus().send(entry.getKey() + ".start", null);
});
>>>>>>>
actionMap.entrySet().stream().filter(entry -> pressedKeys.containsAll(entry.getValue())).forEach(entry -> {
log.info("Keyset detected for " + entry.getKey());
vertx.eventBus().send(entry.getKey() + ".start", null);
});
<<<<<<<
vertx.eventBus().publish("key.released", code);
if (keySet.contains(code) && pressedKeys.containsAll(keySet)) {
if (System.currentTimeMillis() - pressedTimestamp < RELEASE_TIMEOUT) {
vertx.eventBus().publish("asr.listen", null);
} else {
vertx.eventBus().publish("asr.stop", null);
}
}
=======
actionMap.entrySet().stream().filter(entry -> entry.getValue().contains(code) && pressedKeys.containsAll(entry.getValue())).forEach(entry -> {
vertx.eventBus().send(entry.getKey() + ".stop", null);
});
>>>>>>>
actionMap.entrySet().stream().filter(entry -> entry.getValue().contains(code) && pressedKeys.containsAll(entry.getValue())).forEach(entry -> {
vertx.eventBus().send(entry.getKey() + ".stop", null);
}); |
<<<<<<<
/**
* The type of channel to use for logging
*/
private ChannelType channelType;
private static boolean isRunning;
private static boolean isSetup;
=======
/**
* Flag that indicates that the user has called a setup-method before
*/
private static boolean isConfigured;
/**
* Flag that indicates that the pipeline (Channel, Persistence, etc.) have been setup
*/
private static boolean isSetupAndRunning;
>>>>>>>
/**
* Flag that indicates that the user has called a setup-method before
*/
private static boolean isConfigured;
/**
* Flag that indicates that the pipeline (Channel, Persistence, etc.) have been setup
*/
private static boolean isSetupAndRunning;
/**
* The type of channel to use for logging
*/
private ChannelType channelType;
<<<<<<<
this.autoCollectionDisabled = false;
this.channelType = ChannelType.Default;
=======
this.autoLifecycleCollectionDisabled = false;
>>>>>>>
this.autoLifecycleCollectionDisabled = false;
this.channelType = ChannelType.Default;
<<<<<<<
/**
* Configure Application Insights
* Note: This should be called before start
* auto-collection of lifecycle-events is disabled when using this method
*
* @param context the context associated with Application Insights
* @param context the application context associated with Application Insights
* @deprecated This method is deprecated: Use setup(Context context, Application application) instead.
*/
public static void setup(Context context) {
ApplicationInsights.INSTANCE.setupInstance(context, null, null);
}
/**
=======
/**
>>>>>>>
/**
<<<<<<<
EnvelopeFactory.initialize(telemetryContext, this.commonProperties);
Persistence.initialize(context);
Sender.initialize(this.config);
ChannelManager.initialize(channelType);
// Initialize Telemetry
TelemetryClient.initialize(!telemetryDisabled);
LifeCycleTracking.initialize(telemetryContext, this.config);
Application application = INSTANCE.getApplication();
LifeCycleTracking.registerForPersistingWhenInBackground(application);
if (INSTANCE.getApplication() != null && !this.autoCollectionDisabled) {
LifeCycleTracking.registerPageViewCallbacks(application);
LifeCycleTracking.registerSessionManagementCallbacks(application);
} else {
InternalLogging.warn(TAG, "Auto collection of page views could not be " +
"started, since the given application was null");
}
=======
>>>>>>>
<<<<<<<
if (!isRunning) {
InternalLogging.warn(TAG, "Could not set page view tracking, because " +
"ApplicationInsights has not been started yet.");
return;
} else if (INSTANCE.getApplication() == null) {
InternalLogging.warn(TAG, "Could not set page view tracking, because " +
"ApplicationInsights has not been setup with an application.");
return;
} else {
LifeCycleTracking.registerPageViewCallbacks(INSTANCE.getApplication());
=======
if(autoCollectionPossible("Auto PageView Tracking")) {
AutoCollection.enableAutoPageViews(INSTANCE.getApplication());
>>>>>>>
if(autoCollectionPossible("Auto PageView Tracking")) {
AutoCollection.enableAutoPageViews(INSTANCE.getApplication()); |
<<<<<<<
import com.microsoft.applicationinsights.channel.contracts.CrashData;
=======
>>>>>>>
import com.microsoft.applicationinsights.channel.contracts.CrashData; |
<<<<<<<
=======
if (context == null) {
InternalLogging.warn(TAG, "Could not start Application Insights as context is null");
return;
}
if (this.instrumentationKey == null) {
this.instrumentationKey = readInstrumentationKey(context);
}
if (this.user != null) {
//the dev has use setCustomUserContext to configure the user object
this.telemetryContext = new TelemetryContext(context, this.instrumentationKey, this.user);
} else {
//in case the dev doesn't use a custom user object
this.telemetryContext = new TelemetryContext(context, this.instrumentationKey, null);
}
>>>>>>>
<<<<<<<
* Set the user Id associated with the telemetry data. If userId == null, ApplicationInsights
* will generate a random ID.
*
* @param userId a user ID associated with the telemetry data
* @deprecated use {@link ApplicationInsights#getTelemetryContext()} instead
*/
public static void setUserId(String userId) {
if (isConfigured) {
INSTANCE.telemetryContext.configUserContext(userId);
}
}
/**
=======
>>>>>>> |
<<<<<<<
if (autoPageViewsEnabled) {
InternalLogging.info(TAG, "New Pageview");
TrackDataOperation pageViewOp = new TrackDataOperation(TrackDataOperation.DataType.PAGE_VIEW, activity.getClass().getName());
new Thread(pageViewOp).start();
}
=======
>>>>>>> |
<<<<<<<
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Position)) {
return false;
}
if (obj == this) {
return true;
}
Position position = (Position) obj;
if (position.getLatitude() != latitude) {
// They need to have the same latitude
return false;
} else if (position.getLongitude() != longitude) {
// They need to have the same longitude
return false;
} else if (Double.isNaN(position.getAltitude()) != Double.isNaN(altitude)) {
// They need to have the same altitude NaN state
return false;
} else if (!Double.isNaN(altitude) && position.getAltitude() != altitude) {
// They need to have the same latitude (if different from NaN)
return false;
}
return true;
}
=======
@Override
public String toString() {
return "Position [longitude=" + longitude + ", latitude=" + latitude + ", altitude=" + altitude + "]";
}
>>>>>>>
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Position)) {
return false;
}
if (obj == this) {
return true;
}
Position position = (Position) obj;
if (position.getLatitude() != latitude) {
// They need to have the same latitude
return false;
} else if (position.getLongitude() != longitude) {
// They need to have the same longitude
return false;
} else if (Double.isNaN(position.getAltitude()) != Double.isNaN(altitude)) {
// They need to have the same altitude NaN state
return false;
} else if (!Double.isNaN(altitude) && position.getAltitude() != altitude) {
// They need to have the same latitude (if different from NaN)
return false;
}
return true;
}
public String toString() {
return "Position [longitude=" + longitude + ", latitude=" + latitude + ", altitude=" + altitude + "]";
} |
<<<<<<<
public class PlayerInventoryGCContainer extends ScreenHandler {
private static final String[] EMPTY_ARMOR_SLOT_IDS = new String[]{
Constants.MOD_ID + ":" + Constants.SlotSprites.THERMAL_HEAD,
Constants.MOD_ID + ":" + Constants.SlotSprites.THERMAL_CHEST,
Constants.MOD_ID + ":" + Constants.SlotSprites.THERMAL_PANTS,
Constants.MOD_ID + ":" + Constants.SlotSprites.THERMAL_BOOTS};
=======
public class PlayerInventoryGCContainer extends Container {
private static final Identifier[] EMPTY_ARMOR_SLOT_IDS = new Identifier[]{
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_BOOTS),
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_PANTS),
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_CHEST),
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_HEAD)};
>>>>>>>
public class PlayerInventoryGCContainer extends ScreenHandler {
private static final Identifier[] EMPTY_ARMOR_SLOT_IDS = new Identifier[]{
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_BOOTS),
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_PANTS),
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_CHEST),
new Identifier(Constants.MOD_ID, Constants.SlotSprites.THERMAL_HEAD)};
<<<<<<<
return Pair.of(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, new Identifier(Constants.MOD_ID, EMPTY_ARMOR_SLOT_IDS[slot.getEntitySlotId()]));
=======
return Pair.of(PlayerContainer.BLOCK_ATLAS_TEXTURE, EMPTY_ARMOR_SLOT_IDS[slot.getEntitySlotId()]);
>>>>>>>
return Pair.of(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, EMPTY_ARMOR_SLOT_IDS[slot.getEntitySlotId()]);
<<<<<<<
public ItemStack getThermalPiece(EquipmentSlot slot) {
switch (slot) {
case HEAD:
return gearInventory.getStack(0);
case CHEST:
return gearInventory.getStack(1);
case LEGS:
return gearInventory.getStack(2);
case FEET:
return gearInventory.getStack(3);
default:
return ItemStack.EMPTY;
}
}
public void setThermalPiece(EquipmentSlot slot, ItemStack thermalPiece) {
switch (slot) {
case HEAD:
gearInventory.setStack(0, thermalPiece);
return;
case CHEST:
gearInventory.setStack(1, thermalPiece);
return;
case LEGS:
gearInventory.setStack(2, thermalPiece);
return;
case FEET:
gearInventory.setStack(3, thermalPiece);
return;
default:
throw new IllegalArgumentException("Invalid EquipmentSlot " + slot + "!");
}
}
=======
>>>>>>> |
<<<<<<<
import com.hrznstudio.galacticraft.blocks.GalacticraftBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.world.gen.chunk.ChunkGeneratorConfig;
=======
import com.hrznstudio.galacticraft.block.GalacticraftBlocks;
import net.minecraft.block.Blocks;
import net.minecraft.world.gen.chunk.OverworldChunkGeneratorConfig;
>>>>>>>
import com.hrznstudio.galacticraft.block.GalacticraftBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.world.gen.chunk.ChunkGeneratorConfig;
<<<<<<<
@Override
public BlockState getDefaultFluid() {
return GalacticraftBlocks.MOON_TURF.getDefaultState();
}
=======
>>>>>>>
@Override
public BlockState getDefaultFluid() {
return GalacticraftBlocks.MOON_TURF.getDefaultState();
} |
<<<<<<<
public static final String OXYGEN_DISTRIBUTOR_BUBBLE_DUMMY_BLOCK = "oxygen_distributor_bubble_dummy_block";
=======
public static final String MOON_BASALT_BRICK = "moon_basalt_brick";
>>>>>>>
public static final String OXYGEN_DISTRIBUTOR_BUBBLE_DUMMY_BLOCK = "oxygen_distributor_bubble_dummy_block";
public static final String MOON_BASALT_BRICK = "moon_basalt_brick";
<<<<<<<
public static class Container {
public static final String COAL_GENERATOR_CONTAINER = "coal_generator_container";
public static final String BASIC_SOLAR_PANEL_CONTAINER = "basic_solar_panel_container";
public static final String CIRCUIT_FABRICATOR_CONTAINER = "circuit_fabricator_container";
public static final String COMPRESSOR_CONTAINER = "compressor_container";
public static final String ELECTRIC_COMPRESSOR_CONTAINER = "electric_compressor_container";
public static final String PLAYER_INVENTORY_CONTAINER = "player_inventory_container";
public static final String ENERGY_STORAGE_MODULE_CONTAINER = "energy_storage_module_container";
public static final String REFINERY_CONTAINER = "refinery_container";
public static final String OXYGEN_COLLECTOR_CONTAINER = "oxygen_collector_container";
public static final String BUBBLE_DISTRIBUTOR_CONTAINER = "bubble_distributor_container";
=======
public static class ScreenHandler {
public static final String COAL_GENERATOR_SCREEN_HANDLER = "coal_generator_screen_handler";
public static final String BASIC_SOLAR_SCREEN_HANDLER = "basic_solar_panel_screen_handler";
public static final String CIRCUIT_FABRICATOR_SCREEN_HANDLER = "circuit_fabricator_screen_handler";
public static final String COMPRESSOR_SCREEN_HANDLER = "compressor_screen_handler";
public static final String ELECTRIC_COMPRESSOR_SCREEN_HANDLER = "electric_compressor_screen_handler";
public static final String PLAYER_INVENTORY_SCREEN_HANDLER = "player_inventory_screen_handler";
public static final String ENERGY_STORAGE_MODULE_SCREEN_HANDLER = "energy_storage_module_screen_handler";
public static final String REFINERY_SCREEN_HANDLER = "refinery_screen_handler";
public static final String OXYGEN_COLLECTOR_SCREEN_HANDLER = "oxygen_collector_screen_handler";
}
public static class Biomes {
public static final String MOON_HIGHLANDS_PLAINS = "moon_highlands_plains";
public static final String MOON_HIGHLANDS_CRATERS = "moon_highlands_craters";
public static final String MOON_HIGHLANDS_ROCKS = "moon_highlands_rocks";
public static final String MOON_MARE_PLAINS = "moon_mare_plains";
public static final String MOON_MARE_CRATERS = "moon_mare_craters";
public static final String MOON_MARE_ROCKS = "moon_mare_rocks";
public static final String MOON_CHEESE_FOREST = "moon_cheese_forest";
public static final String MOON_VALLEY = "moon_valley";
>>>>>>>
public static class ScreenHandler {
public static final String COAL_GENERATOR_SCREEN_HANDLER = "coal_generator_screen_handler";
public static final String BASIC_SOLAR_SCREEN_HANDLER = "basic_solar_panel_screen_handler";
public static final String CIRCUIT_FABRICATOR_SCREEN_HANDLER = "circuit_fabricator_screen_handler";
public static final String COMPRESSOR_SCREEN_HANDLER = "compressor_screen_handler";
public static final String ELECTRIC_COMPRESSOR_SCREEN_HANDLER = "electric_compressor_screen_handler";
public static final String PLAYER_INVENTORY_SCREEN_HANDLER = "player_inventory_screen_handler";
public static final String ENERGY_STORAGE_MODULE_SCREEN_HANDLER = "energy_storage_module_screen_handler";
public static final String REFINERY_SCREEN_HANDLER = "refinery_screen_handler";
public static final String OXYGEN_COLLECTOR_SCREEN_HANDLER = "oxygen_collector_screen_handler";
public static final String BUBBLE_DISTRIBUTOR_SCREEN_HANDLER = "bubble_distributor_screen_handler";
}
public static class Biomes {
public static final String MOON_HIGHLANDS_PLAINS = "moon_highlands_plains";
public static final String MOON_HIGHLANDS_CRATERS = "moon_highlands_craters";
public static final String MOON_HIGHLANDS_ROCKS = "moon_highlands_rocks";
public static final String MOON_MARE_PLAINS = "moon_mare_plains";
public static final String MOON_MARE_CRATERS = "moon_mare_craters";
public static final String MOON_MARE_ROCKS = "moon_mare_rocks";
public static final String MOON_CHEESE_FOREST = "moon_cheese_forest";
public static final String MOON_VALLEY = "moon_valley"; |
<<<<<<<
import io.github.teamgalacticraft.galacticraft.blocks.machines.circuitfabricator.CircuitFabricatorScreen;
=======
import io.github.teamgalacticraft.galacticraft.blocks.machines.basicsolarpanel.BasicSolarPanelScreen;
>>>>>>>
import io.github.teamgalacticraft.galacticraft.blocks.machines.circuitfabricator.CircuitFabricatorScreen;
import io.github.teamgalacticraft.galacticraft.blocks.machines.basicsolarpanel.BasicSolarPanelScreen;
<<<<<<<
ClientSpriteRegistryCallback.EVENT.register((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.COAL_GENERATOR_SCREEN)));
ClientSpriteRegistryCallback.EVENT.register((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.CIRCUIT_FABRICATOR_SCREEN)));
ClientSpriteRegistryCallback.EVENT.register((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.MACHINE_CONFIG_TABS)));
=======
ClientSpriteRegistryCallback.EVENT.register(((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.COAL_GENERATOR_SCREEN))));
ClientSpriteRegistryCallback.EVENT.register(((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.BASIC_SOLAR_PANEL_SCREEN))));
ClientSpriteRegistryCallback.EVENT.register(((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.MACHINE_CONFIG_TABS))));
>>>>>>>
ClientSpriteRegistryCallback.EVENT.register((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.COAL_GENERATOR_SCREEN)));
ClientSpriteRegistryCallback.EVENT.register((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.CIRCUIT_FABRICATOR_SCREEN)));
ClientSpriteRegistryCallback.EVENT.register((spriteAtlasTexture, registry) -> registry.register(new Identifier(Constants.MOD_ID, Constants.ScreenTextures.MACHINE_CONFIG_TABS)));
<<<<<<<
ScreenProviderRegistry.INSTANCE.registerFactory(GalacticraftContainers.CIRCUIT_FABRICATOR_CONTAINER, (syncId, identifier, playerEntity, packetByteBuf) -> new CircuitFabricatorScreen(syncId, packetByteBuf.readBlockPos(), playerEntity));
=======
ScreenProviderRegistry.INSTANCE.registerFactory(GalacticraftContainers.BASIC_SOLAR_PANEL_CONTAINER, (syncId, identifier, playerEntity, packetByteBuf) -> new BasicSolarPanelScreen(syncId, packetByteBuf.readBlockPos(), playerEntity));
>>>>>>>
ScreenProviderRegistry.INSTANCE.registerFactory(GalacticraftContainers.BASIC_SOLAR_PANEL_CONTAINER, (syncId, identifier, playerEntity, packetByteBuf) -> new BasicSolarPanelScreen(syncId, packetByteBuf.readBlockPos(), playerEntity));
ScreenProviderRegistry.INSTANCE.registerFactory(GalacticraftContainers.CIRCUIT_FABRICATOR_CONTAINER, (syncId, identifier, playerEntity, packetByteBuf) -> new CircuitFabricatorScreen(syncId, packetByteBuf.readBlockPos(), playerEntity)); |
<<<<<<<
.setImageSizeLimit(5)
.setVideoSizeLimit(10)
=======
.setSpan(FilePickerConst.SPAN_TYPE.FOLDER_SPAN, 3)
.setSpan(FilePickerConst.SPAN_TYPE.DETAIL_SPAN, 4)
>>>>>>>
.setImageSizeLimit(5)
.setVideoSizeLimit(10)
.setSpan(FilePickerConst.SPAN_TYPE.FOLDER_SPAN, 3)
.setSpan(FilePickerConst.SPAN_TYPE.DETAIL_SPAN, 4) |
<<<<<<<
import net.minecraft.block.entity.FurnaceBlockEntity;
=======
import net.minecraft.inventory.BasicInventory;
>>>>>>>
import net.minecraft.block.entity.FurnaceBlockEntity;
import net.minecraft.inventory.BasicInventory; |
<<<<<<<
import butterknife.BindView;
import java.util.ArrayList;
=======
import butterknife.BindView;
>>>>>>>
import butterknife.BindView;
import java.util.ArrayList;
<<<<<<<
=======
import java.util.ArrayList;
import permissions.dispatcher.NeedsPermission;
import permissions.dispatcher.RuntimePermissions;
>>>>>>>
import java.util.ArrayList;
<<<<<<<
public class CallerFragment extends BaseFragment {
private int MAX_ATTACHMENT_COUNT = 10;
private ArrayList<String> photoPaths = new ArrayList<>();
private ArrayList<String> docPaths = new ArrayList<>();
public CallerFragment() {
// Required empty public constructor
}
@BindView(R.id.open_fragment)
Button openFragmentBtn;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.activity_main, container, false);
ButterKnife.bind(this, view);
return view;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
initView();
}
private void initView() {
openFragmentBtn.setVisibility(View.GONE);
}
@OnClick(R.id.pick_photo)
public void pickPhotoClicked(View view) {
onPickPhoto();
}
@OnClick(R.id.pick_doc)
public void pickDocClicked(View view) {
onPickDoc();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode)
{
case FilePickerConst.REQUEST_CODE_PHOTO:
if(resultCode== Activity.RESULT_OK && data!=null)
{
photoPaths = new ArrayList<>();
photoPaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_MEDIA));
}
break;
case FilePickerConst.REQUEST_CODE_DOC:
if(resultCode== Activity.RESULT_OK && data!=null)
{
docPaths = new ArrayList<>();
docPaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_DOCS));
}
break;
=======
@RuntimePermissions public class CallerFragment extends BaseFragment {
private int MAX_ATTACHMENT_COUNT = 10;
private ArrayList<String> photoPaths = new ArrayList<>();
private ArrayList<String> docPaths = new ArrayList<>();
public CallerFragment() {
// Required empty public constructor
}
@BindView(R.id.open_fragment) Button openFragmentBtn;
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.activity_main, container, false);
ButterKnife.bind(this, view);
return view;
}
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
initView();
}
private void initView() {
openFragmentBtn.setVisibility(View.GONE);
}
@OnClick(R.id.pick_photo) public void pickPhotoClicked(View view) {
CallerFragmentPermissionsDispatcher.onPickPhotoWithPermissionCheck(this);
}
@OnClick(R.id.pick_doc) public void pickDocClicked(View view) {
CallerFragmentPermissionsDispatcher.onPickDocWithPermissionCheck(this);
}
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case FilePickerConst.REQUEST_CODE_PHOTO:
if (resultCode == Activity.RESULT_OK && data != null) {
photoPaths = new ArrayList<>();
photoPaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_MEDIA));
>>>>>>>
public class CallerFragment extends BaseFragment {
private int MAX_ATTACHMENT_COUNT = 10;
private ArrayList<String> photoPaths = new ArrayList<>();
private ArrayList<String> docPaths = new ArrayList<>();
public CallerFragment() {
// Required empty public constructor
}
@BindView(R.id.open_fragment) Button openFragmentBtn;
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.activity_main, container, false);
ButterKnife.bind(this, view);
return view;
}
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
initView();
}
private void initView() {
openFragmentBtn.setVisibility(View.GONE);
}
@OnClick(R.id.pick_photo)
public void pickPhotoClicked(View view) {
onPickPhoto();
}
@OnClick(R.id.pick_doc)
public void pickDocClicked(View view) {
onPickDoc();
}
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case FilePickerConst.REQUEST_CODE_PHOTO:
if (resultCode == Activity.RESULT_OK && data != null) {
photoPaths = new ArrayList<>();
photoPaths.addAll(data.getStringArrayListExtra(FilePickerConst.KEY_SELECTED_MEDIA)); |
<<<<<<<
import com.hrznstudio.galacticraft.blocks.machines.bubbledistributor.BubbleDistributorBlockEntity;
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
=======
import com.hrznstudio.galacticraft.container.GalacticraftContainers;
import net.fabricmc.fabric.api.container.ContainerProviderRegistry;
>>>>>>>
import com.hrznstudio.galacticraft.blocks.machines.bubbledistributor.BubbleDistributorBlockEntity;
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
import com.hrznstudio.galacticraft.container.GalacticraftContainers;
import net.fabricmc.fabric.api.container.ContainerProviderRegistry; |
<<<<<<<
import com.hrznstudio.galacticraft.api.block.entity.ConfigurableElectricMachineBlockEntity;
import com.hrznstudio.galacticraft.api.item.EnergyHolderItem;
=======
import alexiil.mc.lib.attributes.item.filter.ItemFilter;
import com.hrznstudio.galacticraft.blocks.machines.MachineBlockEntity;
>>>>>>>
import alexiil.mc.lib.attributes.item.filter.ItemFilter;
import com.hrznstudio.galacticraft.api.block.entity.ConfigurableElectricMachineBlockEntity;
<<<<<<<
private SimpleEnergyAttribute energy = new SimpleEnergyAttribute(ConfigurableElectricMachineBlockEntity.DEFAULT_MAX_ENERGY, GalacticraftEnergy.GALACTICRAFT_JOULES);
=======
>>>>>>> |
<<<<<<<
public class CoalGeneratorBlockEntity extends ConfigurableElectricMachineBlockEntity implements Tickable {
=======
public class CoalGeneratorBlockEntity extends MachineBlockEntity implements Tickable {
private static final ItemFilter[] SLOT_FILTERS = new ItemFilter[2];
static {
SLOT_FILTERS[0] = AggregateItemFilter.anyOf(createFuelTimeMap().keySet().stream().map(ExactItemFilter::new).toArray(ItemFilter[]::new));
SLOT_FILTERS[1] = GalacticraftEnergy.ENERGY_HOLDER_ITEM_FILTER;
}
>>>>>>>
public class CoalGeneratorBlockEntity extends ConfigurableElectricMachineBlockEntity implements Tickable {
private static final ItemFilter[] SLOT_FILTERS = new ItemFilter[2];
static {
SLOT_FILTERS[0] = AggregateItemFilter.anyOf(createFuelTimeMap().keySet().stream().map(ExactItemFilter::new).toArray(ItemFilter[]::new));
SLOT_FILTERS[1] = GalacticraftEnergy.ENERGY_HOLDER_ITEM_FILTER;
}
<<<<<<<
selectedOptions.put(Direction.SOUTH, SideOption.POWER_OUTPUT);
energy.listen(this::markDirty);
=======
selectedOptions.put(Direction.SOUTH, SideOptions.POWER_OUTPUT);
getLimitedInventory().getRule(0).disallowExtraction();
>>>>>>>
selectedOptions.put(Direction.SOUTH, SideOption.POWER_OUTPUT);
getLimitedInventory().getRule(0).disallowExtraction();
<<<<<<<
if (!this.isActive()) {
return;
}
=======
if (world.isClient) {
return;
}
>>>>>>>
if (world.isClient || !isActive()) {
return;
}
<<<<<<<
if (selectedOptions.get(direction).equals(SideOption.POWER_OUTPUT)) {
EnergyAttribute energyAttribute = getNeighborAttribute(EnergyAttribute.ENERGY_ATTRIBUTE, direction);
=======
if (selectedOptions.get(direction).equals(SideOptions.POWER_OUTPUT)) {
EnergyAttribute energyAttribute = EnergyAttribute.ENERGY_ATTRIBUTE.getFirstFromNeighbour(this, direction);
>>>>>>>
if (selectedOptions.get(direction).equals(SideOption.POWER_OUTPUT)) {
EnergyAttribute energyAttribute = EnergyAttribute.ENERGY_ATTRIBUTE.getFirstFromNeighbour(this, direction); |
<<<<<<<
import com.hrznstudio.galacticraft.entity.evolvedzombie.EvolvedZombieEntity;
import com.hrznstudio.galacticraft.entity.moonvillager.MoonVillagerEntity;
import com.hrznstudio.galacticraft.entity.t1rocket.EntityT1Rocket;
import net.fabricmc.fabric.api.entity.FabricEntityTypeBuilder;
import net.minecraft.entity.EntityCategory;
=======
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
>>>>>>>
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
<<<<<<<
=======
import net.minecraft.entity.SpawnGroup;
>>>>>>>
import net.minecraft.entity.SpawnGroup;
<<<<<<<
public static final EntityType<MoonVillagerEntity> MOON_VILLAGER = FabricEntityTypeBuilder.create(EntityCategory.CREATURE, MoonVillagerEntity::new).size(EntityDimensions.fixed(0.6F, 2.4F)).build();
public static final EntityType<EvolvedZombieEntity> EVOLVED_ZOMBIE = FabricEntityTypeBuilder.create(EntityCategory.MONSTER, EvolvedZombieEntity::new).size(EntityDimensions.fixed(0.6F, 1.95F)).build();
public static final EntityType<EvolvedCreeperEntity> EVOLVED_CREEPER = FabricEntityTypeBuilder.create(EntityCategory.MONSTER, EvolvedCreeperEntity::new).size(EntityDimensions.changing(0.65F, 1.8F)).build();
public static final EntityType<EntityT1Rocket> ROCKET_T1 = FabricEntityTypeBuilder.create(EntityCategory.MISC, EntityT1Rocket::new).size(EntityDimensions.changing(2, 4)).build();
public static final EntityType<BubbleEntity> BUBBLE = FabricEntityTypeBuilder.create(EntityCategory.MISC, BubbleEntity::new).setImmuneToFire().size(EntityDimensions.fixed(0, 0)).disableSaving().disableSummon().build();
=======
public static final EntityType<MoonVillagerEntity> MOON_VILLAGER = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.MOON_VILLAGER), FabricEntityTypeBuilder.create(SpawnGroup.CREATURE, (EntityType.EntityFactory<MoonVillagerEntity>)MoonVillagerEntity::new).dimensions(EntityDimensions.fixed(0.6F, 2.4F)).build());
public static final EntityType<EvolvedZombieEntity> EVOLVED_ZOMBIE = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.EVOLVED_ZOMBIE), FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, EvolvedZombieEntity::new).dimensions(EntityDimensions.fixed(0.6F, 1.95F)).build());
public static final EntityType<EvolvedCreeperEntity> EVOLVED_CREEPER = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.EVOLVED_CREEPER), FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, EvolvedCreeperEntity::new).dimensions(EntityDimensions.changing(0.65F, 1.8F)).build());
>>>>>>>
public static final EntityType<MoonVillagerEntity> MOON_VILLAGER = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.MOON_VILLAGER), FabricEntityTypeBuilder.create(SpawnGroup.CREATURE, (EntityType.EntityFactory<MoonVillagerEntity>)MoonVillagerEntity::new).dimensions(EntityDimensions.fixed(0.6F, 2.4F)).build());
public static final EntityType<EvolvedZombieEntity> EVOLVED_ZOMBIE = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.EVOLVED_ZOMBIE), FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, EvolvedZombieEntity::new).dimensions(EntityDimensions.fixed(0.6F, 1.95F)).build());
public static final EntityType<EvolvedCreeperEntity> EVOLVED_CREEPER = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.EVOLVED_CREEPER), FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, EvolvedCreeperEntity::new).dimensions(EntityDimensions.changing(0.65F, 1.8F)).build());
public static final EntityType<BubbleEntity> BUBBLE = Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.BUBBLE), FabricEntityTypeBuilder.create(SpawnGroup.MISC, BubbleEntity::new).fireImmune().dimensions(EntityDimensions.fixed(0, 0)).disableSaving().disableSummon().build());
<<<<<<<
Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.Entities.MOON_VILLAGER), MOON_VILLAGER);
Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.Entities.EVOLVED_ZOMBIE), EVOLVED_ZOMBIE);
Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.MOD_ID, Constants.Entities.EVOLVED_CREEPER), EVOLVED_CREEPER);
Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.Entities.T1_ROCKET), ROCKET_T1);
Registry.register(Registry.ENTITY_TYPE, new Identifier(Constants.Entities.BUBBLE), BUBBLE);
=======
>>>>>>> |
<<<<<<<
if (status != CircuitFabricatorStatus.INACTIVE && isValidRecipe(this.inventory.getInvStack(5))) {
if (canPutStackInResultSlot(getResultFromRecipe())) {
this.status = CircuitFabricatorStatus.ACTIVE;
=======
if (isValidRecipe(this.inventory.getInvStack(5))) {
if (canPutStackInResultSlot(getResultFromRecipeStack())) {
this.status = CircuitFabricatorStatus.PROCESSING;
>>>>>>>
if (isValidRecipe(this.inventory.getInvStack(5))) {
if (canPutStackInResultSlot(getResultFromRecipeStack())) {
this.status = CircuitFabricatorStatus.PROCESSING;
<<<<<<<
if (status == CircuitFabricatorStatus.ACTIVE) {
ItemStack resultStack = getResultFromRecipe();
=======
if (status == CircuitFabricatorStatus.PROCESSING) {
ItemStack resultStack = getResultFromRecipeStack();
>>>>>>>
if (status == CircuitFabricatorStatus.PROCESSING) {
ItemStack resultStack = getResultFromRecipeStack();
<<<<<<<
System.out.println("Finished crafting an item.");
progress = 0;
=======
this.progress = 0;
>>>>>>>
System.out.println("Finished crafting an item.");
this.progress = 0; |
<<<<<<<
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.ChatFormat;
=======
import net.fabricmc.fabric.api.container.ContainerFactory;
>>>>>>>
import com.mojang.blaze3d.platform.GlStateManager;
import net.fabricmc.fabric.api.container.ContainerFactory;
<<<<<<<
public class OxygenCollectorScreen extends MachineContainerScreen {
=======
public class OxygenCollectorScreen extends MachineContainerScreen<OxygenCollectorContainer> {
public static final ContainerFactory<AbstractContainerScreen> FACTORY = createFactory(OxygenCollectorBlockEntity.class, OxygenCollectorScreen::new);
>>>>>>>
public class OxygenCollectorScreen extends MachineContainerScreen<OxygenCollectorContainer> {
public static final ContainerFactory<AbstractContainerScreen> FACTORY = createFactory(OxygenCollectorBlockEntity.class, OxygenCollectorScreen::new);
<<<<<<<
public OxygenCollectorScreen(int syncId, BlockPos blockPos, PlayerEntity playerEntity) {
super(new OxygenCollectorContainer(syncId, blockPos, playerEntity), playerEntity.inventory, playerEntity.world, blockPos, new TranslatableComponent("ui.galacticraft-rewoven.oxygen_collector.name"));
this.blockPos = blockPos;
=======
public OxygenCollectorScreen(int syncId, PlayerEntity playerEntity, OxygenCollectorBlockEntity blockEntity) {
super(new OxygenCollectorContainer(syncId, playerEntity, blockEntity), playerEntity.inventory, new TranslatableText("ui.galacticraft-rewoven.oxygen_collector.name"));
>>>>>>>
public OxygenCollectorScreen(int syncId, PlayerEntity playerEntity, OxygenCollectorBlockEntity blockEntity) {
super(new OxygenCollectorContainer(syncId, playerEntity, blockEntity), playerEntity.inventory, playerEntity.world, blockEntity.getPos(), new TranslatableText("ui.galacticraft-rewoven.oxygen_collector.name"));
<<<<<<<
=======
public void drawConfigTabs() {
this.minecraft.getTextureManager().bindTexture(CONFIG_TABS);
this.blit(this.left - CONFIG_TAB_WIDTH, this.top + 3, CONFIG_TAB_X, CONFIG_TAB_Y, CONFIG_TAB_WIDTH, CONFIG_TAB_HEIGHT);
}
>>>>>>> |
<<<<<<<
import com.hrznstudio.galacticraft.api.block.entity.ConfigurableElectricMachineBlockEntity;
import com.hrznstudio.galacticraft.api.configurable.SideOption;
=======
import alexiil.mc.lib.attributes.item.filter.ConstantItemFilter;
import alexiil.mc.lib.attributes.item.filter.ExactItemFilter;
import alexiil.mc.lib.attributes.item.filter.ItemFilter;
import com.hrznstudio.galacticraft.api.configurable.SideOptions;
import com.hrznstudio.galacticraft.blocks.machines.MachineBlockEntity;
>>>>>>>
import alexiil.mc.lib.attributes.item.filter.ConstantItemFilter;
import alexiil.mc.lib.attributes.item.filter.ExactItemFilter;
import alexiil.mc.lib.attributes.item.filter.ItemFilter;
import com.hrznstudio.galacticraft.api.block.entity.ConfigurableElectricMachineBlockEntity;
import com.hrznstudio.galacticraft.api.configurable.SideOption;
<<<<<<<
public class CircuitFabricatorBlockEntity extends ConfigurableElectricMachineBlockEntity implements Tickable {
public final Item[] mandatoryMaterials = new Item[]{Items.DIAMOND, GalacticraftItems.RAW_SILICON, GalacticraftItems.RAW_SILICON, Items.REDSTONE};
=======
public class CircuitFabricatorBlockEntity extends MachineBlockEntity implements Tickable {
private static final Item[] mandatoryMaterials = new Item[]{Items.DIAMOND, GalacticraftItems.RAW_SILICON, GalacticraftItems.RAW_SILICON, Items.REDSTONE};
private static final ItemFilter[] SLOT_FILTERS;
static {
SLOT_FILTERS = new ItemFilter[7];
SLOT_FILTERS[0] = GalacticraftEnergy.ENERGY_HOLDER_ITEM_FILTER;
SLOT_FILTERS[1] = new ExactItemFilter(mandatoryMaterials[0]);
SLOT_FILTERS[2] = new ExactItemFilter(mandatoryMaterials[1]);
SLOT_FILTERS[3] = new ExactItemFilter(mandatoryMaterials[2]);
SLOT_FILTERS[4] = new ExactItemFilter(mandatoryMaterials[3]);
SLOT_FILTERS[5] = null;// This is filled in by #getFilterForSlot
SLOT_FILTERS[6] = ConstantItemFilter.ANYTHING;
}
>>>>>>>
public class CircuitFabricatorBlockEntity extends ConfigurableElectricMachineBlockEntity implements Tickable {
private static final Item[] mandatoryMaterials = new Item[]{Items.DIAMOND, GalacticraftItems.RAW_SILICON, GalacticraftItems.RAW_SILICON, Items.REDSTONE};
private static final ItemFilter[] SLOT_FILTERS;
static {
SLOT_FILTERS = new ItemFilter[7];
SLOT_FILTERS[0] = GalacticraftEnergy.ENERGY_HOLDER_ITEM_FILTER;
SLOT_FILTERS[1] = new ExactItemFilter(mandatoryMaterials[0]);
SLOT_FILTERS[2] = new ExactItemFilter(mandatoryMaterials[1]);
SLOT_FILTERS[3] = new ExactItemFilter(mandatoryMaterials[2]);
SLOT_FILTERS[4] = new ExactItemFilter(mandatoryMaterials[3]);
SLOT_FILTERS[5] = null;// This is filled in by #getFilterForSlot
SLOT_FILTERS[6] = ConstantItemFilter.ANYTHING;
}
<<<<<<<
public SideOption[] sideOptions = {SideOption.BLANK, SideOption.POWER_INPUT};
public Map<Direction, SideOption> selectedOptions = BlockOptionUtils.getDefaultSideOptions();
private int progress;
=======
public SideOptions[] sideOptions = {SideOptions.BLANK, SideOptions.POWER_INPUT};
public Map<Direction, SideOptions> selectedOptions = BlockOptionUtils.getDefaultSideOptions();
int progress;
>>>>>>>
public SideOption[] sideOptions = {SideOption.BLANK, SideOption.POWER_INPUT};
public Map<Direction, SideOption> selectedOptions = BlockOptionUtils.getDefaultSideOptions();
int progress;
<<<<<<<
selectedOptions.put(Direction.SOUTH, SideOption.POWER_INPUT);
=======
selectedOptions.put(Direction.SOUTH, SideOptions.POWER_INPUT);
// Stop automation from inserting into the output or extracting from the inputs.
getLimitedInventory().getSubRule(1, 6).disallowExtraction();
getLimitedInventory().getRule(6).filterInserts(ConstantItemFilter.NOTHING);
>>>>>>>
selectedOptions.put(Direction.SOUTH, SideOption.POWER_INPUT);
// Stop automation from inserting into the output or extracting from the inputs.
getLimitedInventory().getSubRule(1, 6).disallowExtraction();
getLimitedInventory().getRule(6).filterInserts(ConstantItemFilter.NOTHING);
<<<<<<<
public void tick() {
if (!this.isActive()) {
return;
}
int prev = getEnergy().getCurrentEnergy();
=======
protected ItemFilter getFilterForSlot(int slot) {
if (slot == 5) {
return this::isValidRecipe;
}
return SLOT_FILTERS[slot];
}
>>>>>>>
protected ItemFilter getFilterForSlot(int slot) {
if (slot == 5) {
return this::isValidRecipe;
}
return SLOT_FILTERS[slot];
}
<<<<<<<
if (selectedOptions.get(direction).equals(SideOption.POWER_INPUT)) {
EnergyAttribute energyAttribute = getNeighborAttribute(EnergyAttribute.ENERGY_ATTRIBUTE, direction);
=======
if (selectedOptions.get(direction).equals(SideOptions.POWER_INPUT)) {
EnergyAttribute energyAttribute = EnergyAttribute.ENERGY_ATTRIBUTE.getFirstFromNeighbour(this, direction);
>>>>>>>
if (selectedOptions.get(direction).equals(SideOption.POWER_INPUT)) {
EnergyAttribute energyAttribute = EnergyAttribute.ENERGY_ATTRIBUTE.getFirstFromNeighbour(this, direction); |
<<<<<<<
public void appendProperties(StateManager.Builder<Block, BlockState> stateBuilder) {
=======
public boolean consumesFluids() {
return true;
}
@Override
public boolean generatesFluids() {
return true;
}
@Override
public void appendProperties(StateFactory.Builder<Block, BlockState> stateBuilder) {
>>>>>>>
public boolean consumesFluids() {
return true;
}
@Override
public boolean generatesFluids() {
return true;
}
@Override
public void appendProperties(StateManager.Builder<Block, BlockState> stateBuilder) { |
<<<<<<<
import io.github.teamgalacticraft.galacticraft.blocks.machines.circuitfabricator.CircuitFabricatorContainer;
=======
import io.github.teamgalacticraft.galacticraft.blocks.machines.basicsolarpanel.BasicSolarPanelContainer;
>>>>>>>
import io.github.teamgalacticraft.galacticraft.blocks.machines.circuitfabricator.CircuitFabricatorContainer;
import io.github.teamgalacticraft.galacticraft.blocks.machines.basicsolarpanel.BasicSolarPanelContainer;
<<<<<<<
public static final Identifier CIRCUIT_FABRICATOR_CONTAINER = new Identifier(Constants.MOD_ID, Constants.Container.CIRCUIT_FABRICATOR_CONTAINER);
=======
public static final Identifier BASIC_SOLAR_PANEL_CONTAINER = new Identifier(Constants.MOD_ID, Constants.Container.BASIC_SOLAR_PANEL_CONTAINER);
>>>>>>>
public static final Identifier BASIC_SOLAR_PANEL_CONTAINER = new Identifier(Constants.MOD_ID, Constants.Container.BASIC_SOLAR_PANEL_CONTAINER);
public static final Identifier CIRCUIT_FABRICATOR_CONTAINER = new Identifier(Constants.MOD_ID, Constants.Container.CIRCUIT_FABRICATOR_CONTAINER);
<<<<<<<
ContainerProviderRegistry.INSTANCE.registerFactory(CIRCUIT_FABRICATOR_CONTAINER, (syncId, id, playerEntity, buf) -> new CircuitFabricatorContainer(syncId, buf.readBlockPos(), playerEntity));
=======
ContainerProviderRegistry.INSTANCE.registerFactory(BASIC_SOLAR_PANEL_CONTAINER, (syncId, id, player, buf) -> new BasicSolarPanelContainer(syncId, buf.readBlockPos(), player));
>>>>>>>
ContainerProviderRegistry.INSTANCE.registerFactory(CIRCUIT_FABRICATOR_CONTAINER, (syncId, id, playerEntity, buf) -> new CircuitFabricatorContainer(syncId, buf.readBlockPos(), playerEntity));
ContainerProviderRegistry.INSTANCE.registerFactory(BASIC_SOLAR_PANEL_CONTAINER, (syncId, id, player, buf) -> new BasicSolarPanelContainer(syncId, buf.readBlockPos(), player)); |
<<<<<<<
import io.micronaut.http.client.annotation.Client;
=======
import io.micronaut.http.annotation.QueryValue;
import io.micronaut.http.client.Client;
>>>>>>>
import io.micronaut.http.client.annotation.Client;
import io.micronaut.http.annotation.QueryValue; |
<<<<<<<
public final TrajectoriesHack trajectoriesHack = new TrajectoriesHack();
// public final TriggerBotHack triggerBotHack = new TriggerBotHack();
=======
// public final TrajectoriesHack trajectoriesHack = new TrajectoriesHack();
public final TriggerBotHack triggerBotHack = new TriggerBotHack();
>>>>>>>
public final TrajectoriesHack trajectoriesHack = new TrajectoriesHack();
public final TriggerBotHack triggerBotHack = new TriggerBotHack(); |
<<<<<<<
import voldemort.store.routed.RoutableStore;
import voldemort.store.socket.SocketDestination;
import voldemort.store.socket.SocketPool;
import voldemort.store.socket.SocketStore;
=======
import voldemort.store.routed.RoutedStore;
import voldemort.store.socket.SocketStoreFactory;
>>>>>>>
import voldemort.store.routed.RoutableStore;
import voldemort.store.socket.SocketStoreFactory;
<<<<<<<
private final SocketPool socketPool;
private RoutableStore routableStore;
=======
private final SocketStoreFactory storeFactory;
private RoutedStore routedStore;
>>>>>>>
private final RoutableStore routableStore;
private final SocketStoreFactory storeFactory;
<<<<<<<
SocketPool socketPool,
RoutableStore routableStore) {
super(routableStore);
=======
SocketStoreFactory storeFactory,
RoutedStore routedStore) {
super(routedStore);
>>>>>>>
RoutableStore routableStore,
SocketStoreFactory storeFactory) {
super(routableStore);
<<<<<<<
this.socketPool = socketPool;
this.routableStore = routableStore;
=======
this.storeFactory = storeFactory;
this.routedStore = routedStore;
>>>>>>>
this.routableStore = routableStore;
this.storeFactory = storeFactory; |
<<<<<<<
public static final String VERSION = "7.7";
public static final String MC_VERSION = "1.16.3";
=======
public static final String VERSION = "7.6.2";
public static final String MC_VERSION = "1.16.4";
>>>>>>>
public static final String VERSION = "7.7";
public static final String MC_VERSION = "1.16.4"; |
<<<<<<<
public static final String VERSION = "7.0pre11";
public static final String MC_VERSION = "19w42a";
=======
public static final String VERSION = "7.0pre12";
public static final String MC_VERSION = "1.14.4";
>>>>>>>
public static final String VERSION = "7.0pre12";
public static final String MC_VERSION = "19w42a"; |
<<<<<<<
import org.wordpress.android.util.ShortcodeUtils;
=======
import org.wordpress.android.util.ProfilingUtils;
>>>>>>>
import org.wordpress.android.util.ProfilingUtils;
import org.wordpress.android.util.ShortcodeUtils; |
<<<<<<<
public void onVideoPressInfoRequested(String videoId) {
}
@Override
=======
public String onAuthHeaderRequested(String url) {
return "";
}
@Override
>>>>>>>
public void onVideoPressInfoRequested(String videoId) {
}
@Override
public String onAuthHeaderRequested(String url) {
return "";
}
@Override |
<<<<<<<
MediaType mediaType = mUploadingMedia.get(mediaId);
switch (mediaType) {
case IMAGE:
mWebView.execJavaScriptFromString("ZSSEditor.markImageUploadFailed(" + mediaId + ");");
break;
case VIDEO:
mWebView.execJavaScriptFromString("ZSSEditor.markVideoUploadFailed(" + mediaId + ");");
}
=======
mWebView.execJavaScriptFromString("ZSSEditor.markImageUploadFailed(" + mediaId + ", '"
+ errorMessage.replace("'", "\\'").replace("\"", "\\\"") + "');");
>>>>>>>
MediaType mediaType = mUploadingMedia.get(mediaId);
switch (mediaType) {
case IMAGE:
mWebView.execJavaScriptFromString("ZSSEditor.markImageUploadFailed(" + mediaId + ", '"
+ errorMessage.replace("'", "\\'").replace("\"", "\\\"") + "');");
break;
case VIDEO:
mWebView.execJavaScriptFromString("ZSSEditor.markVideoUploadFailed(" + mediaId + ", '"
+ errorMessage.replace("'", "\\'").replace("\"", "\\\"") + "');");
}
<<<<<<<
mWebView.execJavaScriptFromString("ZSSEditor.markAllUploadingMediaAsFailed();");
=======
mWebView.execJavaScriptFromString("ZSSEditor.markAllUploadingImagesAsFailed('"
+ getString(R.string.tap_to_try_again) + "');");
>>>>>>>
mWebView.execJavaScriptFromString("ZSSEditor.markAllUploadingMediaAsFailed('"
+ getString(R.string.tap_to_try_again) + "');"); |
<<<<<<<
private boolean mHideActionBarOnSoftKeyboardUp;
private Set<String> mUploadingMediaIds;
=======
private boolean mIsKeyboardOpen = false;
private boolean mEditorWasPaused = false;
private boolean mHideActionBarOnSoftKeyboardUp = false;
>>>>>>>
private boolean mIsKeyboardOpen = false;
private boolean mEditorWasPaused = false;
private boolean mHideActionBarOnSoftKeyboardUp = false;
private Set<String> mUploadingMediaIds; |
<<<<<<<
import org.apache.http.entity.ContentType;
=======
import com.mashape.unirest.request.HttpRequest;
import org.apache.commons.io.IOUtils;
>>>>>>>
import org.apache.commons.io.IOUtils;
import org.apache.http.entity.ContentType;
<<<<<<<
@Test
public void testObjectMapper() throws UnirestException, IOException {
final String responseJson = "{\"locale\": \"english\"}";
Unirest.setObjectMapper(new ObjectMapper() {
public Object readValue(String ignored) {
return Locale.ENGLISH;
}
public String writeValue(Object ignored) {
return responseJson;
}
});
HttpResponse<Locale> getResponse = Unirest.get("http://httpbin.org/get").asObject(Locale.class);
assertEquals(200, getResponse.getStatus());
assertEquals(getResponse.getBody(), Locale.ENGLISH);
HttpResponse<JsonNode> postResponse = Unirest.post("http://httpbin.org/post")
.header("accept", "application/json")
.header("Content-Type", "application/json")
.body(Locale.ENGLISH)
.asJson();
assertEquals(200, postResponse.getStatus());
assertEquals(postResponse.getBody().getObject().getString("data"), responseJson);
}
=======
@Test
public void testPostProvidesSortedParams() throws IOException {
// Verify that fields are encoded into the body in sorted order.
HttpRequest httpRequest = Unirest.post("test")
.field("z", "Z")
.field("y", "Y")
.field("x", "X")
.getHttpRequest();
InputStream content = httpRequest.getBody().getEntity().getContent();
String body = IOUtils.toString(content, "UTF-8");
assertEquals("x=X&y=Y&z=Z", body);
}
>>>>>>>
@Test
public void testObjectMapper() throws UnirestException, IOException {
final String responseJson = "{\"locale\": \"english\"}";
Unirest.setObjectMapper(new ObjectMapper() {
public Object readValue(String ignored) {
return Locale.ENGLISH;
}
public String writeValue(Object ignored) {
return responseJson;
}
});
HttpResponse<Locale> getResponse = Unirest.get("http://httpbin.org/get").asObject(Locale.class);
assertEquals(200, getResponse.getStatus());
assertEquals(getResponse.getBody(), Locale.ENGLISH);
HttpResponse<JsonNode> postResponse = Unirest.post("http://httpbin.org/post")
.header("accept", "application/json")
.header("Content-Type", "application/json")
.body(Locale.ENGLISH)
.asJson();
assertEquals(200, postResponse.getStatus());
assertEquals(postResponse.getBody().getObject().getString("data"), responseJson);
}
@Test
public void testPostProvidesSortedParams() throws IOException {
// Verify that fields are encoded into the body in sorted order.
HttpRequest httpRequest = Unirest.post("test")
.field("z", "Z")
.field("y", "Y")
.field("x", "X")
.getHttpRequest();
InputStream content = httpRequest.getBody().getEntity().getContent();
String body = IOUtils.toString(content, "UTF-8");
assertEquals("x=X&y=Y&z=Z", body);
} |
<<<<<<<
=======
import voldemort.store.slop.HintedHandoffStrategyType;
import voldemort.store.views.View;
>>>>>>>
import voldemort.store.slop.HintedHandoffStrategyType; |
<<<<<<<
import com.speedment.runtime.annotation.Api;
=======
>>>>>>> |
<<<<<<<
=======
import static com.speedment.internal.util.document.DocumentUtil.toStringHelper;
import com.speedment.internal.ui.property.PreviewPropertyItem;
import static com.speedment.internal.util.JavaLanguage.javaTypeName;
>>>>>>>
import static com.speedment.internal.util.document.DocumentUtil.toStringHelper; |
<<<<<<<
import com.speedment.runtime.annotation.Api;
=======
>>>>>>> |
<<<<<<<
StoreDefinition storeDef = new StoreDefinitionBuilder().setName("test")
.setType(ReadOnlyStorageConfiguration.TYPE_NAME)
.setKeySerializer(serDef)
.setValueSerializer(serDef)
.setRoutingPolicy(RoutingTier.CLIENT)
.setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
.setReplicationFactor(repFactor)
.setPreferredReads(1)
.setRequiredReads(1)
.setPreferredWrites(1)
.setRequiredWrites(1)
.build();
RoutingStrategy router = new RoutingStrategyFactory(cluster).getRoutingStrategy(storeDef);
=======
StoreDefinition storeDef = new StoreDefinition("test",
ReadOnlyStorageConfiguration.TYPE_NAME,
serDef,
serDef,
RoutingTier.CLIENT,
RoutingStrategyType.CONSISTENT_STRATEGY,
repFactor,
1,
1,
1,
1,
1,
1);
RoutingStrategy router = new RoutingStrategyFactory().updateRoutingStrategy(storeDef,
cluster);
>>>>>>>
StoreDefinition storeDef = new StoreDefinitionBuilder().setName("test")
.setType(ReadOnlyStorageConfiguration.TYPE_NAME)
.setKeySerializer(serDef)
.setValueSerializer(serDef)
.setRoutingPolicy(RoutingTier.CLIENT)
.setRoutingStrategyType(RoutingStrategyType.CONSISTENT_STRATEGY)
.setReplicationFactor(repFactor)
.setPreferredReads(1)
.setRequiredReads(1)
.setPreferredWrites(1)
.setRequiredWrites(1)
.build();
RoutingStrategy router = new RoutingStrategyFactory().updateRoutingStrategy(storeDef,
cluster); |
<<<<<<<
@Override
public Type getType() {
return Type.CLASS;
}
=======
public Package_ getPagage() {
return pagage;
}
public void setPagage(Package_ pagage) {
this.pagage = pagage;
}
>>>>>>>
@Override
public Type getType() {
return Type.CLASS;
}
public Package_ getPagage() {
return pagage;
}
public void setPagage(Package_ pagage) {
this.pagage = pagage;
} |
<<<<<<<
import com.speedment.runtime.annotation.Api;
=======
>>>>>>> |
<<<<<<<
/**
* Returns a path to the icon to use for this node in the GUI. If empty, the
* gui will attempt to load one of the predefined icons. Make sure that any
* returned path exists in the context the application is running in!
*
* @return the path to the icon to load or empty to use a predefined one
*/
default Optional<String> getIconPath() {
return Optional.empty();
}
/**
* Returns the name that should be used to describe this node in persisted
* files. This is almost always the same as the interface simple name, but
* in the case of anonymous nodes this value might need to be specified
* explicitly.
*
* @return the node type name
*/
default String nodeTypeName() {
return getInterfaceMainClass().getSimpleName();
}
=======
/**
* Returns if this node is immutable. (i.e. can never change its internal
* state). This can be used to optimize model dependant classes.
*
* @return if this node is immutable
*/
boolean isImmutable();
>>>>>>>
/**
* Returns a path to the icon to use for this node in the GUI. If empty, the
* gui will attempt to load one of the predefined icons. Make sure that any
* returned path exists in the context the application is running in!
*
* @return the path to the icon to load or empty to use a predefined one
*/
default Optional<String> getIconPath() {
return Optional.empty();
}
/**
* Returns the name that should be used to describe this node in persisted
* files. This is almost always the same as the interface simple name, but
* in the case of anonymous nodes this value might need to be specified
* explicitly.
*
* @return the node type name
*/
default String nodeTypeName() {
return getInterfaceMainClass().getSimpleName();
}
/**
* Returns if this node is immutable. (i.e. can never change its internal
* state). This can be used to optimize model dependant classes.
*
* @return if this node is immutable
*/
boolean isImmutable(); |
<<<<<<<
import com.speedment.runtime.annotation.Api;
=======
>>>>>>> |
<<<<<<<
@Override
public Type getType() {
return Type.FIELD;
}
=======
public Type_ getType_() {
return type_;
}
public void setType_(Type_ type_) {
this.type_ = type_;
}
>>>>>>>
@Override
public Type getType() {
return Type.FIELD;
}
public Type_ getType_() {
return type_;
}
public void setType_(Type_ type_) {
this.type_ = type_;
} |
<<<<<<<
import com.speedment.common.injector.annotation.InjectKey;
import com.speedment.runtime.annotation.Api;
=======
>>>>>>>
import com.speedment.common.injector.annotation.InjectKey; |
<<<<<<<
import com.speedment.internal.core.field2.ComparableFieldImpl;
import com.speedment.internal.core.field2.ComparableForeignKeyFieldImpl;
import com.speedment.internal.core.field2.StringForeignKeyFieldImpl;
import com.speedment.internal.core.field2.StringFieldImpl;
import com.speedment.internal.core.field2.ReferenceFieldImpl;
import com.speedment.internal.core.field2.ReferenceForeignKeyFieldImpl;
import com.speedment.internal.core.field.encoder.JsonEncoder;
=======
import com.speedment.internal.core.field.ReferenceComparableFieldImpl;
import com.speedment.internal.core.field.ReferenceComparableForeignKeyFieldImpl;
import com.speedment.internal.core.field.ReferenceComparableForeignKeyStringFieldImpl;
import com.speedment.internal.core.field.ReferenceComparableStringFieldImpl;
import com.speedment.internal.core.field.ReferenceFieldImpl;
import com.speedment.internal.core.field.ReferenceForeignKeyFieldImpl;
import com.speedment.field.encoder.JsonEncoder;
>>>>>>>
import com.speedment.internal.core.field2.ComparableFieldImpl;
import com.speedment.internal.core.field2.ComparableForeignKeyFieldImpl;
import com.speedment.internal.core.field2.StringForeignKeyFieldImpl;
import com.speedment.internal.core.field2.StringFieldImpl;
import com.speedment.internal.core.field2.ReferenceFieldImpl;
import com.speedment.internal.core.field2.ReferenceForeignKeyFieldImpl; |
<<<<<<<
import java.util.function.Function;
=======
import com.speedment.core.field.reference.Getter;
import com.speedment.core.field.reference.Setter;
import java.util.function.Supplier;
>>>>>>>
import com.speedment.core.field.reference.Getter;
import com.speedment.core.field.reference.Setter;
<<<<<<<
public StringReferenceField(String columnName, Function<ENTITY, String> getter) {
super(columnName, getter);
=======
public StringReferenceField(final Supplier<Column> columnSupplier, Getter<ENTITY, String> getter, Setter<ENTITY, String> setter) {
super(columnSupplier, getter, setter);
>>>>>>>
public StringReferenceField(String columnName, Getter<ENTITY, String> getter, Setter<ENTITY, String> setter) {
super(columnName, getter, setter); |
<<<<<<<
import javax.management.MBeanServer;
import javax.management.ObjectName;
=======
>>>>>>>
import javax.management.MBeanServer;
import javax.management.ObjectName;
<<<<<<<
=======
import voldemort.versioning.VectorClockInconsistencyResolver;
>>>>>>>
import voldemort.versioning.VectorClockInconsistencyResolver;
<<<<<<<
if(voldemortConfig.isJmxEnabled()) {
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName name = JmxUtils.createObjectName(JmxUtils.getPackageName(store.getClass()),
store.getName());
if(mbeanServer.isRegistered(name))
JmxUtils.unregisterMbean(mbeanServer, name);
JmxUtils.registerMbean(mbeanServer, JmxUtils.createModelMBean(store), name);
}
=======
if(voldemortConfig.isJmxEnabled())
JmxUtils.registerMbean(store.getName(), store);
>>>>>>>
if(voldemortConfig.isJmxEnabled()) {
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName name = JmxUtils.createObjectName(JmxUtils.getPackageName(store.getClass()),
store.getName());
if(mbeanServer.isRegistered(name))
JmxUtils.unregisterMbean(mbeanServer, name);
JmxUtils.registerMbean(mbeanServer, JmxUtils.createModelMBean(store), name);
} |
<<<<<<<
import com.speedment.common.injector.annotation.InjectKey;
import com.speedment.runtime.annotation.Api;
=======
>>>>>>>
import com.speedment.common.injector.annotation.InjectKey; |
<<<<<<<
editors.getUiVisibleProperties( treeItem.getValue() )
=======
final DocumentProperty property = treeItem.getValue();
@SuppressWarnings("unchecked")
final HasNameProperty withName = (HasNameProperty) property;
workspace.textProperty().bind(
Bindings.createStringBinding(() -> String.format(
"Editing %s '%s'",
withName.mainInterface().getSimpleName(),
withName.getName()
), withName.nameProperty())
);
treeItem.getValue()
.getUiVisibleProperties(speedment)
>>>>>>>
final DocumentProperty property = treeItem.getValue();
@SuppressWarnings("unchecked")
final HasNameProperty withName = (HasNameProperty) property;
workspace.textProperty().bind(
Bindings.createStringBinding(() -> String.format(
"Editing %s '%s'",
withName.mainInterface().getSimpleName(),
withName.getName()
), withName.nameProperty())
);
editors.getUiVisibleProperties( treeItem.getValue() ) |
<<<<<<<
import com.speedment.common.injector.annotation.InjectKey;
import com.speedment.runtime.annotation.Api;
=======
>>>>>>>
import com.speedment.common.injector.annotation.InjectKey; |
<<<<<<<
import com.speedment.common.injector.annotation.InjectKey;
import com.speedment.runtime.annotation.Api;
=======
>>>>>>>
import com.speedment.common.injector.annotation.InjectKey; |
<<<<<<<
default Table newTable() {
return tableConstructor().apply(this, newDocument(this, TABLES));
}
BiFunction<Schema, Map<String, Object>, Table> tableConstructor();
=======
Table newTable(Map<String, Object> data);
@Override
default Class<Schema> mainInterface() {
return Schema.class;
}
>>>>>>>
default Table newTable() {
return tableConstructor().apply(this, newDocument(this, TABLES));
}
BiFunction<Schema, Map<String, Object>, Table> tableConstructor();
@Override
default Class<Schema> mainInterface() {
return Schema.class;
} |
<<<<<<<
import java.io.IOException;
import java.util.ArrayList;
=======
>>>>>>>
import java.io.IOException;
import java.util.ArrayList;
<<<<<<<
import org.lateralgm.main.Prefs;
=======
import org.lateralgm.main.Util;
>>>>>>>
import org.lateralgm.main.Prefs;
import org.lateralgm.main.Util;
<<<<<<<
import org.lateralgm.resources.library.LibAction;
import org.lateralgm.resources.library.LibManager;
import org.lateralgm.resources.sub.Action;
import org.lateralgm.resources.sub.Argument;
=======
>>>>>>>
import org.lateralgm.resources.library.LibAction;
import org.lateralgm.resources.library.LibManager;
import org.lateralgm.resources.sub.Action;
import org.lateralgm.resources.sub.Argument; |
<<<<<<<
import java.util.HashMap;
=======
import java.io.Writer;
import java.util.ArrayList;
import java.util.Date;
>>>>>>>
import java.io.Writer;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
<<<<<<<
parser.accepts("verify-metadata-version",
"Verify the version of Metadata on all the cluster nodes");
parser.accepts("synchronize-metadata-version",
"Synchronize the metadata versions across all the nodes.");
=======
parser.accepts("reserve-memory", "Memory in MB to reserve for the store")
.withRequiredArg()
.describedAs("size-in-mb")
.ofType(Long.class);
parser.accepts("query-keys", "Get values of keys on specific nodes")
.withRequiredArg()
.describedAs("query-keys")
.withValuesSeparatedBy(',')
.ofType(String.class);
>>>>>>>
parser.accepts("verify-metadata-version",
"Verify the version of Metadata on all the cluster nodes");
parser.accepts("synchronize-metadata-version",
"Synchronize the metadata versions across all the nodes.");
parser.accepts("reserve-memory", "Memory in MB to reserve for the store")
.withRequiredArg()
.describedAs("size-in-mb")
.ofType(Long.class);
parser.accepts("query-keys", "Get values of keys on specific nodes")
.withRequiredArg()
.describedAs("query-keys")
.withValuesSeparatedBy(',')
.ofType(String.class);
<<<<<<<
|| options.has("async") || options.has("native-backup") || options.has("rollback") || options.has("verify-metadata-version"))) {
=======
|| options.has("async") || options.has("native-backup") || options.has("rollback") || options.has("reserve-memory"))) {
>>>>>>>
|| options.has("async") || options.has("native-backup") || options.has("rollback")
|| options.has("verify-metadata-version") || options.has("reserve-memory"))) {
<<<<<<<
if(options.has("synchronize-metadata-version")) {
ops += "z";
}
=======
if(options.has("reserve-memory")) {
if(!options.has("stores")) {
Utils.croak("Specify the list of stores to reserve memory");
}
ops += "f";
}
if(options.has("query-keys")) {
ops += "q";
}
>>>>>>>
if(options.has("synchronize-metadata-version")) {
ops += "z";
}
if(options.has("reserve-memory")) {
if(!options.has("stores")) {
Utils.croak("Specify the list of stores to reserve memory");
}
ops += "f";
}
if(options.has("query-keys")) {
ops += "q";
}
<<<<<<<
+ "repair-job, native-backup, verify-metadata-version) must be specified");
=======
+ "repair-job, native-backup, rollback, reserve-memory) must be specified");
>>>>>>>
+ "repair-job, native-backup, rollback, reserve-memory, verify-metadata-version) must be specified");
<<<<<<<
if(ops.contains("z")) {
synchronizeMetadataVersion(adminClient, nodeId);
}
=======
if(ops.contains("f")) {
long reserveMB = (Long) options.valueOf("reserve-memory");
adminClient.reserveMemory(nodeId, storeNames, reserveMB);
}
if(ops.contains("q")) {
List<String> keyList = (List<String>) options.valuesOf("query-keys");
if(storeNames == null || storeNames.size() == 0) {
throw new VoldemortException("Must specify store name using --stores option");
}
executeQueryKeys(nodeId, adminClient, storeNames, keyList);
}
>>>>>>>
if(ops.contains("z")) {
synchronizeMetadataVersion(adminClient, nodeId);
}
if(ops.contains("f")) {
long reserveMB = (Long) options.valueOf("reserve-memory");
adminClient.reserveMemory(nodeId, storeNames, reserveMB);
}
if(ops.contains("q")) {
List<String> keyList = (List<String>) options.valuesOf("query-keys");
if(storeNames == null || storeNames.size() == 0) {
throw new VoldemortException("Must specify store name using --stores option");
}
executeQueryKeys(nodeId, adminClient, storeNames, keyList);
} |
<<<<<<<
import org.lateralgm.subframes.PreferencesFrame;
=======
import org.lateralgm.subframes.ResourceFrame;
import org.lateralgm.subframes.ResourceFrame.ResourceFrameFactory;
>>>>>>>
import org.lateralgm.subframes.PreferencesFrame;
import org.lateralgm.subframes.ResourceFrame;
import org.lateralgm.subframes.ResourceFrame.ResourceFrameFactory; |
<<<<<<<
private final String proxyHost;
private final int proxyPort;
private boolean useLongLivedCreds;
private boolean useTempCreds;
=======
private final String awsAccessKey;
private final String awsSecretKey;
private final String credentials;
>>>>>>>
private final String proxyHost;
private final int proxyPort;
private final String awsAccessKey;
private final String awsSecretKey;
private final String credentials;
<<<<<<<
String excludes,
String proxyHost,
int proxyPort,
JSONObject tempCreds,
JSONObject longLivedCreds) {
=======
String excludes) {
>>>>>>>
String proxyHost,
int proxyPort,
String excludes) {
<<<<<<<
this.proxyHost = proxyHost;
this.proxyPort = proxyPort;
=======
this.credentials = credentials;
this.awsAccessKey = awsAccessKey;
this.awsSecretKey = awsSecretKey;
this.iamRoleArn = iamRoleArn;
>>>>>>>
this.proxyHost = proxyHost;
this.proxyPort = proxyPort;
this.credentials = credentials;
this.awsAccessKey = awsAccessKey;
this.awsSecretKey = awsSecretKey;
this.iamRoleArn = iamRoleArn;
<<<<<<<
AWSClients aws = new AWSClients(
=======
AWSClients aws;
if ("awsAccessKey".equals(credentials))
aws = new AWSClients(
this.region,
this.awsAccessKey,
this.awsSecretKey,
this.getDescriptor().getExternalId());
else
aws = new AWSClients(
>>>>>>>
AWSClients aws;
if ("awsAccessKey".equals(credentials)) {
if (StringUtils.isEmpty(this.awsAccessKey) && StringUtils.isEmpty(this.awsSecretKey)) {
aws = AWSClients.fromDefaultCredentialChain(
this.region,
this.proxyHost,
this.proxyPort);
} else {
aws = AWSClients.fromBasicCredentials(
this.region,
this.awsAccessKey,
this.awsSecretKey,
this.proxyHost,
this.proxyPort);
}
} else {
aws = AWSClients.fromIAMRole(
<<<<<<<
this.getDescriptor().getExternalId(),
this.proxyHost,
this.proxyPort
);
=======
this.getDescriptor().getExternalId());
>>>>>>>
this.getDescriptor().getExternalId(),
this.proxyHost,
this.proxyPort);
} |
<<<<<<<
void add(long hashCode) {
long h = hash64(hashCode);
int a = (int) (h >>> 32);
int b = (int) h;
final int arraysize = data.length;
=======
void add(long key) {
long hash = hash64(key);
int a = (int) (hash >>> 32);
int b = (int) hash;
>>>>>>>
void add(long key) {
long hash = hash64(key);
int a = (int) (hash >>> 32);
int b = (int) hash;
final int arraysize = data.length;
<<<<<<<
public boolean mayContain(long hashCode) {
long h = hash64(hashCode);
int a = (int) (h >>> 32);
int b = (int) h;
final int arraysize = data.length;
=======
public boolean mayContain(long key) {
long hash = hash64(key);
int a = (int) (hash >>> 32);
int b = (int) hash;
>>>>>>>
public boolean mayContain(long key) {
long hash = hash64(key);
int a = (int) (hash >>> 32);
int b = (int) hash;
final int arraysize = data.length; |
<<<<<<<
=======
import android.util.Log;
import com.teleca.jamendo.JamendoApplication;
>>>>>>>
import android.util.Log;
import com.teleca.jamendo.JamendoApplication;
<<<<<<<
try {
String jsonString = doGet("numalbum+id+name+duration+rating+url+stream/track/json/?album_id="+album.getId()+"&streamencoding="+encoding);
JSONArray jsonArrayTracks = new JSONArray(jsonString);
return TrackFunctions.getTracks(jsonArrayTracks, true);
} catch (NullPointerException e) {
e.printStackTrace();
throw new JSONException(e.getLocalizedMessage());
}
=======
String jsonString = doGet("numalbum+id+name+duration+rating+url+stream/track/json/?album_id="+album.getId()+"&streamencoding="+encoding);
JSONArray jsonArrayTracks = new JSONArray(jsonString);
return getTracks(jsonArrayTracks, true);
>>>>>>>
try {
String jsonString = doGet("numalbum+id+name+duration+rating+url+stream/track/json/?album_id="+album.getId()+"&streamencoding="+encoding);
JSONArray jsonArrayTracks = new JSONArray(jsonString);
return getTracks(jsonArrayTracks, true);
} catch (NullPointerException e) {
e.printStackTrace();
throw new JSONException(e.getLocalizedMessage());
}
<<<<<<<
try {
String jsonString = doGet("id+numalbum+name+duration+rating+url+stream/track/json/?streamencoding="+encoding+"&n="+id.length+"&id="+id_query);
JSONArray jsonArrayTracks = new JSONArray(jsonString);
return TrackFunctions.getTracks(jsonArrayTracks, false);
} catch (NullPointerException e) {
e.printStackTrace();
throw new JSONException(e.getLocalizedMessage());
}
=======
String jsonString = doGet("id+numalbum+name+duration+rating+url+stream/track/json/?streamencoding="+encoding+"&n="+id.length+"&id="+id_query);
JSONArray jsonArrayTracks = new JSONArray(jsonString);
return getTracks(jsonArrayTracks, false);
>>>>>>>
try {
String jsonString = doGet("id+numalbum+name+duration+rating+url+stream/track/json/?streamencoding="+encoding+"&n="+id.length+"&id="+id_query);
JSONArray jsonArrayTracks = new JSONArray(jsonString);
return getTracks(jsonArrayTracks, false);
} catch (NullPointerException e) {
e.printStackTrace();
throw new JSONException(e.getLocalizedMessage());
}
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
String jsonString = doGet("id+name+url+duration/playlist/json/playlist_user/?order=starred_desc&user_idstr="+user);
return PlaylistFunctions.getPlaylists(new JSONArray(jsonString));
>>>>>>>
<<<<<<<
try {
String jsonString = doGet("stream+name+duration+url+id+rating/track/json/?playlist_id="+playlistRemote.getId());
return TrackFunctions.getPlaylist(new JSONArray(jsonString));
} catch (NullPointerException e) {
e.printStackTrace();
throw new JSONException(e.getLocalizedMessage());
}
=======
String jsonString = doGet("stream+name+duration+url+id+rating/track/json/?playlist_id="+playlistRemote.getId());
JSONArray jsonArrayTracks = new JSONArray(jsonString);
int n = jsonArrayTracks.length();
Track[] tracks = new Track[n];
int[] tracks_id = new int[n];
TrackBuilder trackBuilder = new TrackBuilder();
// building tracks and getting tracks_id
for(int i=0; i < n; i++){
tracks[i] = trackBuilder.build(jsonArrayTracks.getJSONObject(i));
tracks_id[i] = tracks[i].getId();
}
Album[] albums = new JamendoGet2ApiImpl().getAlbumsByTracksId(tracks_id);
Log.i("jamendroid", ""+tracks.length+" tracks & "+albums.length+" albums");
return creatPlaylist(tracks, albums,tracks_id);
>>>>>>>
String jsonString = doGet("stream+name+duration+url+id+rating/track/json/?playlist_id="+playlistRemote.getId());
JSONArray jsonArrayTracks = new JSONArray(jsonString);
int n = jsonArrayTracks.length();
Track[] tracks = new Track[n];
int[] tracks_id = new int[n];
TrackBuilder trackBuilder = new TrackBuilder();
// building tracks and getting tracks_id
for(int i=0; i < n; i++){
tracks[i] = trackBuilder.build(jsonArrayTracks.getJSONObject(i));
tracks_id[i] = tracks[i].getId();
}
Album[] albums = new JamendoGet2ApiImpl().getAlbumsByTracksId(tracks_id);
Log.i("jamendroid", ""+tracks.length+" tracks & "+albums.length+" albums");
return createPlaylist(tracks, albums,tracks_id); |
<<<<<<<
import java.awt.*;
=======
import com.google.gson.JsonObject;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Frame;
>>>>>>>
import com.google.gson.JsonObject;
import java.awt.*;
<<<<<<<
import net.rptools.maptool.language.I18N;
=======
import net.rptools.maptool.client.functions.json.JSONMacroFunctions;
>>>>>>>
import net.rptools.maptool.client.functions.json.JSONMacroFunctions;
import net.rptools.maptool.language.I18N; |
<<<<<<<
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.IOException;
import org.jetbrains.annotations.NotNull;
=======
>>>>>>>
import org.jetbrains.annotations.NotNull;
<<<<<<<
public @NotNull Object getTransferData(DataFlavor dataFlavor)
throws UnsupportedFlavorException, IOException {
=======
public Object getTransferData(DataFlavor dataFlavor) {
>>>>>>>
public @NotNull Object getTransferData(DataFlavor dataFlavor) { |
<<<<<<<
import net.rptools.maptool.client.functions.json.JSONMacroFunctions;
import net.rptools.maptool.client.functions.json.JsonArrayFunctions;
=======
import net.rptools.maptool.client.MapToolLineParser;
import net.rptools.maptool.client.MapToolVariableResolver;
>>>>>>>
import net.rptools.maptool.client.functions.json.JSONMacroFunctions;
import net.rptools.maptool.client.functions.json.JsonArrayFunctions;
import net.rptools.maptool.client.MapToolLineParser;
import net.rptools.maptool.client.MapToolVariableResolver;
<<<<<<<
JsonArray jsonArgs = FunctionUtil.paramAsJsonArray(functionName, args, 1);
List<Object> execArgs = jsonArrayFunctions.jsonArrayAsMTScriptList(jsonArgs);
=======
JSONArray jsonArgs = FunctionUtil.paramAsJsonArray(functionName, args, 1);
ArrayList<Object> execArgs = new ArrayList<Object>(jsonArgs);
>>>>>>>
JsonArray jsonArgs = FunctionUtil.paramAsJsonArray(functionName, args, 1);
List<Object> execArgs = jsonArrayFunctions.jsonArrayAsMTScriptList(jsonArgs); |
<<<<<<<
super(COMMENT, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(COMMENT, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(COMMENT, new ParameterList(), new Factory());
<<<<<<<
super(COMMENT, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(COMMENT, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(COMMENT, new ParameterList(), new Factory());
<<<<<<<
super(COMMENT, aList, new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(COMMENT, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(COMMENT, aList, new Factory()); |
<<<<<<<
super(RESOURCES, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(RESOURCES, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(RESOURCES, new ParameterList(), new Factory());
<<<<<<<
super(RESOURCES, aList, new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(RESOURCES, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(RESOURCES, aList, new Factory());
<<<<<<<
super(RESOURCES, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(RESOURCES, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(RESOURCES, new ParameterList(), new Factory());
<<<<<<<
super(RESOURCES, aList, new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(RESOURCES, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(RESOURCES, aList, new Factory()); |
<<<<<<<
super(DESCRIPTION, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(DESCRIPTION, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(DESCRIPTION, new ParameterList(), new Factory());
<<<<<<<
super(DESCRIPTION, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(DESCRIPTION, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(DESCRIPTION, new ParameterList(), new Factory());
<<<<<<<
super(DESCRIPTION, aList, new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(DESCRIPTION, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(DESCRIPTION, aList, new Factory()); |
<<<<<<<
super(TZNAME, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(TZNAME, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(TZNAME, new ParameterList(), new Factory());
<<<<<<<
super(TZNAME, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(TZNAME, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(TZNAME, new ParameterList(), new Factory());
<<<<<<<
super(TZNAME, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(TZNAME, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(TZNAME, aList, new Factory()); |
<<<<<<<
super(SUMMARY, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(SUMMARY, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(SUMMARY, new ParameterList(), new Factory());
<<<<<<<
super(SUMMARY, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE),
new Factory());
=======
super(SUMMARY, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(SUMMARY, new ParameterList(), new Factory());
<<<<<<<
super(SUMMARY, aList, new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE), new Factory());
=======
super(SUMMARY, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(SUMMARY, aList, new Factory()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.