conflict_resolution
stringlengths
27
16k
<<<<<<< @Test @Category(IntegrationTest.class) public void createPropertiesMetadataSucceeds() { final String key = "/testKey"; final String value = "testValue"; BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken()); Metadata md = new Metadata(); md.add(key, value); BoxFolder rootFolder = BoxFolder.getRootFolder(api); BoxFolder folder = rootFolder.createFolder("[createPropertiesMetadataSucceeds] Metadata Folder").getResource(); Metadata createdMD = folder.createMetadata(md); assertThat(createdMD.get(key), is(equalTo(value))); folder.delete(false); } @Test @Category(IntegrationTest.class) public void deletePropertiesMetadataSucceeds() { final String key = "/testKey"; final String value = "testValue"; BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken()); Metadata md = new Metadata(); md.add(key, value); BoxFolder rootFolder = BoxFolder.getRootFolder(api); BoxFolder folder = rootFolder.createFolder("[createPropertiesMetadataSucceeds] Metadata Folder").getResource(); folder.createMetadata(md); folder.deleteMetadata(); try { Metadata actualMD = folder.getMetadata(); fail(); } catch (BoxAPIException e) { assertThat(e.getResponseCode(), is(equalTo(404))); } finally { folder.delete(false); } } ======= /** * Verifies the fix for issue #325 */ @Test @Category(IntegrationTest.class) public void sharedLinkInfoHasEffectiveAccess() { BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken()); BoxFolder rootFolder = BoxFolder.getRootFolder(api); BoxFolder folder = rootFolder.createFolder("[sharedLinkInfoHasEffectiveAccess] Test Folder").getResource(); BoxSharedLink sharedLink = folder.createSharedLink(BoxSharedLink.Access.OPEN, null, null); assertThat(sharedLink, Matchers.<BoxSharedLink>hasProperty("effectiveAccess")); assertThat(sharedLink.getEffectiveAccess(), equalTo(BoxSharedLink.Access.OPEN)); folder.delete(true); } >>>>>>> @Test @Category(IntegrationTest.class) public void createPropertiesMetadataSucceeds() { final String key = "/testKey"; final String value = "testValue"; BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken()); Metadata md = new Metadata(); md.add(key, value); BoxFolder rootFolder = BoxFolder.getRootFolder(api); BoxFolder folder = rootFolder.createFolder("[createPropertiesMetadataSucceeds] Metadata Folder").getResource(); Metadata createdMD = folder.createMetadata(md); assertThat(createdMD.get(key), is(equalTo(value))); folder.delete(false); } @Test @Category(IntegrationTest.class) public void deletePropertiesMetadataSucceeds() { final String key = "/testKey"; final String value = "testValue"; BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken()); Metadata md = new Metadata(); md.add(key, value); BoxFolder rootFolder = BoxFolder.getRootFolder(api); BoxFolder folder = rootFolder.createFolder("[createPropertiesMetadataSucceeds] Metadata Folder").getResource(); folder.createMetadata(md); folder.deleteMetadata(); try { Metadata actualMD = folder.getMetadata(); fail(); } catch (BoxAPIException e) { assertThat(e.getResponseCode(), is(equalTo(404))); } finally { folder.delete(false); } } /** * Verifies the fix for issue #325 */ @Test @Category(IntegrationTest.class) public void sharedLinkInfoHasEffectiveAccess() { BoxAPIConnection api = new BoxAPIConnection(TestConfig.getAccessToken()); BoxFolder rootFolder = BoxFolder.getRootFolder(api); BoxFolder folder = rootFolder.createFolder("[sharedLinkInfoHasEffectiveAccess] Test Folder").getResource(); BoxSharedLink sharedLink = folder.createSharedLink(BoxSharedLink.Access.OPEN, null, null); assertThat(sharedLink, Matchers.<BoxSharedLink>hasProperty("effectiveAccess")); assertThat(sharedLink.getEffectiveAccess(), equalTo(BoxSharedLink.Access.OPEN)); folder.delete(true); }
<<<<<<< private static final URLTemplate UPLOAD_SESSION_URL_TEMPLATE = new URLTemplate("files/%s/upload-session"); private static final URLTemplate UPLOAD_SESSION_STATUS_URL_TEMPLATE = new URLTemplate( "files/upload-session/%s/status"); private static final URLTemplate ABORT_UPLOAD_SESSION_URL_TEMPLATE = new URLTemplate("files/upload-session/%s"); private static final int BUFFER_SIZE = 8192; ======= private static final URLTemplate ADD_COLLABORATION_URL = new URLTemplate("collaborations"); private static final URLTemplate GET_ALL_FILE_COLLABORATIONS_URL = new URLTemplate("files/%s/collaborations"); >>>>>>> private static final URLTemplate UPLOAD_SESSION_URL_TEMPLATE = new URLTemplate("files/%s/upload-session"); private static final URLTemplate UPLOAD_SESSION_STATUS_URL_TEMPLATE = new URLTemplate( "files/upload-session/%s/status"); private static final URLTemplate ABORT_UPLOAD_SESSION_URL_TEMPLATE = new URLTemplate("files/upload-session/%s"); private static final int BUFFER_SIZE = 8192; private static final URLTemplate ADD_COLLABORATION_URL = new URLTemplate("collaborations"); private static final URLTemplate GET_ALL_FILE_COLLABORATIONS_URL = new URLTemplate("files/%s/collaborations");
<<<<<<< getProvidersMethod = hadoopCredProviderFactoryClz.getMethod(HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, Configuration.class); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, e); ======= getProvidersMethod = hadoopCredProviderFactoryClz .getMethod(HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, Configuration.class); } catch (SecurityException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, e); return false; } catch (NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, e); >>>>>>> getProvidersMethod = hadoopCredProviderFactoryClz .getMethod(HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, Configuration.class); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, e); <<<<<<< getCredentialEntryMethod = hadoopCredProviderClz.getMethod(HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, String.class); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); ======= getCredentialEntryMethod = hadoopCredProviderClz .getMethod(HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, String.class); } catch (SecurityException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); return false; } catch (NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); >>>>>>> getCredentialEntryMethod = hadoopCredProviderClz .getMethod(HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, String.class); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); <<<<<<< getAliasesMethod = hadoopCredProviderClz.getMethod(HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); ======= getAliasesMethod = hadoopCredProviderClz .getMethod(HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME); } catch (SecurityException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); return false; } catch (NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); >>>>>>> getAliasesMethod = hadoopCredProviderClz .getMethod(HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); <<<<<<< createCredentialEntryMethod = hadoopCredProviderClz.getMethod(HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, String.class, char[].class); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); ======= createCredentialEntryMethod = hadoopCredProviderClz.getMethod( HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, String.class, char[].class); } catch (SecurityException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); return false; } catch (NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); >>>>>>> createCredentialEntryMethod = hadoopCredProviderClz.getMethod( HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, String.class, char[].class); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_CREATE_CREDENTIAL_ENTRY_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); <<<<<<< } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FLUSH_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); ======= } catch (SecurityException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FLUSH_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); return false; } catch (NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FLUSH_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); >>>>>>> } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_PROVIDER_FLUSH_METHOD_NAME, HADOOP_CRED_PROVIDER_CLASS_NAME, e); <<<<<<< getCredentialMethod = hadoopCredentialEntryClz.getMethod(HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME, HADOOP_CRED_ENTRY_CLASS_NAME, e); ======= getCredentialMethod = hadoopCredentialEntryClz .getMethod(HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME); } catch (SecurityException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME, HADOOP_CRED_ENTRY_CLASS_NAME, e); return false; } catch (NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME, HADOOP_CRED_ENTRY_CLASS_NAME, e); >>>>>>> getCredentialMethod = hadoopCredentialEntryClz .getMethod(HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME); } catch (SecurityException | NoSuchMethodException e) { log.trace("Could not find {} method on {}", HADOOP_CRED_ENTRY_GET_CREDENTIAL_METHOD_NAME, HADOOP_CRED_ENTRY_CLASS_NAME, e); <<<<<<< } catch (IllegalArgumentException | InvocationTargetException | IllegalAccessException e) { log.warn("Could not invoke {}.{}", HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, e); ======= } catch (IllegalArgumentException e) { log.warn("Could not invoke {}.{}", HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, e); return null; } catch (IllegalAccessException e) { log.warn("Could not invoke {}.{}", HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, e); return null; } catch (InvocationTargetException e) { log.warn("Could not invoke {}.{}", HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, e); >>>>>>> } catch (IllegalArgumentException | InvocationTargetException | IllegalAccessException e) { log.warn("Could not invoke {}.{}", HADOOP_CRED_PROVIDER_FACTORY_CLASS_NAME, HADOOP_CRED_PROVIDER_FACTORY_GET_PROVIDERS_METHOD_NAME, e); <<<<<<< } catch (IllegalArgumentException | InvocationTargetException | IllegalAccessException e) { log.warn("Failed to invoke {} on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, providerObj, e); ======= } catch (IllegalArgumentException e) { log.warn("Failed to invoke {} on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, providerObj, e); continue; } catch (IllegalAccessException e) { log.warn("Failed to invoke {} on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, providerObj, e); continue; } catch (InvocationTargetException e) { log.warn("Failed to invoke {} on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, providerObj, e); >>>>>>> } catch (IllegalArgumentException | InvocationTargetException | IllegalAccessException e) { log.warn("Failed to invoke {} on {}", HADOOP_CRED_PROVIDER_GET_ALIASES_METHOD_NAME, providerObj, e);
<<<<<<< import io.apicurio.hub.api.bitbucket.BitbucketException; import io.apicurio.hub.api.bitbucket.IBitbucketSourceConnector; ======= >>>>>>> import io.apicurio.hub.api.bitbucket.BitbucketException; import io.apicurio.hub.api.bitbucket.IBitbucketSourceConnector; <<<<<<< import io.apicurio.hub.core.beans.LinkedAccount; import io.apicurio.hub.core.beans.LinkedAccountType; import io.apicurio.hub.core.exceptions.AlreadyExistsException; import io.apicurio.hub.core.exceptions.NotFoundException; import io.apicurio.hub.core.exceptions.ServerError; import io.apicurio.hub.core.storage.IStorage; import io.apicurio.hub.core.storage.StorageException; ======= import io.apicurio.hub.core.beans.LinkedAccount; import io.apicurio.hub.core.beans.LinkedAccountType; import io.apicurio.hub.core.config.HubConfiguration; import io.apicurio.hub.core.exceptions.AlreadyExistsException; import io.apicurio.hub.core.exceptions.NotFoundException; import io.apicurio.hub.core.exceptions.ServerError; import io.apicurio.hub.core.storage.IStorage; import io.apicurio.hub.core.storage.StorageException; >>>>>>> import io.apicurio.hub.core.beans.LinkedAccount; import io.apicurio.hub.core.beans.LinkedAccountType; import io.apicurio.hub.core.config.HubConfiguration; import io.apicurio.hub.core.exceptions.AlreadyExistsException; import io.apicurio.hub.core.exceptions.NotFoundException; import io.apicurio.hub.core.exceptions.ServerError; import io.apicurio.hub.core.storage.IStorage; import io.apicurio.hub.core.storage.StorageException; <<<<<<< private ILinkedAccountsProvider linkedAccountsProvider; @Inject private IMetrics metrics; ======= private HubConfiguration config; >>>>>>> private ILinkedAccountsProvider linkedAccountsProvider; @Inject private IMetrics metrics; @Inject private HubConfiguration config;
<<<<<<< serverurl = new String(Decrypt3DES(serverurl, m_passphrase)); String comparevalue = new String(sun).replaceAll("/*$",""); // remove any trailing / chars; System.out.println("Comparing ["+server+"] with ["+comparevalue+"] (was encrypted)"); ======= serverurl = new String(Decrypt3DES(serverurl, m_passphrase)); String comparevalue = new String(sun); System.out.println("Encrypted URL - comparing "+server+" with "+comparevalue); >>>>>>> serverurl = new String(Decrypt3DES(serverurl, m_passphrase)); String comparevalue = new String(sun).replaceAll("/*$",""); // remove any trailing / chars; System.out.println("Comparing ["+server+"] with ["+comparevalue+"] (was encrypted)"); <<<<<<< System.out.println("\"Server URL\" match="+match); if (!match) { // No match yet - check if there's a Jenkins Match URL to compare instead PreparedStatement stmt4 = m_conn.prepareStatement(sql4); stmt4.setInt(1,buildengineid); ResultSet rs4 = stmt4.executeQuery(); if (rs4.next()) { System.out.println("Jenkins Match URL seen"); String matchURL = rs4.getString(1); String enc = rs4.getString(2); if (enc != null && enc.equalsIgnoreCase("y")) { // This matchURL address is encrypted System.out.println("matchURL is encrypted"); matchURL = new String(Decrypt3DES(matchURL, m_passphrase)); } matchURL = matchURL.replaceAll("/*$",""); // get rid of any trailing / chars System.out.println("Comparing ["+server+"] with ["+matchURL+"]"); match = matchURL.equalsIgnoreCase(server); if (match) { // Replace the server part in the encoded URL with our Server URL for // the subsequent ping back to Jenkins. Format of encodedurl is: // http[s]://server:port/blah/job/<project>/<buildno> // Format of matchURL will be // http[s]://server:port/blah int soj = encodedurl.indexOf("/job/"); encodedurl = serverurl.replaceAll("/*$", "")+encodedurl.substring(soj); System.out.println("encodedurl now ["+encodedurl+"] (for callback)"); } } rs4.close(); stmt4.close(); System.out.println("\"Jenkins Match URL\" match="+match); } if (match) { ======= >>>>>>> System.out.println("\"Server URL\" match="+match); if (!match) { // No match yet - check if there's a Jenkins Match URL to compare instead PreparedStatement stmt4 = m_conn.prepareStatement(sql4); stmt4.setInt(1,buildengineid); ResultSet rs4 = stmt4.executeQuery(); if (rs4.next()) { System.out.println("Jenkins Match URL seen"); String matchURL = rs4.getString(1); String enc = rs4.getString(2); if (enc != null && enc.equalsIgnoreCase("y")) { // This matchURL address is encrypted System.out.println("matchURL is encrypted"); matchURL = new String(Decrypt3DES(matchURL, m_passphrase)); } matchURL = matchURL.replaceAll("/*$",""); // get rid of any trailing / chars System.out.println("Comparing ["+server+"] with ["+matchURL+"]"); match = matchURL.equalsIgnoreCase(server); if (match) { // Replace the server part in the encoded URL with our Server URL for // the subsequent ping back to Jenkins. Format of encodedurl is: // http[s]://server:port/blah/job/<project>/<buildno> // Format of matchURL will be // http[s]://server:port/blah int soj = encodedurl.indexOf("/job/"); encodedurl = serverurl.replaceAll("/*$", "")+encodedurl.substring(soj); System.out.println("encodedurl now ["+encodedurl+"] (for callback)"); } } rs4.close(); stmt4.close(); System.out.println("\"Jenkins Match URL\" match="+match); } if (match) {
<<<<<<< * @param openIds 群发用户 * @return ======= * @return 群发结果 >>>>>>> * @param openIds 群发用户 * @return 群发结果
<<<<<<< ((IConnectableRedNet)Block.blocksList[blockId]).onInputChanged(_world, node.x, node.y, node.z, node.orientation.getOpposite(), Arrays.clone(_powerLevelOutput)); ======= ((IConnectableRedNet)Block.blocksList[blockId]).onInputsChanged(_world, node.x, node.y, node.z, node.orientation.getOpposite(), _powerLevelOutput); >>>>>>> ((IConnectableRedNet)Block.blocksList[blockId]).onInputsChanged(_world, node.x, node.y, node.z, node.orientation.getOpposite(), Arrays.clone(_powerLevelOutput));
<<<<<<< worldObj.getGameRules().setOrCreateGameRule("doMobLoot", "true"); setIdleTicks(20); ======= e.attackEntityFrom(DamageSource.generic, 5000); >>>>>>> worldObj.getGameRules().setOrCreateGameRule("doMobLoot", "true"); setIdleTicks(20); e.attackEntityFrom(DamageSource.generic, 5000);
<<<<<<< public static ItemFactoryCup plasticCup; ======= public static Item needlegunItem; public static Item needlegunAmmoEmptyItem; public static Item needlegunAmmoStandardItem; public static Item needlegunAmmoLavaItem; public static Item needlegunAmmoSludgeItem; public static Item needlegunAmmoSewageItem; public static Item needlegunAmmoFireItem; public static Item needlegunAmmoAnvilItem; >>>>>>> public static Item needlegunItem; public static Item needlegunAmmoEmptyItem; public static Item needlegunAmmoStandardItem; public static Item needlegunAmmoLavaItem; public static Item needlegunAmmoSludgeItem; public static Item needlegunAmmoSewageItem; public static Item needlegunAmmoFireItem; public static Item needlegunAmmoAnvilItem; public static ItemFactoryCup plasticCup; <<<<<<< plasticCup = (ItemFactoryCup)new ItemFactoryCup(MFRConfig.plasticCupItemId.getInt(), 64, 16).setUnlocalizedName("mfr.bucket.plasticCup"); ======= needlegunItem = (new ItemNeedleGun(MFRConfig.needlegunItemId.getInt())).setUnlocalizedName("mfr.needlegun").setMaxStackSize(1); needlegunAmmoEmptyItem = (new ItemFactory(MFRConfig.needlegunAmmoEmptyItemId.getInt())).setUnlocalizedName("mfr.needlegun.ammo.empty"); needlegunAmmoStandardItem = (new ItemNeedlegunAmmoStandard(MFRConfig.needlegunAmmoStandardItemId.getInt())).setUnlocalizedName("mfr.needlegun.ammo.standard"); needlegunAmmoLavaItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoLavaItemId.getInt(), Block.lavaMoving.blockID, 3)).setUnlocalizedName("mfr.needlegun.ammo.lava"); needlegunAmmoSludgeItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoSludgeItemId.getInt(), sludgeLiquid.blockID, 6)).setUnlocalizedName("mfr.needlegun.ammo.sludge"); needlegunAmmoSewageItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoSewageItemId.getInt(), sewageLiquid.blockID, 6)).setUnlocalizedName("mfr.needlegun.ammo.sewage"); needlegunAmmoFireItem = (new ItemNeedlegunAmmoFire(MFRConfig.needlegunAmmoFireItemId.getInt())).setUnlocalizedName("mfr.needlegun.ammo.fire"); needlegunAmmoAnvilItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoAnvilItemId.getInt(), Block.anvil.blockID, 2)).setUnlocalizedName("mfr.needlegun.ammo.anvil").setMaxDamage(0); >>>>>>> needlegunItem = (new ItemNeedleGun(MFRConfig.needlegunItemId.getInt())).setUnlocalizedName("mfr.needlegun").setMaxStackSize(1); needlegunAmmoEmptyItem = (new ItemFactory(MFRConfig.needlegunAmmoEmptyItemId.getInt())).setUnlocalizedName("mfr.needlegun.ammo.empty"); needlegunAmmoStandardItem = (new ItemNeedlegunAmmoStandard(MFRConfig.needlegunAmmoStandardItemId.getInt())).setUnlocalizedName("mfr.needlegun.ammo.standard"); needlegunAmmoLavaItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoLavaItemId.getInt(), Block.lavaMoving.blockID, 3)).setUnlocalizedName("mfr.needlegun.ammo.lava"); needlegunAmmoSludgeItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoSludgeItemId.getInt(), sludgeLiquid.blockID, 6)).setUnlocalizedName("mfr.needlegun.ammo.sludge"); needlegunAmmoSewageItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoSewageItemId.getInt(), sewageLiquid.blockID, 6)).setUnlocalizedName("mfr.needlegun.ammo.sewage"); needlegunAmmoFireItem = (new ItemNeedlegunAmmoFire(MFRConfig.needlegunAmmoFireItemId.getInt())).setUnlocalizedName("mfr.needlegun.ammo.fire"); needlegunAmmoAnvilItem = (new ItemNeedlegunAmmoBlock(MFRConfig.needlegunAmmoAnvilItemId.getInt(), Block.anvil.blockID, 2)).setUnlocalizedName("mfr.needlegun.ammo.anvil").setMaxDamage(0); plasticCup = (ItemFactoryCup)new ItemFactoryCup(MFRConfig.plasticCupItemId.getInt(), 64, 16).setUnlocalizedName("mfr.bucket.plasticCup");
<<<<<<< final List<Long> tstamps; final OSHDBBoundingBox bbox; ======= final List<OSHDBTimestamp> tstamps; final BoundingBox bbox; >>>>>>> final List<OSHDBTimestamp> tstamps; final OSHDBBoundingBox bbox; <<<<<<< List<String> cacheNames, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= List<String> cacheNames, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> List<String> cacheNames, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< List<String> cacheNames, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= List<String> cacheNames, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> List<String> cacheNames, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< List<String> cacheNames, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= List<String> cacheNames, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> List<String> cacheNames, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< List<String> cacheNames, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= List<String> cacheNames, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> List<String> cacheNames, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly,
<<<<<<< ======= import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.io.ParseException; import com.vividsolutions.jts.io.WKTReader; >>>>>>> <<<<<<< import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.TimestampParser; ======= import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.FakeTagInterpreterAreaAlways; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.FakeTagInterpreterAreaMultipolygonAllOuters; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.FakeTagInterpreterAreaNever; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.TimestampParser; >>>>>>> import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.FakeTagInterpreterAreaAlways; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.FakeTagInterpreterAreaMultipolygonAllOuters; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.FakeTagInterpreterAreaNever; import org.heigit.bigspatialdata.oshdb.util.geometry.helpers.TimestampParser; <<<<<<< import org.heigit.bigspatialdata.oshdb.util.time.ISODateTimeParser; import org.junit.Assert; ======= >>>>>>> import org.heigit.bigspatialdata.oshdb.util.time.ISODateTimeParser; import org.junit.Assert; <<<<<<< private OSHDBTimestamp toOSHDBTimestamp(String timeString) { try { return new OSHDBTimestamp( ISODateTimeParser.parseISODateTime(timeString).toEpochSecond() ); } catch (Exception e) { e.printStackTrace(); return null; } } ======= >>>>>>> private OSHDBTimestamp toOSHDBTimestamp(String timeString) { try { return new OSHDBTimestamp( ISODateTimeParser.parseISODateTime(timeString).toEpochSecond() ); } catch (Exception e) { e.printStackTrace(); return null; } } <<<<<<< @Test public void testBoundingGetGeometry() throws ParseException { Polygon clipPoly = OSHDBGeometryBuilder.getGeometry(new OSHDBBoundingBox(-180, -90, 180, 90)); Geometry expectedPolygon = (new WKTReader()).read( "POLYGON((-180.0 -90.0, 180.0 -90.0, 180.0 90.0, -180.0 90.0, -180.0 -90.0))" ); assertEquals(expectedPolygon,clipPoly); } @Test public void testBoundingBoxOf() throws ParseException { OSHDBBoundingBox clipPoly = OSHDBGeometryBuilder.boundingBoxOf(new Envelope(-180, 180, -90, 90)); Envelope expectedPolygon = new Envelope(-180, 180, -90, 90); assertEquals(new String("(-180.000000,-90.000000) (180.000000,90.000000)"),clipPoly.toString()); @Test public void testBoundingBoxGetGeometry() { // regular bbox OSHDBBoundingBox bbox = new OSHDBBoundingBox(0, 0, 1, 1); Polygon geometry = OSHDBGeometryBuilder.getGeometry(bbox); Coordinate[] test = { new Coordinate(0, 0), new Coordinate(1, 0), new Coordinate(1, 1), new Coordinate(0, 1), new Coordinate(0, 0) }; Assert.assertArrayEquals(test, geometry.getCoordinates()); // degenerate bbox: point bbox = new OSHDBBoundingBox(0, 0, 0, 0); geometry = OSHDBGeometryBuilder.getGeometry(bbox); test = new Coordinate[] { new Coordinate(0, 0), new Coordinate(0, 0), new Coordinate(0, 0), new Coordinate(0, 0), new Coordinate(0, 0) }; Assert.assertArrayEquals(test, geometry.getCoordinates()); // degenerate bbox: line bbox = new OSHDBBoundingBox(0, 0, 0, 1); geometry = OSHDBGeometryBuilder.getGeometry(bbox); test = new Coordinate[]{new Coordinate(0, 0), new Coordinate(0, 0), new Coordinate(0, 1), new Coordinate(0, 1), new Coordinate(0, 0) }; Assert.assertArrayEquals(test, geometry.getCoordinates()); } } abstract class FakeTagInterpreter implements TagInterpreter { @Override public boolean isArea(OSMEntity entity) { return false; } @Override public boolean isLine(OSMEntity entity) { return false; } @Override public boolean hasInterestingTagKey(OSMEntity osm) { return false; } @Override public boolean isMultipolygonOuterMember(OSMMember osmMember) { return false; } @Override public boolean isMultipolygonInnerMember(OSMMember osmMember) { return false; } @Override public boolean isOldStyleMultipolygon(OSMRelation osmRelation) { return false; } } ======= >>>>>>>
<<<<<<< import org.heigit.bigspatialdata.oshdb.util.OSHDBBoundingBox; ======= import org.heigit.bigspatialdata.oshdb.util.BoundingBox; import org.heigit.bigspatialdata.oshdb.util.OSHDBTimestamp; >>>>>>> import org.heigit.bigspatialdata.oshdb.util.OSHDBBoundingBox; import org.heigit.bigspatialdata.oshdb.util.OSHDBTimestamp; <<<<<<< public static <T extends OSMEntity> Geometry getGeometryClipped(T entity, long timestamp, TagInterpreter areaDecider, OSHDBBoundingBox clipBbox) { ======= public static <T extends OSMEntity> Geometry getGeometryClipped(T entity, OSHDBTimestamp timestamp, TagInterpreter areaDecider, BoundingBox clipBbox) { >>>>>>> public static <T extends OSMEntity> Geometry getGeometryClipped(T entity, OSHDBTimestamp timestamp, TagInterpreter areaDecider, OSHDBBoundingBox clipBbox) {
<<<<<<< import org.heigit.bigspatialdata.oshdb.util.OSHDBBoundingBox; ======= import org.heigit.bigspatialdata.oshdb.util.BoundingBox; import org.heigit.bigspatialdata.oshdb.util.OSHDBTimestamp; >>>>>>> import org.heigit.bigspatialdata.oshdb.util.OSHDBBoundingBox; import org.heigit.bigspatialdata.oshdb.util.OSHDBTimestamp; <<<<<<< public static <P extends Geometry & Polygonal> Stream<SortedMap<Long, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, OSHDBBoundingBox boundingBox, P boundingPolygon, List<Long> timestamps, ======= public static <P extends Geometry & Polygonal> Stream<SortedMap<OSHDBTimestamp, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, BoundingBox boundingBox, P boundingPolygon, List<OSHDBTimestamp> timestamps, >>>>>>> public static <P extends Geometry & Polygonal> Stream<SortedMap<OSHDBTimestamp, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, OSHDBBoundingBox boundingBox, P boundingPolygon, List<OSHDBTimestamp> timestamps, <<<<<<< public static Stream<SortedMap<Long, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, OSHDBBoundingBox boundingBox, List<Long> timestamps, ======= public static Stream<SortedMap<OSHDBTimestamp, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, BoundingBox boundingBox, List<OSHDBTimestamp> timestamps, >>>>>>> public static Stream<SortedMap<OSHDBTimestamp, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, OSHDBBoundingBox boundingBox, List<OSHDBTimestamp> timestamps, <<<<<<< public static Stream<SortedMap<Long, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, OSHDBBoundingBox boundingBox, List<Long> timestamps, ======= public static Stream<SortedMap<OSHDBTimestamp, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, BoundingBox boundingBox, List<OSHDBTimestamp> timestamps, >>>>>>> public static Stream<SortedMap<OSHDBTimestamp, Pair<OSMEntity, Geometry>>> iterateByTimestamps( GridOSHEntity cell, OSHDBBoundingBox boundingBox, List<OSHDBTimestamp> timestamps,
<<<<<<< final List<Long> tstamps; final OSHDBBoundingBox bbox; ======= final List<OSHDBTimestamp> tstamps; final BoundingBox bbox; >>>>>>> final List<OSHDBTimestamp> tstamps; final OSHDBBoundingBox bbox; <<<<<<< Set<CellId> cellIdsList, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< String cacheName, Set<CellId> cellIdsList, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, ======= String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, >>>>>>> String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, <<<<<<< String cacheName, Set<CellId> cellIdsList, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< String cacheName, Set<CellId> cellIdsList, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< String cacheName, Set<CellId> cellIdsList, List<Long> tstamps, OSHDBBoundingBox bbox, P poly, ======= String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, >>>>>>> String cacheName, Set<CellId> cellIdsList, List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, <<<<<<< List<Long> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, SerializableFunction<OSMContribution, R> mapper, SerializableSupplier<S> identitySupplier, SerializableBiFunction<S, R, S> accumulator, SerializableBinaryOperator<S> combiner) { ======= List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, SerializableFunction<OSMContribution, R> mapper, SerializableSupplier<S> identitySupplier, SerializableBiFunction<S, R, S> accumulator, SerializableBinaryOperator<S> combiner) { >>>>>>> List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, SerializableFunction<OSMContribution, R> mapper, SerializableSupplier<S> identitySupplier, SerializableBiFunction<S, R, S> accumulator, SerializableBinaryOperator<S> combiner) { <<<<<<< List<Long> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, ======= List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, >>>>>>> List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, <<<<<<< List<Long> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, SerializableFunction<OSMEntitySnapshot, R> mapper, ======= List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, SerializableFunction<OSMEntitySnapshot, R> mapper, >>>>>>> List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, SerializableFunction<OSMEntitySnapshot, R> mapper, <<<<<<< List<Long> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, ======= List<OSHDBTimestamp> tstamps, BoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter, >>>>>>> List<OSHDBTimestamp> tstamps, OSHDBBoundingBox bbox, P poly, SerializablePredicate<OSHEntity> preFilter, SerializablePredicate<OSMEntity> filter,
<<<<<<< import com.google.common.collect.Sets; ======= import com.google.common.collect.Streams; >>>>>>> import com.google.common.collect.Sets; import com.google.common.collect.Streams;
<<<<<<< final FileInputStream in = new FileInputStream(pbfFile) // ) { //define parts of file so it can be devided between threads ======= final FileInputStream in = new FileInputStream(pbfFile) // ) { >>>>>>> final FileInputStream in = new FileInputStream(pbfFile) // ) { //define parts of file so it can be devided between threads <<<<<<< //create a h2 containing a collection of all keys and they corresponding values in this dataset ======= >>>>>>> //create a h2 containing a collection of all keys and they corresponding values in this dataset <<<<<<< //friendly output ======= >>>>>>> //friendly output
<<<<<<< Job.Result result = common.executeJobRequest(pendingRequest, null); ======= latch.countDown(); Job.Result result = common.executeJobRequest(pendingRequest); >>>>>>> latch.countDown(); Job.Result result = common.executeJobRequest(pendingRequest, null);
<<<<<<< @SuppressWarnings("unused") public class DatabaseManualUpgradeTest { ======= public class DatabaseManualUpgradeTest extends BaseJobManagerTest { >>>>>>> @SuppressWarnings("unused") public class DatabaseManualUpgradeTest extends BaseJobManagerTest {
<<<<<<< import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.SerializationFeature; import com.github.jknack.handlebars.Handlebars; import com.github.jknack.handlebars.Helper; import com.github.jknack.handlebars.Options; import com.github.jknack.handlebars.Template; import com.github.jknack.handlebars.helper.StringHelpers; import com.github.jknack.handlebars.io.TemplateLoader; import com.wordnik.swagger.models.*; import com.wordnik.swagger.util.Json; ======= import com.fasterxml.jackson.databind.node.ObjectNode; import com.github.kongchen.swagger.docgen.mavenplugin.ApiSourceInfo; import com.github.kongchen.swagger.docgen.mustache.MustacheApi; import com.github.kongchen.swagger.docgen.mustache.OutputTemplate; import com.github.mustachejava.DefaultMustacheFactory; import com.github.mustachejava.Mustache; import com.wordnik.swagger.converter.ModelConverter; import com.wordnik.swagger.converter.ModelConverters; import com.wordnik.swagger.converter.OverrideConverter; import com.wordnik.swagger.converter.SwaggerSchemaConverter; import com.wordnik.swagger.core.util.JsonSerializer; import com.wordnik.swagger.core.util.JsonUtil; import com.wordnik.swagger.model.ApiListing; import com.wordnik.swagger.model.ApiListingReference; import com.wordnik.swagger.model.ResourceListing; >>>>>>> import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.SerializationFeature; import com.github.jknack.handlebars.Handlebars; import com.github.jknack.handlebars.Helper; import com.github.jknack.handlebars.Options; import com.github.jknack.handlebars.Template; import com.github.jknack.handlebars.helper.StringHelpers; import com.github.jknack.handlebars.io.TemplateLoader; import com.github.kongchen.swagger.docgen.mavenplugin.ApiSource; import com.wordnik.swagger.models.*; <<<<<<< ======= import org.apache.commons.io.IOUtils; import scala.collection.Iterator; import scala.collection.JavaConversions; import scala.collection.mutable.ListBuffer; >>>>>>> <<<<<<< ======= import java.util.ArrayList; import java.util.Comparator; import java.util.List; >>>>>>>
<<<<<<< import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.HEAD; import javax.ws.rs.HttpMethod; import javax.ws.rs.OPTIONS; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.apache.maven.plugin.logging.Log; import org.reflections.Reflections; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.annotation.AnnotationUtils; import com.github.kongchen.swagger.docgen.jaxrs.BeanParamInjectParamExtention; ======= import com.github.kongchen.swagger.docgen.jaxrs.BeanParamInjectParamExtension; >>>>>>> import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.HEAD; import javax.ws.rs.HttpMethod; import javax.ws.rs.OPTIONS; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.apache.maven.plugin.logging.Log; import org.reflections.Reflections; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.annotation.AnnotationUtils; import com.github.kongchen.swagger.docgen.jaxrs.BeanParamInjectParamExtension; <<<<<<< import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponses; import io.swagger.annotations.Authorization; import io.swagger.annotations.AuthorizationScope; import io.swagger.annotations.SwaggerDefinition; ======= import io.swagger.annotations.*; >>>>>>> import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponses; import io.swagger.annotations.Authorization; import io.swagger.annotations.AuthorizationScope; import io.swagger.annotations.SwaggerDefinition; <<<<<<< import io.swagger.models.refs.RefType; ======= import io.swagger.util.BaseReaderUtils; >>>>>>> import io.swagger.models.refs.RefType; import io.swagger.util.BaseReaderUtils; <<<<<<< if (hasCommonParameter(parameter)) { Parameter refParameter = new RefParameter(RefType.PARAMETER.getInternalPrefix() + parameter.getName()); operation.parameter(refParameter); } else { operation.parameter(parameter); } ======= parameter = replaceArrayModelForOctetStream(operation, parameter); operation.parameter(parameter); >>>>>>> if (hasCommonParameter(parameter)) { Parameter refParameter = new RefParameter(RefType.PARAMETER.getInternalPrefix() + parameter.getName()); operation.parameter(refParameter); } else { parameter = replaceArrayModelForOctetStream(operation, parameter); operation.parameter(parameter); }
<<<<<<< import io.swagger.models.Operation; ======= import io.swagger.models.ArrayModel; import io.swagger.models.Operation; >>>>>>> import io.swagger.models.ArrayModel; import io.swagger.models.Operation; <<<<<<< import io.swagger.models.parameters.HeaderParameter; ======= import io.swagger.models.parameters.BodyParameter; >>>>>>> import io.swagger.models.parameters.BodyParameter; import io.swagger.models.parameters.HeaderParameter; <<<<<<< import io.swagger.models.parameters.QueryParameter; import io.swagger.models.parameters.RefParameter; import net.javacrumbs.jsonunit.JsonAssert; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; ======= >>>>>>> import io.swagger.models.parameters.QueryParameter; import io.swagger.models.parameters.RefParameter; import net.javacrumbs.jsonunit.JsonAssert; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; <<<<<<< @Test public void createCommonParameters() throws Exception { reader = new JaxrsReader(new Swagger(), Mockito.mock(Log.class)); Swagger result = reader.read(CommonParametersApi.class); Parameter headerParam = result.getParameter("headerParam"); assertTrue(headerParam instanceof HeaderParameter); Parameter queryParam = result.getParameter("queryParam"); assertTrue(queryParam instanceof QueryParameter); result = reader.read(ReferenceCommonParametersApi.class); Operation get = result.getPath("/apath").getGet(); List<Parameter> parameters = get.getParameters(); for (Parameter parameter : parameters) { assertTrue(parameter instanceof RefParameter); } ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); ObjectWriter jsonWriter = mapper.writer(new DefaultPrettyPrinter()); String json = jsonWriter.writeValueAsString(result); JsonNode expectJson = mapper.readTree(this.getClass().getResourceAsStream("/expectedOutput/swagger-common-parameters.json")); JsonAssert.assertJsonEquals(expectJson, json); } @Test public void ignoreCommonParameters() { reader = new JaxrsReader(new Swagger(), Mockito.mock(Log.class)); Swagger result = reader.read(CommonParametersApiWithPathAnnotation.class); assertNull(result.getParameter("headerParam")); assertNull(result.getParameter("queryParam")); reader = new JaxrsReader(new Swagger(), Mockito.mock(Log.class)); result = reader.read(CommonParametersApiWithMethod.class); assertNull(result.getParameter("headerParam")); assertNull(result.getParameter("queryParam")); } @Test public void detectDuplicateCommonParameter() { Swagger swagger = new Swagger(); reader = new JaxrsReader(swagger, Mockito.mock(Log.class)); reader.read(CommonParametersApi.class); Exception exception = null; try { reader.read(CommonParametersApi.class); } catch (Exception e) { exception = e; } assertNotNull(exception); } ======= @Test public void discoverSubResource() { Swagger result = reader.read(SomeResource.class); assertSwaggerPath(result.getPath("/resource/explicit/name").getGet(), result, "/resource/implicit/name"); } private void assertSwaggerPath(Operation expectedOperation, Swagger result, String expectedPath) { assertNotNull(result, "No Swagger object created"); assertFalse(result.getPaths().isEmpty(), "Should contain operation paths"); assertTrue(result.getPaths().containsKey(expectedPath), "Expected path missing"); io.swagger.models.Path path = result.getPaths().get(expectedPath); assertFalse(path.getOperations().isEmpty(), "Should be a get operation"); assertEquals(expectedOperation, path.getGet(), "Should contain operation"); } >>>>>>> @Test public void createCommonParameters() throws Exception { reader = new JaxrsReader(new Swagger(), Mockito.mock(Log.class)); Swagger result = reader.read(CommonParametersApi.class); Parameter headerParam = result.getParameter("headerParam"); assertTrue(headerParam instanceof HeaderParameter); Parameter queryParam = result.getParameter("queryParam"); assertTrue(queryParam instanceof QueryParameter); result = reader.read(ReferenceCommonParametersApi.class); Operation get = result.getPath("/apath").getGet(); List<Parameter> parameters = get.getParameters(); for (Parameter parameter : parameters) { assertTrue(parameter instanceof RefParameter); } ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); ObjectWriter jsonWriter = mapper.writer(new DefaultPrettyPrinter()); String json = jsonWriter.writeValueAsString(result); JsonNode expectJson = mapper.readTree(this.getClass().getResourceAsStream("/expectedOutput/swagger-common-parameters.json")); JsonAssert.assertJsonEquals(expectJson, json); } @Test public void ignoreCommonParameters() { reader = new JaxrsReader(new Swagger(), Mockito.mock(Log.class)); Swagger result = reader.read(CommonParametersApiWithPathAnnotation.class); assertNull(result.getParameter("headerParam")); assertNull(result.getParameter("queryParam")); reader = new JaxrsReader(new Swagger(), Mockito.mock(Log.class)); result = reader.read(CommonParametersApiWithMethod.class); assertNull(result.getParameter("headerParam")); assertNull(result.getParameter("queryParam")); } @Test public void detectDuplicateCommonParameter() { Swagger swagger = new Swagger(); reader = new JaxrsReader(swagger, Mockito.mock(Log.class)); reader.read(CommonParametersApi.class); Exception exception = null; try { reader.read(CommonParametersApi.class); } catch (Exception e) { exception = e; } assertNotNull(exception); } public void discoverSubResource() { Swagger result = reader.read(SomeResource.class); assertSwaggerPath(result.getPath("/resource/explicit/name").getGet(), result, "/resource/implicit/name"); } private void assertSwaggerPath(Operation expectedOperation, Swagger result, String expectedPath) { assertNotNull(result, "No Swagger object created"); assertFalse(result.getPaths().isEmpty(), "Should contain operation paths"); assertTrue(result.getPaths().containsKey(expectedPath), "Expected path missing"); io.swagger.models.Path path = result.getPaths().get(expectedPath); assertFalse(path.getOperations().isEmpty(), "Should be a get operation"); assertEquals(expectedOperation, path.getGet(), "Should contain operation"); } <<<<<<< @Api static class CommonParametersApi { @HeaderParam("headerParam") public String headerParam; @QueryParam("queryParam") public String queryParam; } @Api static class CommonParametersApiWithMethod { @HeaderParam("headerParam") public String headerParam; @QueryParam("queryParam") public String queryParam; @GET public Response getOperation() { return Response.ok().build(); } } @Api @Path("/apath") static class CommonParametersApiWithPathAnnotation { @HeaderParam("headerParam") public String headerParam; @QueryParam("queryParam") public String queryParam; } @Api @Path("/apath") static class ReferenceCommonParametersApi { @GET public Response getOperation( @HeaderParam("headerParam") String headerParam, @QueryParam("queryParam") String queryParam) { return Response.ok().build(); } } ======= @Api(value = "v1") @Path("/apath") static class AnApiWithOctetStream { @POST @Path("/add") @ApiOperation(value = "Add content") @Consumes(MediaType.APPLICATION_OCTET_STREAM) public void addOperation( @ApiParam(value = "content", required = true, type = "string", format = "byte") final byte[] content) { } } @Path("/resource") @Api(tags = "Resource") static class SomeResource { @Path("explicit") public SomeSubResource getSomething() { // no implementation needed. Method is only for the test cases, so that the return type is captured return new SomeSubResource(); } @Path("implicit") @ApiOperation(value="", response = SomeSubResource.class) public Object getSomeSub() { // no implementation needed. Method is only for the test cases, so that the return type is overridden by @ApiOperation.response return new SomeSubResource(); } } static class SomeSubResource { @Path("name") @GET public String getName() { // no implementation needed. Method is only for the test cases return toString(); } } >>>>>>> @Api static class CommonParametersApi { @HeaderParam("headerParam") public String headerParam; @QueryParam("queryParam") public String queryParam; } @Api static class CommonParametersApiWithMethod { @HeaderParam("headerParam") public String headerParam; @QueryParam("queryParam") public String queryParam; @GET public Response getOperation() { return Response.ok().build(); } } @Api @Path("/apath") static class CommonParametersApiWithPathAnnotation { @HeaderParam("headerParam") public String headerParam; @QueryParam("queryParam") public String queryParam; } @Api @Path("/apath") static class ReferenceCommonParametersApi { @GET public Response getOperation( @HeaderParam("headerParam") String headerParam, @QueryParam("queryParam") String queryParam) { return Response.ok().build(); } } @Api(value = "v1") @Path("/apath") static class AnApiWithOctetStream { @POST @Path("/add") @ApiOperation(value = "Add content") @Consumes(MediaType.APPLICATION_OCTET_STREAM) public void addOperation( @ApiParam(value = "content", required = true, type = "string", format = "byte") final byte[] content) { } } @Path("/resource") @Api(tags = "Resource") static class SomeResource { @Path("explicit") public SomeSubResource getSomething() { // no implementation needed. Method is only for the test cases, so that the return type is captured return new SomeSubResource(); } @Path("implicit") @ApiOperation(value="", response = SomeSubResource.class) public Object getSomeSub() { // no implementation needed. Method is only for the test cases, so that the return type is overridden by @ApiOperation.response return new SomeSubResource(); } } static class SomeSubResource { @Path("name") @GET public String getName() { // no implementation needed. Method is only for the test cases return toString(); } }
<<<<<<< public static EditorFragment newInstance(int legacyChangeId, String changeId, String revisionId) { return newInstance(legacyChangeId, changeId, revisionId, null, null); ======= public static EditorFragment newInstance(int legacyChangeId, String changeId) { return newInstance(legacyChangeId, changeId, null, null, false); >>>>>>> public static EditorFragment newInstance(int legacyChangeId, String changeId, String revisionId) { return newInstance(legacyChangeId, changeId, revisionId, null, null, false);
<<<<<<< ======= private KeyStoreTableColumns kstColumns; private JPanel jpDisplayColumns; private JLabel jlDisplayColumns; private JCheckBox jcbEnableEntryName; private boolean bEnableEntryName; private JCheckBox jcbEnableAlgorithm; private boolean bEnableAlgorithm; private JCheckBox jcbEnableKeySize; private boolean bEnableKeySize; private JCheckBox jcbEnableCertificateExpiry; private boolean bEnableCertificateExpiry; private JCheckBox jcbEnableLastModified; private boolean bEnableLastModified; private JCheckBox jcbEnableCurve; private boolean bEnableCurve; private JCheckBox jcbEnableSKI; private boolean bEnableSKI; private JCheckBox jcbEnableAKI; private boolean bEnableAKI; private JCheckBox jcbEnableIssuerDN; private boolean bEnableIssuerDN; private JCheckBox jcbEnableIssuerCN; private boolean bEnableIssuerCN; private JCheckBox jcbEnableSubjectDN; private boolean bEnableSubjectDN; private JCheckBox jcbEnableSubjectCN; private boolean bEnableSubjectCN; private JCheckBox jcbEnableIssuerO; private boolean bEnableIssuerO; private JCheckBox jcbEnableSubjectO; private boolean bEnableSubjectO; private JLabel jlExpirationWarnDays; private JTextField jtfExpirationWarnDays; private boolean bColumnsChanged; >>>>>>> private KeyStoreTableColumns kstColumns; private JPanel jpDisplayColumns; private JLabel jlDisplayColumns; private JCheckBox jcbEnableEntryName; private boolean bEnableEntryName; private JCheckBox jcbEnableAlgorithm; private boolean bEnableAlgorithm; private JCheckBox jcbEnableKeySize; private boolean bEnableKeySize; private JCheckBox jcbEnableCertificateExpiry; private boolean bEnableCertificateExpiry; private JCheckBox jcbEnableLastModified; private boolean bEnableLastModified; private JCheckBox jcbEnableCurve; private boolean bEnableCurve; private JCheckBox jcbEnableSKI; private boolean bEnableSKI; private JCheckBox jcbEnableAKI; private boolean bEnableAKI; private JCheckBox jcbEnableIssuerDN; private boolean bEnableIssuerDN; private JCheckBox jcbEnableIssuerCN; private boolean bEnableIssuerCN; private JCheckBox jcbEnableSubjectDN; private boolean bEnableSubjectDN; private JCheckBox jcbEnableSubjectCN; private boolean bEnableSubjectCN; private JCheckBox jcbEnableIssuerO; private boolean bEnableIssuerO; private JCheckBox jcbEnableSubjectO; private boolean bEnableSubjectO; private JLabel jlExpirationWarnDays; private JTextField jtfExpirationWarnDays; private boolean bColumnsChanged; <<<<<<< String defaultDN, String language, boolean autoUpdateChecksEnabled, int autoUpdateChecksInterval) { ======= String defaultDN, String language, KeyStoreTableColumns kstColumns) { >>>>>>> String defaultDN, String language, boolean autoUpdateChecksEnabled, int autoUpdateChecksInterval, KeyStoreTableColumns kstColumns) { <<<<<<< this.autoUpdateChecksEnabled = autoUpdateChecksEnabled; this.autoUpdateChecksInterval = autoUpdateChecksInterval; ======= this.expiryWarnDays = kstColumns.getExpiryWarnDays(); this.kstColumns = kstColumns; >>>>>>> this.autoUpdateChecksEnabled = autoUpdateChecksEnabled; this.autoUpdateChecksInterval = autoUpdateChecksInterval; this.expiryWarnDays = kstColumns.getExpiryWarnDays(); this.kstColumns = kstColumns; <<<<<<< jtpPreferences.setMnemonicAt(1, res.getString("DPreferences.jpUI.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(2, res.getString("DPreferences.jpInternetProxy.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(3, res.getString("DPreferences.jpDefaultName.mnemonic").charAt(0)); ======= jtpPreferences.setMnemonicAt(1, res.getString("DPreferences.jpTrustChecks.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(2, res.getString("DPreferences.jpPasswordQuality.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(3, res.getString("DPreferences.jpLookFeel.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(4, res.getString("DPreferences.jpInternetProxy.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(5, res.getString("DPreferences.jpDisplayColumns.mnemonic").charAt(0)); >>>>>>> jtpPreferences.setMnemonicAt(1, res.getString("DPreferences.jpUI.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(2, res.getString("DPreferences.jpInternetProxy.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(3, res.getString("DPreferences.jpDefaultName.mnemonic").charAt(0)); jtpPreferences.setMnemonicAt(4, res.getString("DPreferences.jpDisplayColumns.mnemonic").charAt(0)); <<<<<<< DPreferences dialog = new DPreferences(new javax.swing.JFrame(),true, new File(""), true, true, true, new PasswordQualityConfig(true, true, 100), "", "en", true, 14); ======= DPreferences dialog = new DPreferences(new javax.swing.JFrame(), true, new File(""), true, true, true, new PasswordQualityConfig(true, true, 100), "", "en", new KeyStoreTableColumns()); >>>>>>> DPreferences dialog = new DPreferences(new javax.swing.JFrame(),true, new File(""), true, true, true, new PasswordQualityConfig(true, true, 100), "", "en", true, 14, new KeyStoreTableColumns());
<<<<<<< import com.redhat.ceylon.compiler.typechecker.model.MethodOrValue; ======= >>>>>>> import com.redhat.ceylon.compiler.typechecker.model.MethodOrValue; <<<<<<< import com.redhat.ceylon.compiler.typechecker.model.ParameterAnnotationArgument; ======= import com.redhat.ceylon.compiler.typechecker.model.ParameterAnnotationArgument; import com.redhat.ceylon.compiler.typechecker.model.ValueParameter; >>>>>>> import com.redhat.ceylon.compiler.typechecker.model.ParameterAnnotationArgument;
<<<<<<< public List<TypeDeclaration> getSupertypeDeclarations() { List<TypeDeclaration> ctds = getCaseTypeDeclarations(); List<TypeDeclaration> result = new ArrayList<TypeDeclaration>(ctds.size()); ProducedType type = getType(); for (int i=0, l=ctds.size(); i<l; i++) { //actually the loop is unnecessary, we //only need to consider the first case TypeDeclaration ctd = ctds.get(i); List<TypeDeclaration> ctsts = ctd.getSupertypeDeclarations(); for (int j=0; j<ctsts.size(); j++) { TypeDeclaration std = ctsts.get(j); ProducedType st = type.getSupertype(std); if (st!=null && !st.isNothing()) { if (!result.contains(std)) { result.add(std); } } } } return result; } @Override ======= public boolean inherits(TypeDeclaration dec) { ProducedType st = getType().getSupertype(dec); return st!=null && !st.isNothing(); } @Override >>>>>>> public List<TypeDeclaration> getSupertypeDeclarations() { List<TypeDeclaration> ctds = getCaseTypeDeclarations(); List<TypeDeclaration> result = new ArrayList<TypeDeclaration>(ctds.size()); ProducedType type = getType(); for (int i=0, l=ctds.size(); i<l; i++) { //actually the loop is unnecessary, we //only need to consider the first case TypeDeclaration ctd = ctds.get(i); List<TypeDeclaration> ctsts = ctd.getSupertypeDeclarations(); for (int j=0; j<ctsts.size(); j++) { TypeDeclaration std = ctsts.get(j); ProducedType st = type.getSupertype(std); if (st!=null && !st.isNothing()) { if (!result.contains(std)) { result.add(std); } } } } return result; } @Override public boolean inherits(TypeDeclaration dec) { ProducedType st = getType().getSupertype(dec); return st!=null && !st.isNothing(); } @Override
<<<<<<< private Tree.Expression switchExpression; private Tree.Variable switchVariable; ======= >>>>>>> <<<<<<< Tree.Expression ose = switchExpression; Tree.Variable osv = switchVariable; Tree.Switched switched = that.getSwitchClause().getSwitched(); Tree.Expression e = switched.getExpression(); Tree.Variable v = switched.getVariable(); if (e!=null) { switchExpression = e; } else if (v!=null) { switchVariable = v; Tree.SpecifierExpression se = v.getSpecifierExpression(); if (se == null) { v.addError("missing switched expression"); } else { switchExpression = se.getExpression(); } } ======= Node ose = switchStatementOrExpression; Node oie = ifStatementOrExpression; switchStatementOrExpression = that; ifStatementOrExpression = null; >>>>>>> Node ose = switchStatementOrExpression; Node oie = ifStatementOrExpression; switchStatementOrExpression = that; ifStatementOrExpression = null; <<<<<<< switchExpression = ose; switchVariable = osv; ======= switchStatementOrExpression = ose; ifStatementOrExpression = oie; >>>>>>> switchStatementOrExpression = ose; ifStatementOrExpression = oie; <<<<<<< if (switchVariable!=null) { ProducedType st = switchVariable.getType().getTypeModel(); if (!isTypeUnknown(st)) { checkAssignable(t, st, e, "case must be assignable to switch variable type"); } } else if (switchExpression!=null) { ProducedType st = switchExpression.getTypeModel(); if (!isTypeUnknown(st)) { if (!hasUncheckedNulls(switchExpression.getTerm()) || !isNullCase(t)) { checkAssignable(t, st, e, "case must be assignable to switch expression type"); ======= if (switchStatementOrExpression!=null) { Tree.Expression switchExpression = switchClause().getExpression(); if (switchExpression!=null) { ProducedType st = switchExpression.getTypeModel(); if (!isTypeUnknown(st)) { if (!hasUncheckedNulls(switchExpression.getTerm()) || !isNullCase(t)) { checkAssignable(t, st, e, "case must be assignable to switch expression type"); } >>>>>>> if (switchStatementOrExpression!=null) { Tree.Switched switched = switchClause().getSwitched(); Tree.Expression switchExpression = switched.getExpression(); Tree.Variable switchVariable = switched.getVariable(); if (switchVariable!=null) { ProducedType st = switchVariable.getType().getTypeModel(); if (!isTypeUnknown(st)) { checkAssignable(t, st, e, "case must be assignable to switch variable type"); } } else if (switchExpression!=null) { ProducedType st = switchExpression.getTypeModel(); if (!isTypeUnknown(st)) { if (!hasUncheckedNulls(switchExpression.getTerm()) || !isNullCase(t)) { checkAssignable(t, st, e, "case must be assignable to switch expression type"); } <<<<<<< switchExpression = ose; switchVariable = osv; ======= } @Override public void visit(Tree.IfStatement that) { Node ois = ifStatementOrExpression; Node oss = switchStatementOrExpression; ifStatementOrExpression = that; switchStatementOrExpression = null; super.visit(that); ifStatementOrExpression = ois; switchStatementOrExpression = oss; } @Override public void visit(Tree.ElseClause that) { Tree.Variable var = that.getVariable(); if (var!=null) { var.visit(this); if (switchStatementOrExpression!=null) { Tree.Expression switchExpression = switchClause().getExpression(); Tree.SwitchCaseList switchCaseList = switchCaseList(); if (switchExpression!=null && switchCaseList!=null) { ProducedType st = switchExpression.getTypeModel(); if (!isTypeUnknown(st)) { ProducedType caseUnionType = caseUnionType(switchCaseList); if (caseUnionType!=null) { ProducedType complementType = unit.denotableType(st.minus(caseUnionType)); var.getType().setTypeModel(complementType); var.getDeclarationModel().setType(complementType); } } } } if (ifStatementOrExpression!=null) { Tree.ConditionList conditionList = ifClause().getConditionList(); if (conditionList!=null) { Tree.Condition c = conditionList.getConditions().get(0); Tree.SpecifierExpression se = var.getSpecifierExpression(); if (c instanceof Tree.ExistsCondition) { Tree.ExistsCondition ec = (Tree.ExistsCondition) c; inferDefiniteType(var, se, !ec.getNot()); } else if (c instanceof Tree.NonemptyCondition) { Tree.NonemptyCondition ec = (Tree.NonemptyCondition) c; inferNonemptyType(var, se, !ec.getNot()); } else if (c instanceof Tree.IsCondition) { Tree.IsCondition ic = (Tree.IsCondition) c; ProducedType t = narrow(ic.getType().getTypeModel(), se.getExpression().getTypeModel(), !ic.getNot()); var.getType().setTypeModel(t); var.getDeclarationModel().setType(t); } } } } Tree.Block block = that.getBlock(); if (block!=null) block.visit(this); Tree.Expression expression = that.getExpression(); if (expression!=null) expression.visit(this); >>>>>>> } @Override public void visit(Tree.IfStatement that) { Node ois = ifStatementOrExpression; Node oss = switchStatementOrExpression; ifStatementOrExpression = that; switchStatementOrExpression = null; super.visit(that); ifStatementOrExpression = ois; switchStatementOrExpression = oss; } @Override public void visit(Tree.ElseClause that) { Tree.Variable var = that.getVariable(); if (var!=null) { var.visit(this); if (switchStatementOrExpression!=null) { Tree.Expression switchExpression = switchClause().getSwitched().getExpression(); Tree.SwitchCaseList switchCaseList = switchCaseList(); if (switchExpression!=null && switchCaseList!=null) { ProducedType st = switchExpression.getTypeModel(); if (!isTypeUnknown(st)) { ProducedType caseUnionType = caseUnionType(switchCaseList); if (caseUnionType!=null) { ProducedType complementType = unit.denotableType(st.minus(caseUnionType)); var.getType().setTypeModel(complementType); var.getDeclarationModel().setType(complementType); } } } } if (ifStatementOrExpression!=null) { Tree.ConditionList conditionList = ifClause().getConditionList(); if (conditionList!=null) { Tree.Condition c = conditionList.getConditions().get(0); Tree.SpecifierExpression se = var.getSpecifierExpression(); if (c instanceof Tree.ExistsCondition) { Tree.ExistsCondition ec = (Tree.ExistsCondition) c; inferDefiniteType(var, se, !ec.getNot()); } else if (c instanceof Tree.NonemptyCondition) { Tree.NonemptyCondition ec = (Tree.NonemptyCondition) c; inferNonemptyType(var, se, !ec.getNot()); } else if (c instanceof Tree.IsCondition) { Tree.IsCondition ic = (Tree.IsCondition) c; ProducedType t = narrow(ic.getType().getTypeModel(), se.getExpression().getTypeModel(), !ic.getNot()); var.getType().setTypeModel(t); var.getDeclarationModel().setType(t); } } } } Tree.Block block = that.getBlock(); if (block!=null) block.visit(this); Tree.Expression expression = that.getExpression(); if (expression!=null) expression.visit(this); <<<<<<< if (hasIsCase && switchVariable==null && switchExpression!=null) { Tree.Term st = switchExpression.getTerm(); if (st instanceof Tree.BaseMemberExpression) { checkReferenceIsNonVariable((Tree.BaseMemberExpression) st, true); } else if (st!=null) { st.addError("switch expression must be a value reference in switch with type cases", 3102); ======= if (hasIsCase) { if (switchStatementOrExpression!=null) { Tree.Expression switchExpression = switchClause().getExpression(); if (switchExpression!=null) { Tree.Term st = switchExpression.getTerm(); if (st instanceof Tree.BaseMemberExpression) { checkReferenceIsNonVariable((Tree.BaseMemberExpression) st, true); } else if (st!=null) { st.addError("switch expression must be a value reference in switch with type cases", 3102); } } >>>>>>> if (hasIsCase) { if (switchStatementOrExpression!=null) { Tree.Expression switchExpression = switchClause().getSwitched().getExpression(); if (switchExpression!=null) { Tree.Term st = switchExpression.getTerm(); if (st instanceof Tree.BaseMemberExpression) { checkReferenceIsNonVariable((Tree.BaseMemberExpression) st, true); } else if (st!=null) { st.addError("switch expression must be a value reference in switch with type cases", 3102); } }
<<<<<<< public class Master extends AccumuloServerContext implements LiveTServerSet.Listener, TableObserver, CurrentState, HighlyAvailableService { ======= public class Master extends AccumuloServerContext implements LiveTServerSet.Listener, TableObserver, CurrentState { >>>>>>> public class Master extends AccumuloServerContext implements LiveTServerSet.Listener, TableObserver, CurrentState, HighlyAvailableService { <<<<<<< VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(RootTable.ID); String newPath = fs.choose(chooserEnv, ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + RootTable.ID; ======= String newPath = fs.choose(Optional.of(RootTable.ID), ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + RootTable.ID; >>>>>>> VolumeChooserEnvironment chooserEnv = new VolumeChooserEnvironment(RootTable.ID); String newPath = fs.choose(chooserEnv, ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + RootTable.ID; <<<<<<< log.debug("Prepping table {} for compaction cancellations.", id); zoo.putPersistentData(zooRoot + Constants.ZTABLES + "/" + id + Constants.ZTABLE_COMPACT_CANCEL_ID, zero, NodeExistsPolicy.SKIP); ======= log.debug("Prepping table " + id + " for compaction cancellations."); zoo.putPersistentData( zooRoot + Constants.ZTABLES + "/" + id + Constants.ZTABLE_COMPACT_CANCEL_ID, zero, NodeExistsPolicy.SKIP); >>>>>>> log.debug("Prepping table {} for compaction cancellations.", id); zoo.putPersistentData( zooRoot + Constants.ZTABLES + "/" + id + Constants.ZTABLE_COMPACT_CANCEL_ID, zero, NodeExistsPolicy.SKIP); <<<<<<< for (Pair<String,Namespace.ID> namespace : Iterables.concat(Collections.singleton(new Pair<>(Namespace.ACCUMULO, Namespace.ID.ACCUMULO)), Collections.singleton(new Pair<>(Namespace.DEFAULT, Namespace.ID.DEFAULT)))) { ======= for (Pair<String,String> namespace : Iterables.concat( Collections.singleton( new Pair<>(Namespaces.ACCUMULO_NAMESPACE, Namespaces.ACCUMULO_NAMESPACE_ID)), Collections.singleton( new Pair<>(Namespaces.DEFAULT_NAMESPACE, Namespaces.DEFAULT_NAMESPACE_ID)))) { >>>>>>> for (Pair<String,Namespace.ID> namespace : Iterables.concat( Collections.singleton(new Pair<>(Namespace.ACCUMULO, Namespace.ID.ACCUMULO)), Collections.singleton(new Pair<>(Namespace.DEFAULT, Namespace.ID.DEFAULT)))) { <<<<<<< log.debug("Upgrade creating table {} (ID: {})", ReplicationTable.NAME, ReplicationTable.ID); TableManager.prepareNewTableState(getInstance().getInstanceID(), ReplicationTable.ID, Namespace.ID.ACCUMULO, ReplicationTable.NAME, TableState.OFFLINE, NodeExistsPolicy.SKIP); ======= log.debug("Upgrade creating table " + ReplicationTable.NAME + " (ID: " + ReplicationTable.ID + ")"); TableManager.prepareNewTableState(getInstance().getInstanceID(), ReplicationTable.ID, Namespaces.ACCUMULO_NAMESPACE_ID, ReplicationTable.NAME, TableState.OFFLINE, NodeExistsPolicy.SKIP); >>>>>>> log.debug("Upgrade creating table {} (ID: {})", ReplicationTable.NAME, ReplicationTable.ID); TableManager.prepareNewTableState(getInstance().getInstanceID(), ReplicationTable.ID, Namespace.ID.ACCUMULO, ReplicationTable.NAME, TableState.OFFLINE, NodeExistsPolicy.SKIP); <<<<<<< security.grantTablePermission(rpcCreds(), security.getRootUsername(), RootTable.ID, TablePermission.ALTER_TABLE, Namespace.ID.ACCUMULO); ======= security.grantTablePermission(rpcCreds(), security.getRootUsername(), RootTable.ID, TablePermission.ALTER_TABLE, Namespaces.ACCUMULO_NAMESPACE_ID); >>>>>>> security.grantTablePermission(rpcCreds(), security.getRootUsername(), RootTable.ID, TablePermission.ALTER_TABLE, Namespace.ID.ACCUMULO); <<<<<<< Namespace.ID targetNamespace = (MetadataTable.ID.canonicalID().equals(tableId) || RootTable.ID.canonicalID().equals(tableId)) ? Namespace.ID.ACCUMULO : Namespace.ID.DEFAULT; log.debug("Upgrade moving table {} (ID: {}) into namespace with ID {}", new String(zoo.getData(tables + "/" + tableId + Constants.ZTABLE_NAME, null), UTF_8), tableId, targetNamespace); zoo.putPersistentData(tables + "/" + tableId + Constants.ZTABLE_NAMESPACE, targetNamespace.getUtf8(), NodeExistsPolicy.SKIP); ======= String targetNamespace = (MetadataTable.ID.equals(tableId) || RootTable.ID.equals(tableId)) ? Namespaces.ACCUMULO_NAMESPACE_ID : Namespaces.DEFAULT_NAMESPACE_ID; log.debug("Upgrade moving table " + new String(zoo.getData(tables + "/" + tableId + Constants.ZTABLE_NAME, null), UTF_8) + " (ID: " + tableId + ") into namespace with ID " + targetNamespace); zoo.putPersistentData(tables + "/" + tableId + Constants.ZTABLE_NAMESPACE, targetNamespace.getBytes(UTF_8), NodeExistsPolicy.SKIP); >>>>>>> Namespace.ID targetNamespace = (MetadataTable.ID.canonicalID().equals(tableId) || RootTable.ID.canonicalID().equals(tableId)) ? Namespace.ID.ACCUMULO : Namespace.ID.DEFAULT; log.debug("Upgrade moving table {} (ID: {}) into namespace with ID {}", new String(zoo.getData(tables + "/" + tableId + Constants.ZTABLE_NAME, null), UTF_8), tableId, targetNamespace); zoo.putPersistentData(tables + "/" + tableId + Constants.ZTABLE_NAMESPACE, targetNamespace.getUtf8(), NodeExistsPolicy.SKIP); <<<<<<< log.debug("Upgrade renaming table {} (ID: {}) to {}", MetadataTable.OLD_NAME, MetadataTable.ID, MetadataTable.NAME); zoo.putPersistentData(tables + "/" + MetadataTable.ID + Constants.ZTABLE_NAME, Tables.qualify(MetadataTable.NAME).getSecond().getBytes(UTF_8), ======= log.debug("Upgrade renaming table " + MetadataTable.OLD_NAME + " (ID: " + MetadataTable.ID + ") to " + MetadataTable.NAME); zoo.putPersistentData(tables + "/" + MetadataTable.ID + Constants.ZTABLE_NAME, Tables.qualify(MetadataTable.NAME).getSecond().getBytes(UTF_8), >>>>>>> log.debug("Upgrade renaming table {} (ID: {}) to {}", MetadataTable.OLD_NAME, MetadataTable.ID, MetadataTable.NAME); zoo.putPersistentData(tables + "/" + MetadataTable.ID + Constants.ZTABLE_NAME, Tables.qualify(MetadataTable.NAME).getSecond().getBytes(UTF_8), <<<<<<< ThriftTransportPool.getInstance().setIdleTime(aconf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)); ======= ThriftTransportPool.getInstance() .setIdleTime(aconf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)); >>>>>>> ThriftTransportPool.getInstance() .setIdleTime(aconf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)); <<<<<<< this.tabletBalancer = Property.createInstanceFromPropertyName(aconf, Property.MASTER_TABLET_BALANCER, TabletBalancer.class, new DefaultLoadBalancer()); this.tabletBalancer.init(this); ======= this.tabletBalancer = aconf.instantiateClassProperty(Property.MASTER_TABLET_BALANCER, TabletBalancer.class, new DefaultLoadBalancer()); this.tabletBalancer.init(serverConfig); >>>>>>> this.tabletBalancer = Property.createInstanceFromPropertyName(aconf, Property.MASTER_TABLET_BALANCER, TabletBalancer.class, new DefaultLoadBalancer()); this.tabletBalancer.init(this); <<<<<<< public void clearMergeState(Table.ID tableId) throws IOException, KeeperException, InterruptedException { ======= public void clearMergeState(String tableId) throws IOException, KeeperException, InterruptedException { >>>>>>> public void clearMergeState(Table.ID tableId) throws IOException, KeeperException, InterruptedException { <<<<<<< log.debug("{}: {} != {}", watcher.getName(), watcher.stats.getLastMasterState(), getMasterState()); ======= log.debug(watcher.getName() + ": " + watcher.stats.getLastMasterState() + " != " + getMasterState()); >>>>>>> log.debug("{}: {} != {}", watcher.getName(), watcher.stats.getLastMasterState(), getMasterState()); <<<<<<< log.error("Error balancing tablets, will wait for {} (seconds) and then retry ", WAIT_BETWEEN_ERRORS / ONE_SECOND, t); ======= log.error("Error balancing tablets, will wait for " + WAIT_BETWEEN_ERRORS / ONE_SECOND + " (seconds) and then retry", t); >>>>>>> log.error("Error balancing tablets, will wait for {} (seconds) and then retry ", WAIT_BETWEEN_ERRORS / ONE_SECOND, t); <<<<<<< log.debug("not balancing because the balance information is out-of-date {}", badServers.keySet()); ======= log.debug( "not balancing because the balance information is out-of-date " + badServers.keySet()); >>>>>>> log.debug("not balancing because the balance information is out-of-date {}", badServers.keySet()); <<<<<<< log.warn("Tablet server {} exceeded maximum hold time: attempting to kill it", instance); ======= log.warn( "Tablet server " + instance + " exceeded maximum hold time: attempting to kill it"); >>>>>>> log.warn("Tablet server {} exceeded maximum hold time: attempting to kill it", instance); <<<<<<< ======= clientHandler = new MasterClientServiceHandler(this); Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor<Iface>(clientHandler)); final Processor<Iface> processor; if (ThriftServerType.SASL == getThriftServerType()) { Iface tcredsProxy = TCredentialsUpdatingWrapper.service(rpcProxy, clientHandler.getClass(), getConfiguration()); processor = new Processor<>(tcredsProxy); } else { processor = new Processor<>(rpcProxy); } ServerAddress sa = TServerUtils.startServer(this, hostname, Property.MASTER_CLIENTPORT, processor, "Master", "Master Client Service Handler", null, Property.MASTER_MINTHREADS, Property.MASTER_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE); clientService = sa.server; >>>>>>> <<<<<<< ======= // Start the replication coordinator which assigns tservers to service replication requests MasterReplicationCoordinator impl = new MasterReplicationCoordinator(this); ReplicationCoordinator.Processor<ReplicationCoordinator.Iface> replicationCoordinatorProcessor = new ReplicationCoordinator.Processor<>( RpcWrapper.service(impl, new ReplicationCoordinator.Processor<ReplicationCoordinator.Iface>(impl))); ServerAddress replAddress = TServerUtils.startServer(this, hostname, Property.MASTER_REPLICATION_COORDINATOR_PORT, replicationCoordinatorProcessor, "Master Replication Coordinator", "Replication Coordinator", null, Property.MASTER_REPLICATION_COORDINATOR_MINTHREADS, Property.MASTER_REPLICATION_COORDINATOR_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE); log.info("Started replication coordinator service at " + replAddress.address); >>>>>>> <<<<<<< Instance instance = HdfsZooInstance.getInstance(); ServerConfigurationFactory conf = new ServerConfigurationFactory(instance); ======= ServerConfigurationFactory conf = new ServerConfigurationFactory( HdfsZooInstance.getInstance()); >>>>>>> Instance instance = HdfsZooInstance.getInstance(); ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
<<<<<<< if (that.getTypeConstructor()) { tal.addError("type constructor may not specify type arguments"); } tal.setTypeModels(ta); ======= if (params.isEmpty()) { that.addError("does not accept type arguments: '" + dec.getName(unit) + "' is not a generic type"); } tal.setTypeModels(typeArgs); >>>>>>> if (that.getTypeConstructor()) { tal.addError("type constructor may not specify type arguments"); } if (params.isEmpty()) { that.addError("does not accept type arguments: '" + dec.getName(unit) + "' is not a generic type"); } tal.setTypeModels(typeArgs); <<<<<<< if (et.getTypeConstructor()) { et.addError("type constructor may not occur as extended type"); } else { ProducedType type = et.getTypeModel(); if (type!=null) { TypeDeclaration etd = et.getDeclarationModel(); if (etd!=null && !(etd instanceof UnknownType)) { if (etd instanceof Constructor) { type = type.getExtendedType(); etd = etd.getExtendedTypeDeclaration(); } if (etd==td) { //unnecessary, handled by SupertypeVisitor // et.addError("directly extends itself: '" + // td.getName() + "'"); } else if (etd instanceof TypeParameter) { et.addError("directly extends a type parameter: '" + type.getDeclaration().getName(unit) + "'"); } else if (etd instanceof Interface) { et.addError("extends an interface: '" + type.getDeclaration().getName(unit) + "'"); } else if (etd instanceof TypeAlias) { et.addError("extends a type alias: '" + type.getDeclaration().getName(unit) + "'"); } else { td.setExtendedType(type); } ======= ProducedType type = et.getTypeModel(); if (type!=null) { TypeDeclaration etd = et.getDeclarationModel(); if (etd!=null && !(etd instanceof UnknownType)) { if (etd instanceof Constructor) { type = type.getExtendedType(); etd = etd.getExtendedTypeDeclaration(); } if (etd==td) { //unnecessary, handled by SupertypeVisitor // et.addError("directly extends itself: '" + // td.getName() + "'"); } else if (etd instanceof TypeParameter) { et.addError("directly extends a type parameter: '" + type.getDeclaration().getName(unit) + "'"); } else if (etd instanceof Interface) { et.addError("extends an interface: '" + type.getDeclaration().getName(unit) + "'"); } else if (etd instanceof TypeAlias) { et.addError("extends a type alias: '" + type.getDeclaration().getName(unit) + "'"); } else { td.setExtendedType(type); >>>>>>> if (et.getTypeConstructor()) { et.addError("type constructor may not occur as extended type"); } else { ProducedType type = et.getTypeModel(); if (type!=null) { TypeDeclaration etd = et.getDeclarationModel(); if (etd!=null && !(etd instanceof UnknownType)) { if (etd instanceof Constructor) { type = type.getExtendedType(); etd = etd.getExtendedTypeDeclaration(); } if (etd==td) { //unnecessary, handled by SupertypeVisitor // et.addError("directly extends itself: '" + // td.getName() + "'"); } else if (etd instanceof TypeParameter) { et.addError("directly extends a type parameter: '" + type.getDeclaration().getName(unit) + "'"); } else if (etd instanceof Interface) { et.addError("extends an interface: '" + type.getDeclaration().getName(unit) + "'"); } else if (etd instanceof TypeAlias) { et.addError("extends a type alias: '" + type.getDeclaration().getName(unit) + "'"); } else { td.setExtendedType(type); } <<<<<<< if (td instanceof TypeParameter) { ct.addError("enumerated bound must be a class or interface type"); } else { ct.addError("case type must be a class, interface, or self type"); } continue; ======= ct.addError("case type must be a class, interface, or self type"); >>>>>>> if (td instanceof TypeParameter) { ct.addError("enumerated bound must be a class or interface type"); } else { ct.addError("case type must be a class, interface, or self type"); } continue;
<<<<<<< }*/ ======= if (a instanceof Generic && !((Generic)a).getTypeParameters().isEmpty()) { that.addError("parameter declaration has type parameters: " + d.getName()); } /*if (d.isHidden() && d.getDeclaration() instanceof Method) { if (a instanceof Method) { that.addWarning("initializer parameters for inner methods of methods not yet supported"); } if (a instanceof Value && ((Value) a).isVariable()) { that.addWarning("initializer parameters for variables of methods not yet supported"); } }*/ } >>>>>>> }*/ if (a instanceof Generic && !((Generic)a).getTypeParameters().isEmpty()) { that.addError("parameter declaration has type parameters: " + d.getName()); }
<<<<<<< ======= import com.redhat.ceylon.compiler.typechecker.model.ClassOrInterface; import com.redhat.ceylon.compiler.typechecker.model.Declaration; import com.redhat.ceylon.compiler.typechecker.model.MethodOrValue; import com.redhat.ceylon.compiler.typechecker.model.ProducedType; import com.redhat.ceylon.compiler.typechecker.model.TypeDeclaration; import com.redhat.ceylon.compiler.typechecker.model.TypeParameter; import com.redhat.ceylon.compiler.typechecker.model.TypedDeclaration; >>>>>>>
<<<<<<< ======= import com.redhat.ceylon.compiler.typechecker.tree.Tree.BaseTypeExpression; import com.redhat.ceylon.compiler.typechecker.tree.Tree.ExpressionList; import com.redhat.ceylon.compiler.typechecker.tree.Tree.Identifier; import com.redhat.ceylon.compiler.typechecker.tree.Tree.NamedArgumentList; import com.redhat.ceylon.compiler.typechecker.tree.Tree.SequencedArgument; >>>>>>> import com.redhat.ceylon.compiler.typechecker.tree.Tree.BaseTypeExpression; import com.redhat.ceylon.compiler.typechecker.tree.Tree.ExpressionList; import com.redhat.ceylon.compiler.typechecker.tree.Tree.Identifier; import com.redhat.ceylon.compiler.typechecker.tree.Tree.NamedArgumentList; import com.redhat.ceylon.compiler.typechecker.tree.Tree.SequencedArgument; <<<<<<< ======= if (id.getText().equals("Package")) { Tree.SpecifiedArgument nsa = getArgument(that, "name"); String packageName = argumentToString(nsa); if (packageName==null) { that.addError("missing package name"); } if (packageName.isEmpty()) { nsa.addError("empty package name"); } else if (packageName.startsWith(Module.DEFAULT_MODULE_NAME)) { nsa.addError("default is a reserved package name"); } else if (pkg.getName().isEmpty()) { that.addError("package descriptor may not be defined in the root source directory"); } else { if ( !pkg.getNameAsString().equals(packageName) ) { nsa.addError("package name does not match descriptor location"); } pkg.setDoc(argumentToString(getArgument(that, "doc"))); String shared = argumentToString(getArgument(that, "shared")); if (shared!=null && shared.equals("true")) { pkg.setShared(true); } List<String> by = argumentToStrings(getArgument(that, "by")); if (by!=null) { pkg.getAuthors().addAll(by); } } } >>>>>>> //this is from master, who knows what it does? /*if (id.getText().equals("Package")) { Tree.SpecifiedArgument nsa = getArgument(that, "name"); String packageName = argumentToString(nsa); if (packageName==null) { that.addError("missing package name"); } if (packageName.isEmpty()) { nsa.addError("empty package name"); } else if (packageName.startsWith(Module.DEFAULT_MODULE_NAME)) { nsa.addError("default is a reserved package name"); } else if (pkg.getName().isEmpty()) { that.addError("package descriptor may not be defined in the root source directory"); } else { if ( !pkg.getNameAsString().equals(packageName) ) { nsa.addError("package name does not match descriptor location"); } pkg.setDoc(argumentToString(getArgument(that, "doc"))); String shared = argumentToString(getArgument(that, "shared")); if (shared!=null && shared.equals("true")) { pkg.setShared(true); } List<String> by = argumentToStrings(getArgument(that, "by")); if (by!=null) { pkg.getAuthors().addAll(by); } } }*/ <<<<<<< ======= private List<String> argumentToStrings(Tree.SpecifiedArgument sa) { if (sa==null) return null; Tree.SpecifierExpression se = sa.getSpecifierExpression(); if (se!=null && se.getExpression()!=null) { Tree.Term term = se.getExpression().getTerm(); if (term instanceof Tree.SequenceEnumeration) { List<String> result = new ArrayList<String>(); SequencedArgument sqa = ((Tree.SequenceEnumeration) term).getSequencedArgument(); if (sqa!=null) { ExpressionList el = sqa.getExpressionList(); if (el!=null) { for (Tree.Expression exp: el.getExpressions()) { result.add(termToString(exp.getTerm())); } } } return result; } else { return null; } } else { return null; } } private String argumentToString(Tree.SpecifiedArgument sa) { if (sa==null) return null; Tree.SpecifierExpression se = sa.getSpecifierExpression(); if (se!=null && se.getExpression()!=null) { Tree.Term term = se.getExpression().getTerm(); return termToString(term); } else { return null; } } private String termToString(Tree.Term term) { if (term instanceof Tree.Literal) { String text = term.getText(); if (text.length()>=2 && (text.startsWith("'") && text.endsWith("'") || text.startsWith("\"") && text.endsWith("\"")) ) { return text.substring(1, text.length()-1); } else { return text; } } else if (term instanceof Tree.BaseMemberExpression) { return ((Tree.BaseMemberExpression) term).getIdentifier().getText(); } else { term.addError("module and package descriptors must be defined using literal value expressions"); return null; } } >>>>>>> private List<String> argumentToStrings(Tree.SpecifiedArgument sa) { if (sa==null) return null; Tree.SpecifierExpression se = sa.getSpecifierExpression(); if (se!=null && se.getExpression()!=null) { Tree.Term term = se.getExpression().getTerm(); if (term instanceof Tree.SequenceEnumeration) { List<String> result = new ArrayList<String>(); SequencedArgument sqa = ((Tree.SequenceEnumeration) term).getSequencedArgument(); if (sqa!=null) { ExpressionList el = sqa.getExpressionList(); if (el!=null) { for (Tree.Expression exp: el.getExpressions()) { result.add(termToString(exp.getTerm())); } } } return result; } else { return null; } } else { return null; } } private String argumentToString(Tree.SpecifiedArgument sa) { if (sa==null) return null; Tree.SpecifierExpression se = sa.getSpecifierExpression(); if (se!=null && se.getExpression()!=null) { Tree.Term term = se.getExpression().getTerm(); return termToString(term); } else { return null; } } private String termToString(Tree.Term term) { if (term instanceof Tree.Literal) { String text = term.getText(); if (text.length()>=2 && (text.startsWith("'") && text.endsWith("'") || text.startsWith("\"") && text.endsWith("\"")) ) { return text.substring(1, text.length()-1); } else { return text; } } else if (term instanceof Tree.BaseMemberExpression) { return ((Tree.BaseMemberExpression) term).getIdentifier().getText(); } else { term.addError("module and package descriptors must be defined using literal value expressions"); return null; } }
<<<<<<< import net.frakbot.FWeather.FWeatherWidgetProvider; ======= import com.google.analytics.tracking.android.EasyTracker; >>>>>>> import net.frakbot.FWeather.FWeatherWidgetProvider; import com.google.analytics.tracking.android.EasyTracker; <<<<<<< import net.frakbot.FWeather.updater.UpdaterService; ======= import net.frakbot.FWeather.util.TrackerHelper; >>>>>>> import net.frakbot.FWeather.updater.UpdaterService; <<<<<<< * Sets up the Changelog preference click listener. * * @param preference The Changelog preference. */ private void setupChangelogOnClickListener(Preference preference) { preference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { AlertDialog.Builder b = new AlertDialog.Builder(SettingsActivity.this/*, R.style.Theme_FWeather_Settings_Dialog*/); b.setTitle(R.string.pref_title_changelog) .setView(getLayoutInflater().inflate(R.layout.dialog_changelog, null)) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); b.show(); return true; } }); } /** ======= * Handles the preference change by requesting the TrackerHelper to send an event. * @param preference The changed preference * @param newValue The new value */ private void handlePreferenceChange(Preference preference, Object newValue) { Long value = Long.valueOf(0); if (preference.getKey().equals(Const.Preferences.ANALYTICS)) { if (newValue == Boolean.FALSE) value = Long.valueOf(0); else value = Long.valueOf(1); } else if (preference.getKey().equals(Const.Preferences.SYNC_FREQUENCY)) { value = Long.valueOf((String)newValue); } TrackerHelper.preferenceChange(this, preference.getKey(), value); } /** Builds the listener for the preference changes. */ private void buildListener() { sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object value) { String stringValue = value.toString(); if (preference.getKey().equals(Const.Preferences.SYNC_FREQUENCY)) { SharedPreferences prefs = preference.getSharedPreferences(); // If the old value differs from the new value if (!prefs.getString(Const.Preferences.SYNC_FREQUENCY, "-1").equals(stringValue)) { sendSyncPreferenceChangedBroadcast(); // Handle the generic preference change handlePreferenceChange(preference, value); } } if (preference instanceof ListPreference) { // For list preferences, look up the correct display value in // the preference's 'entries' list. ListPreference listPreference = (ListPreference) preference; int index = listPreference.findIndexOfValue(stringValue); // Set the summary to reflect the new value. preference .setSummary(index >= 0 ? listPreference.getEntries()[index] : null); } else { // For all other preferences, set the summary to the value's // simple string representation. preference.setSummary(stringValue); } return true; } }; } /** >>>>>>> * Handles the preference change by requesting the TrackerHelper to send an event. * @param preference The changed preference * @param newValue The new value */ private void handlePreferenceChange(Preference preference, Object newValue) { Long value = Long.valueOf(0); if (preference.getKey().equals(Const.Preferences.ANALYTICS)) { if (newValue == Boolean.FALSE) value = Long.valueOf(0); else value = Long.valueOf(1); } else if (preference.getKey().equals(Const.Preferences.SYNC_FREQUENCY)) { value = Long.valueOf((String)newValue); } TrackerHelper.preferenceChange(this, preference.getKey(), value); } /** Builds the listener for the preference changes. */ private void buildListener() { sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object value) { String stringValue = value.toString(); if (preference.getKey().equals(Const.Preferences.SYNC_FREQUENCY)) { SharedPreferences prefs = preference.getSharedPreferences(); // If the old value differs from the new value if (!prefs.getString(Const.Preferences.SYNC_FREQUENCY, "-1").equals(stringValue)) { sendSyncPreferenceChangedBroadcast(); // Handle the generic preference change handlePreferenceChange(preference, value); } } if (preference instanceof ListPreference) { // For list preferences, look up the correct display value in // the preference's 'entries' list. ListPreference listPreference = (ListPreference) preference; int index = listPreference.findIndexOfValue(stringValue); // Set the summary to reflect the new value. preference .setSummary(index >= 0 ? listPreference.getEntries()[index] : null); } else { // For all other preferences, set the summary to the value's // simple string representation. preference.setSummary(stringValue); } return true; } }; } /** * Sets up the Changelog preference click listener. * * @param preference The Changelog preference. */ private void setupChangelogOnClickListener(Preference preference) { preference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { AlertDialog.Builder b = new AlertDialog.Builder(SettingsActivity.this/*, R.style.Theme_FWeather_Settings_Dialog*/); b.setTitle(R.string.pref_title_changelog) .setView(getLayoutInflater().inflate(R.layout.dialog_changelog, null)) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); b.show(); return true; } }); } /**
<<<<<<< import android.annotation.TargetApi; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; ======= import android.app.Service; >>>>>>> import android.app.Service; import android.annotation.TargetApi; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; <<<<<<< import de.tutao.tutanota.Crypto; import de.tutao.tutanota.MainActivity; import de.tutao.tutanota.R; import de.tutao.tutanota.Utils; import de.tutao.tutanota.alarms.AlarmBroadcastReceiver; import de.tutao.tutanota.alarms.AlarmNotification; import de.tutao.tutanota.alarms.AlarmNotificationsManager; ======= import de.tutao.tutanota.Crypto; import de.tutao.tutanota.MainActivity; import de.tutao.tutanota.Utils; import de.tutao.tutanota.alarms.AlarmNotification; import de.tutao.tutanota.alarms.AlarmNotificationsManager; >>>>>>> import de.tutao.tutanota.Crypto; import de.tutao.tutanota.MainActivity; import de.tutao.tutanota.Utils; import de.tutao.tutanota.alarms.AlarmNotification; import de.tutao.tutanota.alarms.AlarmNotificationsManager; import de.tutao.tutanota.Crypto; import de.tutao.tutanota.MainActivity; import de.tutao.tutanota.R; import de.tutao.tutanota.Utils; import de.tutao.tutanota.alarms.AlarmBroadcastReceiver; import de.tutao.tutanota.alarms.AlarmNotification; import de.tutao.tutanota.alarms.AlarmNotificationsManager; <<<<<<< public static final String NOTIFICATION_DISMISSED_ADDR_EXTRA = "notificationDismissed"; public static final String HEARTBEAT_TIMEOUT_IN_SECONDS_KEY = "heartbeatTimeoutInSeconds"; public static final String EMAIL_NOTIFICATION_CHANNEL_ID = "notifications"; private static final String PERSISTENT_NOTIFICATION_CHANNEL_ID = "service_intent"; public static final long[] VIBRATION_PATTERN = {100, 200, 100, 200}; public static final String NOTIFICATION_EMAIL_GROUP = "de.tutao.tutanota.email"; public static final int SUMMARY_NOTIFICATION_ID = 45; public static final int RECONNECTION_ATTEMPTS = 3; ======= >>>>>>> public static final int RECONNECTION_ATTEMPTS = 3; <<<<<<< private int failedConnectionAttempts = 0; ======= private LocalNotificationsFacade localNotificationsFacade; >>>>>>> private LocalNotificationsFacade localNotificationsFacade; private int failedConnectionAttempts = 0; <<<<<<< startForeground(1, new NotificationCompat .Builder(this, PERSISTENT_NOTIFICATION_CHANNEL_ID) .setContentTitle("Notification service") .setContentText("Syncing notifications") .setSmallIcon(R.drawable.ic_status) .setProgress(0, 0, true) .build()); ======= startForeground(1, localNotificationsFacade.makeConnectionNotification()); >>>>>>> startForeground(1, localNotificationsFacade.makeConnectionNotification()); <<<<<<< handleNotificationInfos(notificationManager, pushMessage, notificationInfos); ======= handleNotificationInfos(pushMessage, notificationInfos); >>>>>>> handleNotificationInfos(pushMessage, notificationInfos);
<<<<<<< names = {"--aet_dictionary"}, description = "Path to json containing aet definitions (array containing name/host/port per element)" ) String aetDictionaryPath = ""; @Parameter( names = {"--gcp_project_id"}, description = "Google cloud platform project id" ======= names = {"--monitoring_project_id"}, description = "Stackdriver monitoring project id, must be the same as the project id in which the adapter is running" >>>>>>> names = {"--aet_dictionary"}, description = "Path to json containing aet definitions (array containing name/host/port per element)" ) String aetDictionaryPath = ""; @Parameter( names = {"--monitoring_project_id"}, description = "Stackdriver monitoring project id, must be the same as the project id in which the adapter is running"
<<<<<<< Type expectedItemType = Types.getTypeArgument(expected, 0, null); for (Object item : pruner.getRange().apply((Collection) value)) { writeValue(expectedItemType,item,pruner,writer,true); ======= for (Object item : pruner.getRange().apply((Iterable) value)) { writeValue(item,pruner,writer,true); >>>>>>> Type expectedItemType = Types.getTypeArgument(expected, 0, null); for (Object item : pruner.getRange().apply((Iterable) value)) { writeValue(expectedItemType,item,pruner,writer,true);
<<<<<<< for (Function f : node.methods.webMethods()) { WebMethod a = f.getAnnotation(WebMethod.class); String[] names; if(a!=null && a.name().length>0) names=a.name(); else names=new String[]{camelize(f.getName().substring(2))}; // 'doFoo' -> 'foo' for (String name : names) { final Function ff = f.contextualize(new WebMethodContext(name)); if (name.length()==0) { dispatchers.add(new IndexDispatcher(ff)); } else { dispatchers.add(new NameBasedDispatcher(name) { public boolean doDispatch(RequestImpl req, ResponseImpl rsp, Object node) throws IllegalAccessException, InvocationTargetException, ServletException, IOException { Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s", ff.getName()); if (traceable()) trace(req, rsp, "-> <%s>.%s(...)", node, ff.getName()); return ff.bindAndInvokeAndServeResponse(node, req, rsp); } public String toString() { return ff.getQualifiedName() + "(...) for url=/" + name + "/..."; } }); } } } ======= registerDoToken(node); >>>>>>> registerDoToken(node); <<<<<<< Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s", f.getName()); if(traceable()) traceEval(req,rsp,node,f.getName()); req.getStapler().invoke(req, rsp, f.get(node)); return true; ======= if (traceable()) traceEval(req, rsp, node, f.getName()); req.getStapler().invoke(req, rsp, f.get(node)); return true; } else { return webApp.getFilteredFieldTriggerListener().onFieldTrigger(f, req, rsp, node, f.getQualifiedName()); } >>>>>>> Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s", f.getName()); if (traceable()) traceEval(req, rsp, node, f.getName()); req.getStapler().invoke(req, rsp, f.get(node)); return true; } else { return webApp.getFilteredFieldTriggerListener().onFieldTrigger(f, req, rsp, node, f.getQualifiedName()); } <<<<<<< Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s()", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"()"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node)); return true; ======= if(isAccepted){ if(traceable()) traceEval(req,rsp,node,ff.getName()+"()"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node)); return true; }else{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"()"); } >>>>>>> if(isAccepted){ Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s()", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"()"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node)); return true; }else{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"()"); } <<<<<<< Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(...)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"(...)"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node, req)); return true; ======= if(isAccepted){ if(traceable()) traceEval(req,rsp,node,ff.getName()+"(...)"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node, req)); return true; }else{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"(...)"); } >>>>>>> if(isAccepted){ Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(...)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"(...)"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node, req)); return true; }else{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"(...)"); } <<<<<<< String token = req.tokens.next(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(String)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"(\""+token+"\")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,token)); return true; ======= if(isAccepted){ String token = req.tokens.next(); if(traceable()) traceEval(req,rsp,node,ff.getName()+"(\""+token+"\")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,token)); return true; }else{ String token = req.tokens.next(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"(\""+token+"\")"); } finally{ req.tokens.prev(); } } >>>>>>> if(isAccepted){ String token = req.tokens.next(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(String)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"(\""+token+"\")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,token)); return true; }else{ String token = req.tokens.next(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"(\""+token+"\")"); } finally{ req.tokens.prev(); } } <<<<<<< int idx = req.tokens.nextAsInt(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(int)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; ======= if(isAccepted){ int idx = req.tokens.nextAsInt(); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; }else{ int idx = req.tokens.nextAsInt(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"("+idx+")"); } finally{ req.tokens.prev(); } } >>>>>>> if(isAccepted){ int idx = req.tokens.nextAsInt(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(int)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; }else{ int idx = req.tokens.nextAsInt(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"("+idx+")"); } finally{ req.tokens.prev(); } } <<<<<<< long idx = req.tokens.nextAsLong(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(long)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; ======= if(isAccepted){ long idx = req.tokens.nextAsLong(); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; }else{ long idx = req.tokens.nextAsLong(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"("+idx+")"); } finally{ req.tokens.prev(); } } >>>>>>> if(isAccepted){ long idx = req.tokens.nextAsLong(); Dispatcher.anonymizedTraceEval(req, rsp, node, "%s#%s(long)", ff.getName()); if(traceable()) traceEval(req,rsp,node,ff.getName()+"("+idx+")"); req.getStapler().invoke(req,rsp, ff.invoke(req, rsp, node,idx)); return true; }else{ long idx = req.tokens.nextAsLong(); try{ return webApp.getFilteredGetterTriggerListener().onGetterTrigger(f, req, rsp, node, ff.getName()+"("+idx+")"); } finally{ req.tokens.prev(); } }
<<<<<<< /** * @return client to use for HTTP calls. */ public HttpClient getHttpClient() { return httpClient; } private void setNamespaceContext(XmlHttpResponse response) { ======= public void setContext(XmlHttpResponse response) { >>>>>>> /** * @return client to use for HTTP calls. */ public HttpClient getHttpClient() { return httpClient; } public void setContext(XmlHttpResponse response) {
<<<<<<< private Realm mRealm; private String mAndroidId; private boolean[] drawSensors = new boolean[6]; ======= private boolean[] drawSensors = new boolean[SENSOR_TOOGLES]; >>>>>>> private Realm mRealm; private String mAndroidId; private boolean[] drawSensors = new boolean[SENSOR_TOOGLES];
<<<<<<< log.mergingConfigWith(defaultKafkaCfg); ======= >>>>>>> log.mergingConfigWith(defaultKafkaCfg);
<<<<<<< ======= import com.graphhopper.reader.OSMNode; import com.graphhopper.reader.OSMWay; import com.graphhopper.reader.OSMRelation; >>>>>>> import com.graphhopper.reader.OSMNode; import com.graphhopper.reader.OSMRelation; import com.graphhopper.reader.OSMWay; <<<<<<< //edge encoders private List<AbstractFlagEncoder> encoders = new ArrayList<AbstractFlagEncoder>(); private int edgeEncoderCount = 0; private int edgeEncoderNextBit = 0; private List<TurnCostEncoder> turnCostEncoders = new ArrayList<TurnCostEncoder>(); private int turnEncoderCount = 0; private int turnEncoderNextBit = 0; ======= private ArrayList<AbstractFlagEncoder> encoders = new ArrayList<AbstractFlagEncoder>(); private int nextWayBit = 0; private int nextRelBit = 0; private int nextNodeBit = 0; >>>>>>> //edge encoders private List<AbstractFlagEncoder> encoders = new ArrayList<AbstractFlagEncoder>(); private int edgeEncoderNextBit = 0; private List<TurnCostEncoder> turnCostEncoders = new ArrayList<TurnCostEncoder>(); private int turnEncoderNextBit = 0; private int nextWayBit = 0; private int nextRelBit = 0; private int nextNodeBit = 0; <<<<<<< edgeEncoderNextBit = usedBits; edgeEncoderCount = encoders.size(); } public void registerTurnCostFlagEncoder( TurnCostEncoder encoder ) { turnCostEncoders.add(encoder); int usedBits = encoder.defineBits(turnEncoderCount, turnEncoderNextBit); if (usedBits >= MAX_BITS) { throw new IllegalArgumentException("Encoders are requesting more than 32 bits of flags"); } turnEncoderNextBit = usedBits; turnEncoderCount = turnCostEncoders.size(); ======= usedBits = encoder.defineRelationBits(encoderCount, nextRelBit); if (usedBits >= MAX_BITS) throw new IllegalArgumentException("Encoders are requesting more than " + MAX_BITS + " bits of relation flags"); encoder.setRelBitMask(usedBits - nextRelBit, nextRelBit); nextRelBit = usedBits; >>>>>>> usedBits = encoder.defineRelationBits(encoderCount, nextRelBit); if (usedBits >= MAX_BITS) throw new IllegalArgumentException("Encoders are requesting more than " + MAX_BITS + " bits of relation flags"); encoder.setRelBitMask(usedBits - nextRelBit, nextRelBit); nextRelBit = usedBits; edgeEncoderNextBit = usedBits; } public void registerTurnCostFlagEncoder( TurnCostEncoder encoder ) { int turnEncoderCount = turnCostEncoders.size(); turnCostEncoders.add(encoder); int usedBits = encoder.defineBits(turnEncoderCount, turnEncoderNextBit); if (usedBits >= MAX_BITS) { throw new IllegalArgumentException("Encoders are requesting more than 32 bits of flags"); } turnEncoderNextBit = usedBits; <<<<<<< for (int i = 0; i < edgeEncoderCount; i++) ======= int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< int includeWay = 0; for (int i = 0; i < edgeEncoderCount; i++) ======= long includeWay = 0; int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int includeWay = 0; int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< for (int i = 0; i < edgeEncoderCount; i++) ======= int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< return edgeEncoderCount; ======= return encoders.size(); >>>>>>> return encoders.size(); <<<<<<< for (int i = 0; i < edgeEncoderCount; i++) ======= int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< for (int i = 0; i < edgeEncoderCount; i++) ======= int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< int flags = 0; for (int i = 0; i < edgeEncoderCount; i++) ======= long flags = 0; int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> long flags = 0; int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< for (int i = 0; i < edgeEncoderCount; i++) ======= int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< int flags = 0; for (int i = 0; i < edgeEncoderCount; i++) ======= long flags = 0; int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> long flags = 0; int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) <<<<<<< for (int i = 0; i < edgeEncoderCount; i++) ======= int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++) >>>>>>> int encoderCount = encoders.size(); for (int i = 0; i < encoderCount; i++)
<<<<<<< rcrr.removeCompleteRecords(conn, bs, bw); Assert.assertEquals(numRecords, Iterables.size(ReplicationTable.getScanner(conn))); } ======= assertEquals(numRecords, Iterables.size(ReplicationTable.getScanner(conn))); >>>>>>> rcrr.removeCompleteRecords(conn, bs, bw); assertEquals(numRecords, Iterables.size(ReplicationTable.getScanner(conn))); } <<<<<<< // We don't remove any records, so we can just pass in a fake BW for both rcrr.removeCompleteRecords(conn, bs, bw); Assert.assertEquals(numRecords, Iterables.size(ReplicationTable.getScanner(conn))); } ======= assertEquals(numRecords, Iterables.size(ReplicationTable.getScanner(conn))); >>>>>>> // We don't remove any records, so we can just pass in a fake BW for both rcrr.removeCompleteRecords(conn, bs, bw); assertEquals(numRecords, Iterables.size(ReplicationTable.getScanner(conn))); } <<<<<<< try (BatchScanner bs = ReplicationTable.getBatchScanner(conn, 1)) { bs.setRanges(Collections.singleton(new Range())); IteratorSetting cfg = new IteratorSetting(50, WholeRowIterator.class); bs.addScanIterator(cfg); try { Assert.assertEquals(0L, rcrr.removeCompleteRecords(conn, bs, replBw)); } finally { replBw.close(); } ======= BatchScanner bs = ReplicationTable.getBatchScanner(conn, 1); bs.setRanges(Collections.singleton(new Range())); IteratorSetting cfg = new IteratorSetting(50, WholeRowIterator.class); bs.addScanIterator(cfg); try { assertEquals(0l, rcrr.removeCompleteRecords(conn, bs, replBw)); } finally { bs.close(); replBw.close(); >>>>>>> try (BatchScanner bs = ReplicationTable.getBatchScanner(conn, 1)) { bs.setRanges(Collections.singleton(new Range())); IteratorSetting cfg = new IteratorSetting(50, WholeRowIterator.class); bs.addScanIterator(cfg); try { assertEquals(0L, rcrr.removeCompleteRecords(conn, bs, replBw)); } finally { replBw.close(); } <<<<<<< try (BatchScanner bs = ReplicationTable.getBatchScanner(conn, 1)) { bs.setRanges(Collections.singleton(new Range())); IteratorSetting cfg = new IteratorSetting(50, WholeRowIterator.class); bs.addScanIterator(cfg); try { Assert.assertEquals(0L, rcrr.removeCompleteRecords(conn, bs, replBw)); } finally { replBw.close(); } ======= BatchScanner bs = ReplicationTable.getBatchScanner(conn, 1); bs.setRanges(Collections.singleton(new Range())); IteratorSetting cfg = new IteratorSetting(50, WholeRowIterator.class); bs.addScanIterator(cfg); try { assertEquals(0l, rcrr.removeCompleteRecords(conn, bs, replBw)); } finally { bs.close(); replBw.close(); >>>>>>> try (BatchScanner bs = ReplicationTable.getBatchScanner(conn, 1)) { bs.setRanges(Collections.singleton(new Range())); IteratorSetting cfg = new IteratorSetting(50, WholeRowIterator.class); bs.addScanIterator(cfg); try { assertEquals(0L, rcrr.removeCompleteRecords(conn, bs, replBw)); } finally { replBw.close(); }
<<<<<<< import com.graphhopper.util.InstructionList; import com.graphhopper.util.TranslationMap.Translation; import static com.graphhopper.util.TranslationMapTest.SINGLETON; ======= >>>>>>> <<<<<<< new EncodingManager().registerEncoder(fakeEncoder); ======= new EncodingManager().registerEdgeFlagEncoder(fakeEncoder); allowed = fakeEncoder.acceptBit; >>>>>>> new EncodingManager().registerEncoder(fakeEncoder); allowed = fakeEncoder.acceptBit;
<<<<<<< // usually used with a node, this does not work as intended // if( "toll_booth".equals( osmProperties.get( "barrier" ) ) ) if (hasTag("oneway", oneways, osmProperties)) { ======= /* else { // not used on ways according to taginfo if( "city_limit".equals( osmProperties.get( "traffic_sign" ) ) ) speed = 50; //outProperties.put( "car", speed ); } // usually used with a node, this does not work as intended if( "toll_booth".equals( osmProperties.get( "barrier" ) ) ) outProperties.put( "carpaid", true ); */ if (way.hasTag("oneway", oneways)) { //outProperties.put("caroneway", true); >>>>>>> // usually used with a node, this does not work as intended // if( "toll_booth".equals( osmProperties.get( "barrier" ) ) ) if (way.hasTag("oneway", oneways)) { <<<<<<< if (hasTag("oneway", "-1", osmProperties)) { ======= if (way.hasTag("oneway", "-1")) { //outProperties.put("caronewayreverse", true); >>>>>>> if (way.hasTag("oneway", "-1")) {
<<<<<<< private final HashSet<String> intended = new HashSet<String>(); /** * Should be only instantied via EncodingManager */ ======= >>>>>>> private final HashSet<String> intended = new HashSet<String>(); /** * Should be only instantied via EncodingManager */ <<<<<<< // first two bits are reserved for route handling in superclass shift = super.defineWayBits(index, shift); speedEncoder = new EncodedValue("Speed", shift, 5, 5, SPEED.get("secondary"), SPEED.get("motorway")); // speed used 5 bits return shift + 5; ======= shift = super.defineBits(index, shift); speedEncoder = new EncodedValue("Speed", shift, speedBits, speedFactor, SPEED.get("secondary"), SPEED.get("motorway")); return shift + speedBits; >>>>>>> // first two bits are reserved for route handling in superclass shift = super.defineWayBits(index, shift); speedEncoder = new EncodedValue("Speed", shift, speedBits, speedFactor, SPEED.get("secondary"), SPEED.get("motorway")); // speed used 5 bits return shift + speedBits; <<<<<<< @Override public String toString() { return "car"; } private static final Map<String, Integer> TRACKTYPE_SPEED = new HashMap<String, Integer>(); private static final Set<String> BAD_SURFACE = new HashSet<String>(); ======= private static final Set<String> BAD_SURFACE = new HashSet<String>() { { add("cobblestone"); add("grass_paver"); add("gravel"); add("sand"); add("paving_stones"); add("dirt"); add("ground"); add("grass"); } }; >>>>>>> @Override public String toString() { return "car"; } private static final Map<String, Integer> TRACKTYPE_SPEED = new HashMap<String, Integer>(); private static final Set<String> BAD_SURFACE = new HashSet<String>(); <<<<<<< private static final Map<String, Integer> SPEED = new HashMap<String, Integer>(); static { TRACKTYPE_SPEED.put("grade1", 20); // paved TRACKTYPE_SPEED.put("grade2", 15); // now unpaved - gravel mixed with ... TRACKTYPE_SPEED.put("grade3", 10); // ... hard and soft materials TRACKTYPE_SPEED.put("grade4", 5); // ... some hard or compressed materials TRACKTYPE_SPEED.put("grade5", 5); // ... no hard materials. soil/sand/grass BAD_SURFACE.add("cobblestone"); BAD_SURFACE.add("grass_paver"); BAD_SURFACE.add("gravel"); BAD_SURFACE.add("sand"); BAD_SURFACE.add("paving_stones"); BAD_SURFACE.add("dirt"); BAD_SURFACE.add("ground"); BAD_SURFACE.add("grass"); // autobahn SPEED.put("motorway", 100); SPEED.put("motorway_link", 70); // bundesstraße SPEED.put("trunk", 70); SPEED.put("trunk_link", 65); // linking bigger town SPEED.put("primary", 65); SPEED.put("primary_link", 60); // linking towns + villages SPEED.put("secondary", 60); SPEED.put("secondary_link", 50); // streets without middle line separation SPEED.put("tertiary", 50); SPEED.put("tertiary_link", 40); SPEED.put("unclassified", 30); SPEED.put("residential", 30); // spielstraße SPEED.put("living_street", 5); SPEED.put("service", 20); // unknown road SPEED.put("road", 20); // forestry stuff SPEED.put("track", 15); } ======= private static final Map<String, Integer> SPEED = new HashMap<String, Integer>() { { // autobahn put("motorway", 100); put("motorway_link", 70); // bundesstraße put("trunk", 70); put("trunk_link", 65); // linking bigger town put("primary", 65); put("primary_link", 60); // linking towns + villages put("secondary", 60); put("secondary_link", 50); // streets without middle line separation put("tertiary", 50); put("tertiary_link", 40); put("unclassified", 30); put("residential", 30); // spielstraße put("living_street", 5); put("service", 20); // unknown road put("road", 20); // forestry stuff put("track", 15); } }; >>>>>>> private static final Map<String, Integer> SPEED = new HashMap<String, Integer>(); static { TRACKTYPE_SPEED.put("grade1", 20); // paved TRACKTYPE_SPEED.put("grade2", 15); // now unpaved - gravel mixed with ... TRACKTYPE_SPEED.put("grade3", 10); // ... hard and soft materials TRACKTYPE_SPEED.put("grade4", 5); // ... some hard or compressed materials TRACKTYPE_SPEED.put("grade5", 5); // ... no hard materials. soil/sand/grass BAD_SURFACE.add("cobblestone"); BAD_SURFACE.add("grass_paver"); BAD_SURFACE.add("gravel"); BAD_SURFACE.add("sand"); BAD_SURFACE.add("paving_stones"); BAD_SURFACE.add("dirt"); BAD_SURFACE.add("ground"); BAD_SURFACE.add("grass"); // autobahn SPEED.put("motorway", 100); SPEED.put("motorway_link", 70); // bundesstraße SPEED.put("trunk", 70); SPEED.put("trunk_link", 65); // linking bigger town SPEED.put("primary", 65); SPEED.put("primary_link", 60); // linking towns + villages SPEED.put("secondary", 60); SPEED.put("secondary_link", 50); // streets without middle line separation SPEED.put("tertiary", 50); SPEED.put("tertiary_link", 40); SPEED.put("unclassified", 30); SPEED.put("residential", 30); // spielstraße SPEED.put("living_street", 5); SPEED.put("service", 20); // unknown road SPEED.put("road", 20); // forestry stuff SPEED.put("track", 15); }
<<<<<<< import static com.graphhopper.routing.util.TraversalMode.EDGE_BASED_2DIR; import static com.graphhopper.util.Helper.nf; ======= import static com.graphhopper.util.Helper.nf; >>>>>>> import static com.graphhopper.util.Helper.nf; import static com.graphhopper.routing.util.TraversalMode.EDGE_BASED_2DIR; import static com.graphhopper.util.Helper.nf; <<<<<<< maxLevel = prepareGraph.getNodes() + 1; ======= // filter by vehicle and level number final EdgeFilter accessWithLevelFilter = new LevelEdgeFilter(prepareGraph) { @Override public final boolean accept(EdgeIteratorState edgeState) { return super.accept(edgeState) && allFilter.accept(edgeState); } }; maxLevel = prepareGraph.getNodes(); >>>>>>> maxLevel = prepareGraph.getNodes(); <<<<<<< initSize = sortedNodes.getSize(); // todo: why do we start counting levels with 1 ?? int level = 1; ======= initSize = sortedNodes.getSize(); int level = 0; >>>>>>> initSize = sortedNodes.getSize(); int level = 0; <<<<<<< return String.format( "t(dijk): %6.2f, t(period): %6.2f, t(lazy): %6.2f, t(neighbor): %6.2f", dijkstraTime, periodTime, lazyTime, neighborTime); ======= return String.format(Locale.ROOT, "t(dijk): %6.2f, t(period): %6.2f, t(lazy): %6.2f, t(neighbor): %6.2f", dijkstraTime, periodTime, lazyTime, neighborTime); >>>>>>> return String.format(Locale.ROOT, "t(dijk): %6.2f, t(period): %6.2f, t(lazy): %6.2f, t(neighbor): %6.2f", dijkstraTime, periodTime, lazyTime, neighborTime);
<<<<<<< public class AggregatorSet extends ColumnToClassMapping<Aggregator> { public AggregatorSet(Map<String,String> opts) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { super(opts, Aggregator.class); ======= public class AggregatorSet extends ColumnToClassMapping<org.apache.accumulo.core.iterators.aggregation.Aggregator> { public AggregatorSet(Map<String,String> opts) throws InstantiationException, IllegalAccessException, ClassNotFoundException { super(opts, org.apache.accumulo.core.iterators.aggregation.Aggregator.class); >>>>>>> public class AggregatorSet extends ColumnToClassMapping<org.apache.accumulo.core.iterators.aggregation.Aggregator> { public AggregatorSet(Map<String,String> opts) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { super(opts, org.apache.accumulo.core.iterators.aggregation.Aggregator.class);
<<<<<<< iter.next(); assertEquals(3, iter.getAdjNode()); assertEquals(1, GHUtility.count(carOutExplorer.setBaseNode(3))); g.disconnect(g.createEdgeExplorer(), iter); assertEquals(0, GHUtility.count(carOutExplorer.setBaseNode(3))); ======= iter.next(); assertEquals(2, iter.getAdjNode()); assertEquals(1, GHUtility.count(carOutExplorer.setBaseNode(2))); g.disconnect(g.createEdgeExplorer(), iter); assertEquals(0, GHUtility.count(carOutExplorer.setBaseNode(2))); iter.next(); assertEquals(4, iter.getAdjNode()); >>>>>>> iter.next(); assertEquals(2, iter.getAdjNode()); assertEquals(1, GHUtility.count(carOutExplorer.setBaseNode(2))); g.disconnect(g.createEdgeExplorer(), iter); assertEquals(0, GHUtility.count(carOutExplorer.setBaseNode(2)));
<<<<<<< import com.graphhopper.storage.*; ======= import com.graphhopper.storage.Graph; import com.graphhopper.storage.GraphExtension; import com.graphhopper.storage.NodeAccess; import com.graphhopper.storage.TurnCostExtension; >>>>>>> import com.graphhopper.storage.*; <<<<<<< @Override public Graph getOriginalGraph() { // Note: if the mainGraph of this QueryGraph is a LevelGraph then ignoring the shortcuts will produce a // huge gap of edgeIds between original and virtual edge ids. The only solution would be to move virtual edges // directly after normal edge ids which is ugly as we limit virtual edges to N edges and waste memory or make everything more complex. return origGraph; } public boolean isVirtualEdge( int edgeId ) { return edgeId >= mainEdges; } public boolean isVirtualNode( int nodeId ) { return nodeId >= mainNodes; } ======= class QueryGraphTurnExt extends TurnCostExtension { private final TurnCostExtension mainTurnExtension; public QueryGraphTurnExt( QueryGraph qGraph ) { this.mainTurnExtension = (TurnCostExtension) mainGraph.getExtension(); } @Override public long getTurnCostFlags( int edgeFrom, int nodeVia, int edgeTo ) { if (isVirtualNode(nodeVia)) { return 0; } else if (isVirtualEdge(edgeFrom) || isVirtualEdge(edgeTo)) { if (isVirtualEdge(edgeFrom)) { edgeFrom = queryResults.get((edgeFrom - mainEdges) / 4).getClosestEdge().getEdge(); } if (isVirtualEdge(edgeTo)) { edgeTo = queryResults.get((edgeTo - mainEdges) / 4).getClosestEdge().getEdge(); } return mainTurnExtension.getTurnCostFlags(edgeFrom, nodeVia, edgeTo); } else { return mainTurnExtension.getTurnCostFlags(edgeFrom, nodeVia, edgeTo); } } } >>>>>>> @Override public Graph getOriginalGraph() { // Note: if the mainGraph of this QueryGraph is a LevelGraph then ignoring the shortcuts will produce a // huge gap of edgeIds between original and virtual edge ids. The only solution would be to move virtual edges // directly after normal edge ids which is ugly as we limit virtual edges to N edges and waste memory or make everything more complex. return origGraph; } public boolean isVirtualEdge( int edgeId ) { return edgeId >= mainEdges; } public boolean isVirtualNode( int nodeId ) { return nodeId >= mainNodes; } class QueryGraphTurnExt extends TurnCostExtension { private final TurnCostExtension mainTurnExtension; public QueryGraphTurnExt( QueryGraph qGraph ) { this.mainTurnExtension = (TurnCostExtension) mainGraph.getExtension(); } @Override public long getTurnCostFlags( int edgeFrom, int nodeVia, int edgeTo ) { if (isVirtualNode(nodeVia)) { return 0; } else if (isVirtualEdge(edgeFrom) || isVirtualEdge(edgeTo)) { if (isVirtualEdge(edgeFrom)) { edgeFrom = queryResults.get((edgeFrom - mainEdges) / 4).getClosestEdge().getEdge(); } if (isVirtualEdge(edgeTo)) { edgeTo = queryResults.get((edgeTo - mainEdges) / 4).getClosestEdge().getEdge(); } return mainTurnExtension.getTurnCostFlags(edgeFrom, nodeVia, edgeTo); } else { return mainTurnExtension.getTurnCostFlags(edgeFrom, nodeVia, edgeTo); } } } <<<<<<< if (isVirtualNode(towerNode)) throw new IllegalStateException("Node should not be virtual:" + towerNode + ", " + node2Edge); ======= if (isVirtualNode(towerNode)) throw new IllegalStateException("should not happen:" + towerNode + ", " + node2Edge); >>>>>>> if (isVirtualNode(towerNode)) throw new IllegalStateException("Node should not be virtual:" + towerNode + ", " + node2Edge); <<<<<<< private final PointList pointList; private final int edgeId; private double distance; private long flags; private String name; private final int baseNode; private final int adjNode; public VirtualEdgeIState( int edgeId, int baseNode, int adjNode, double distance, long flags, String name, PointList pointList ) { this.edgeId = edgeId; this.baseNode = baseNode; this.adjNode = adjNode; this.distance = distance; this.flags = flags; this.name = name; this.pointList = pointList; } @Override public int getEdge() { return edgeId; } @Override public int getBaseNode() { return baseNode; } @Override public int getAdjNode() { return adjNode; } @Override public PointList fetchWayGeometry( int mode ) { if (pointList.getSize() == 0) return PointList.EMPTY; // due to API we need to create a new instance per call! if (mode == 3) return pointList.clone(false); else if (mode == 1) return pointList.copy(0, pointList.getSize() - 1); else if (mode == 2) return pointList.copy(1, pointList.getSize()); else if (mode == 0) { if (pointList.getSize() == 1) return PointList.EMPTY; return pointList.copy(1, pointList.getSize() - 1); } throw new UnsupportedOperationException("Illegal mode:" + mode); } @Override public EdgeIteratorState setWayGeometry( PointList list ) { throw new UnsupportedOperationException("Not supported for virtual edge. Set when creating it."); } @Override public double getDistance() { return distance; } @Override public EdgeIteratorState setDistance( double dist ) { this.distance = dist; return this; } @Override public long getFlags() { return flags; } @Override public EdgeIteratorState setFlags( long flags ) { this.flags = flags; return this; } @Override public String getName() { return name; } @Override public EdgeIteratorState setName( String name ) { this.name = name; return this; } @Override public String toString() { return baseNode + "->" + adjNode; } @Override public boolean isShortcut() { return false; } @Override public int getAdditionalField() { throw new UnsupportedOperationException("Not supported."); } @Override public int getSkippedEdge1() { throw new UnsupportedOperationException("Not supported."); } @Override public int getSkippedEdge2() { throw new UnsupportedOperationException("Not supported."); } @Override public void setSkippedEdges( int edge1, int edge2 ) { throw new UnsupportedOperationException("Not supported."); } @Override public EdgeIteratorState detach( boolean reverse ) { if (!reverse) return this; else throw new UnsupportedOperationException("Not supported."); } @Override public EdgeIteratorState setAdditionalField( int value ) { throw new UnsupportedOperationException("Not supported."); } @Override public EdgeIteratorState copyPropertiesTo( EdgeIteratorState edge ) { throw new UnsupportedOperationException("Not supported."); } @Override public EdgeSkipIterState setWeight( double weight ) { throw new UnsupportedOperationException("Not supported."); } @Override public double getWeight() { throw new UnsupportedOperationException("Not supported."); } ======= return new UnsupportedOperationException("QueryGraph cannot be modified."); >>>>>>> return new UnsupportedOperationException("QueryGraph cannot be modified."); } /** * Creates an edge state decoupled from a graph where nodes, pointList, etc are kept in memory. */ private static class VirtualEdgeIState implements EdgeIteratorState, EdgeSkipIterState { private final PointList pointList; private final int edgeId; private double distance; private long flags; private String name; private final int baseNode; private final int adjNode; public VirtualEdgeIState( int edgeId, int baseNode, int adjNode, double distance, long flags, String name, PointList pointList ) { this.edgeId = edgeId; this.baseNode = baseNode; this.adjNode = adjNode; this.distance = distance; this.flags = flags; this.name = name; this.pointList = pointList; } @Override public int getEdge() { return edgeId; } @Override public int getBaseNode() { return baseNode; } @Override public int getAdjNode() { return adjNode; } @Override public PointList fetchWayGeometry( int mode ) { if (pointList.getSize() == 0) return PointList.EMPTY; // due to API we need to create a new instance per call! if (mode == 3) return pointList.clone(false); else if (mode == 1) return pointList.copy(0, pointList.getSize() - 1); else if (mode == 2) return pointList.copy(1, pointList.getSize()); else if (mode == 0) { if (pointList.getSize() == 1) return PointList.EMPTY; return pointList.copy(1, pointList.getSize() - 1); } throw new UnsupportedOperationException("Illegal mode:" + mode); } @Override public EdgeIteratorState setWayGeometry( PointList list ) { throw new UnsupportedOperationException("Not supported for virtual edge. Set when creating it."); } @Override public double getDistance() { return distance; } @Override public EdgeIteratorState setDistance( double dist ) { this.distance = dist; return this; } @Override public long getFlags() { return flags; } @Override public EdgeIteratorState setFlags( long flags ) { this.flags = flags; return this; } @Override public String getName() { return name; } @Override public EdgeIteratorState setName( String name ) { this.name = name; return this; } @Override public String toString() { return baseNode + "->" + adjNode; } @Override public boolean isShortcut() { return false; } @Override public int getAdditionalField() { throw new UnsupportedOperationException("Not supported."); } @Override public int getSkippedEdge1() { throw new UnsupportedOperationException("Not supported."); } @Override public int getSkippedEdge2() { throw new UnsupportedOperationException("Not supported."); } @Override public void setSkippedEdges( int edge1, int edge2 ) { throw new UnsupportedOperationException("Not supported."); } @Override public EdgeIteratorState detach( boolean reverse ) { if (!reverse) return this; else throw new UnsupportedOperationException("Not supported."); } @Override public EdgeIteratorState setAdditionalField( int value ) { throw new UnsupportedOperationException("Not supported."); } @Override public EdgeIteratorState copyPropertiesTo( EdgeIteratorState edge ) { throw new UnsupportedOperationException("Not supported."); } @Override public EdgeSkipIterState setWeight( double weight ) { throw new UnsupportedOperationException("Not supported."); } @Override public double getWeight() { throw new UnsupportedOperationException("Not supported."); }
<<<<<<< restrictions = new String[]{"bicycle", "access"}; restricted.add("private"); restricted.add("no"); restricted.add("restricted"); intended.add("yes"); intended.add("designated"); intended.add("official"); intended.add("permissive"); ======= restrictions = new String[] { "bicycle", "access"}; restrictedValues.add("private"); restrictedValues.add("no"); restrictedValues.add("restricted"); intended.add( "yes" ); intended.add( "designated" ); intended.add( "official" ); intended.add( "permissive" ); oppositeLanes.add("opposite"); oppositeLanes.add("opposite_lane"); oppositeLanes.add("opposite_track"); >>>>>>> restrictions = new String[]{"bicycle", "access"}; restrictedValues.add("private"); restrictedValues.add("no"); restrictedValues.add("restricted"); intended.add("yes"); intended.add("designated"); intended.add("official"); intended.add("permissive"); oppositeLanes.add("opposite"); oppositeLanes.add("opposite_lane"); oppositeLanes.add("opposite_track");
<<<<<<< private LevelEdgeFilter levelFilter; private int maxLevel; private LevelGraph g; ======= private final LevelGraph prepareGraph; >>>>>>> private LevelEdgeFilter levelFilter; private int maxLevel; private final LevelGraph prepareGraph; <<<<<<< private DijkstraOneToMany algo; ======= private DijkstraOneToMany prepareAlgo; private boolean removesHigher2LowerEdges = true; >>>>>>> private DijkstraOneToMany prepareAlgo; <<<<<<< // if (maxLevel == 0) // throw new IllegalStateException("maxLevel cannot be 0"); meanDegree = g.getAllEdges().getMaxId() / g.getNodes(); ======= meanDegree = prepareGraph.getAllEdges().getCount() / prepareGraph.getNodes(); >>>>>>> meanDegree = prepareGraph.getAllEdges().getCount() / prepareGraph.getNodes(); <<<<<<< if (g.getLevel(node) != maxLevel) ======= if (lg.getLevel(node) != 0) >>>>>>> if (prepareGraph.getLevel(node) != maxLevel) <<<<<<< // skipped nodes are already set to maxLevel ======= { while (!sortedNodes.isEmpty()) { polledNode = sortedNodes.pollKey(); lg.setLevel(polledNode, level); } >>>>>>> // skipped nodes are already set to maxLevel <<<<<<< if (g.getLevel(u_fromNode) != maxLevel) ======= if (prepareGraph.getLevel(u_fromNode) != 0) >>>>>>> if (prepareGraph.getLevel(u_fromNode) != maxLevel) <<<<<<< if (g.getLevel(w_toNode) != maxLevel || u_fromNode == w_toNode) ======= if (prepareGraph.getLevel(w_toNode) != 0 || u_fromNode == w_toNode) >>>>>>> if (prepareGraph.getLevel(w_toNode) != maxLevel || u_fromNode == w_toNode) <<<<<<< checkGraph(); vehicleInExplorer = g.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, false)); vehicleOutExplorer = g.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, false, true)); final EdgeFilter allFilter = new DefaultEdgeFilter(prepareFlagEncoder, true, true); final EdgeFilter accessWithLevelFilter = new LevelEdgeFilter(g) { @Override public final boolean accept( EdgeIteratorState edgeState ) { if (!super.accept(edgeState)) return false; return allFilter.accept(edgeState); } }; vehicleAllExplorer = g.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, true)); vehicleAllTmpExplorer = g.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, true)); calcPrioAllExplorer = g.createEdgeExplorer(accessWithLevelFilter); levelFilter = new LevelEdgeFilter(g); maxLevel = g.getNodes() + 1; ignoreNodeFilter = new IgnoreNodeFilter(g, maxLevel); ======= vehicleInExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, false)); vehicleOutExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, false, true)); vehicleAllExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, true)); vehicleAllTmpExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, true)); calcPrioAllExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, true)); ignoreNodeFilter = new IgnoreNodeFilter(prepareGraph); >>>>>>> vehicleInExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, true, false)); vehicleOutExplorer = prepareGraph.createEdgeExplorer(new DefaultEdgeFilter(prepareFlagEncoder, false, true)); final EdgeFilter allFilter = new DefaultEdgeFilter(prepareFlagEncoder, true, true); // filter by vehicle and level number final EdgeFilter accessWithLevelFilter = new LevelEdgeFilter(prepareGraph) { @Override public final boolean accept( EdgeIteratorState edgeState ) { if (!super.accept(edgeState)) return false; return allFilter.accept(edgeState); } }; levelFilter = new LevelEdgeFilter(prepareGraph); maxLevel = prepareGraph.getNodes() + 1; ignoreNodeFilter = new IgnoreNodeFilter(prepareGraph, maxLevel); vehicleAllExplorer = prepareGraph.createEdgeExplorer(allFilter); vehicleAllTmpExplorer = prepareGraph.createEdgeExplorer(allFilter); calcPrioAllExplorer = prepareGraph.createEdgeExplorer(accessWithLevelFilter); <<<<<<< dijkstrabi.setEdgeFilter(levelFilter); return dijkstrabi; } ======= @Override protected Path createAndInitPath() { bestPath = new Path4CH(graph, flagEncoder); return bestPath; } @Override public String getName() { return "astarbiCH"; } >>>>>>> @Override protected Path createAndInitPath() { bestPath = new Path4CH(graph, flagEncoder); return bestPath; } @Override public String getName() { return "astarbiCH"; } @Override public String toString() { return getName() + "|" + prepareWeighting; } }; algo = astarBi; } else if (AlgorithmOptions.DIJKSTRA_BI.equals(opts.getAlgorithm())) { algo = new DijkstraBidirectionRef(graph, prepareFlagEncoder, prepareWeighting, traversalMode) { @Override protected void initCollections( int nodes ) { // algorithm with CH does not need that much memory pre allocated super.initCollections(Math.min(initialCollectionSize, nodes)); } @Override public boolean finished() { // we need to finish BOTH searches for CH! if (finishedFrom && finishedTo) return true; // changed also the final finish condition for CH return currFrom.weight >= bestPath.getWeight() && currTo.weight >= bestPath.getWeight(); } @Override protected Path createAndInitPath() { bestPath = new Path4CH(graph, flagEncoder); return bestPath; } @Override public String getName() { return "dijkstrabiCH"; } <<<<<<< astar.setEdgeFilter(levelFilter); return astar; } private void checkGraph() { if (g == null) throw new NullPointerException("setGraph before usage"); ======= if (!removesHigher2LowerEdges) algo.setEdgeFilter(new LevelEdgeFilter(prepareGraph)); return algo; >>>>>>> algo.setEdgeFilter(levelFilter); return algo;
<<<<<<< assertEquals("street 123, B 122", iter.getName()); assertEquals(n50, iter.getAdjNode()); AbstractGraphTester.assertPList(Helper.createPointList(51.25, 9.43), iter.fetchWayGeometry(0)); ======= assertEquals("route 666", iter.getName()); assertEquals(n10, iter.getAdjNode()); assertEquals(88643, iter.getDistance(), 1); >>>>>>> assertEquals("route 666", iter.getName()); assertEquals(n10, iter.getAdjNode()); assertEquals(88643, iter.getDistance(), 1); <<<<<<< assertEquals(n40, iter.getAdjNode()); AbstractGraphTester.assertPList(Helper.createPointList(), iter.fetchWayGeometry(0)); ======= assertEquals(n10, iter.getAdjNode()); assertEquals(88643, iter.getDistance(), 1); >>>>>>> AbstractGraphTester.assertPList(Helper.createPointList(), iter.fetchWayGeometry(0)); assertEquals(n10, iter.getAdjNode()); assertEquals(88643, iter.getDistance(), 1);
<<<<<<< long allowed = encoder.isAllowed(way); long encoded = encoder.handleWayTags(way, allowed, 0); ======= long allowed = encoder.acceptWay(way); long encoded = encoder.handleWayTags(allowed, way); >>>>>>> long allowed = encoder.acceptWay(way); long encoded = encoder.handleWayTags(way, allowed, 0); <<<<<<< long allowed = encoder.isAllowed(way); long encoded = encoder.handleWayTags(way, allowed, 0); ======= long allowed = encoder.acceptWay(way); long encoded = encoder.handleWayTags(allowed, way); >>>>>>> long allowed = encoder.acceptWay(way); long encoded = encoder.handleWayTags(way, allowed, 0); <<<<<<< allowed = encoder.isAllowed(way); encoded = encoder.handleWayTags(way, allowed, 0); ======= allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(allowed, way); >>>>>>> allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(way, allowed, 0); <<<<<<< allowed = encoder.isAllowed(way); encoded = encoder.handleWayTags(way, allowed, 0); ======= allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(allowed, way); >>>>>>> allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(way, allowed, 0); <<<<<<< allowed = encoder.isAllowed(way); encoded = encoder.handleWayTags(way, allowed, 0); ======= allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(allowed, way); >>>>>>> allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(way, allowed, 0); <<<<<<< allowed = encoder.isAllowed(way); encoded = encoder.handleWayTags(way, allowed, 0); ======= allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(allowed, way); >>>>>>> allowed = encoder.acceptWay(way); encoded = encoder.handleWayTags(way, allowed, 0);
<<<<<<< private final TranslationMap trMap = TranslationMapTest.SINGLETON; private final Translation usTR = trMap.getWithFallBack(Locale.US); ======= private final TranslationMap trMap = TranslationMapTest.SINGLETON; private final Translation usTR = trMap.getWithFallBack(Locale.US); >>>>>>> private final TranslationMap trMap = TranslationMapTest.SINGLETON; private final Translation usTR = trMap.getWithFallBack(Locale.US); <<<<<<< InstructionList wayList = p.calcInstructions(); List<String> tmpList = pick("text", wayList.createJson(usTR)); ======= InstructionList wayList = p.calcInstructions(trMap.getWithFallBack(Locale.CANADA)); List<String> tmpList = pick("text", wayList.createJson()); >>>>>>> InstructionList wayList = p.calcInstructions(usTR); List<String> tmpList = pick("text", wayList.createJson()); <<<<<<< distStrings = wayList.createDistances(usTR, true); assertEquals(Arrays.asList("6.21 mi", "6.21 mi", "6.21 mi", "6.21 mi", "12.43 mi", "6.21 mi", "0 ft"), distStrings); ======= >>>>>>> <<<<<<< wayList = p.calcInstructions(); tmpList = pick("text", wayList.createJson(usTR)); ======= wayList = p.calcInstructions(trMap.getWithFallBack(Locale.CANADA)); tmpList = pick("text", wayList.createJson()); >>>>>>> wayList = p.calcInstructions(usTR); tmpList = pick("text", wayList.createJson()); <<<<<<< InstructionList wayList = p.calcInstructions(); List<String> tmpList = pick("text", wayList.createJson(usTR)); ======= InstructionList wayList = p.calcInstructions(trMap.getWithFallBack(Locale.CANADA)); List<String> tmpList = pick("text", wayList.createJson()); >>>>>>> InstructionList wayList = p.calcInstructions(usTR); List<String> tmpList = pick("text", wayList.createJson()); <<<<<<< wayList = p.calcInstructions(); tmpList = pick("text", wayList.createJson(usTR)); ======= wayList = p.calcInstructions(trMap.getWithFallBack(Locale.CANADA)); tmpList = pick("text", wayList.createJson()); >>>>>>> wayList = p.calcInstructions(usTR); tmpList = pick("text", wayList.createJson()); <<<<<<< InstructionList wayList = p.calcInstructions(); List<String> tmpList = pick("text", wayList.createJson(usTR)); ======= InstructionList wayList = p.calcInstructions(trMap.getWithFallBack(Locale.CANADA)); List<String> tmpList = pick("text", wayList.createJson()); >>>>>>> InstructionList wayList = p.calcInstructions(usTR); List<String> tmpList = pick("text", wayList.createJson());
<<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>>
<<<<<<< SecurityUtil.serverLogin(SiteConfiguration.getInstance()); ======= final String app = "tserver"; Accumulo.setupLogging(app); SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration()); >>>>>>> final String app = "tserver"; Accumulo.setupLogging(app); SecurityUtil.serverLogin(SiteConfiguration.getInstance()); <<<<<<< Accumulo.setupLogging(app); ServerConfigurationFactory conf = new ServerConfigurationFactory(HdfsZooInstance.getInstance()); ======= final Instance instance = HdfsZooInstance.getInstance(); ServerConfiguration conf = new ServerConfiguration(instance); >>>>>>> ServerConfigurationFactory conf = new ServerConfigurationFactory(HdfsZooInstance.getInstance());
<<<<<<< import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; ======= import java.io.File; import java.util.ArrayList; import java.util.List; >>>>>>> import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import java.io.File; import java.util.ArrayList; import java.util.List;
<<<<<<< private static boolean mDoSnapshot; private static Thread mThread; private static boolean mContinueThread = true; ======= private static int mMode; static Thread mThread; >>>>>>> private static Thread mThread; private static boolean mContinueThread = true; <<<<<<< progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mContinueThread = false; try { mThread.join(); } catch (InterruptedException e) { e.printStackTrace(); } ViewerMain.resetWhenCancel(); } }); if (!mDoSnapshot) progressDialog.show(); ======= if (mMode!= ViewerMain.DO_SNAPSHOT) progressDialog.show(); >>>>>>> progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mContinueThread = false; try { mThread.join(); } catch (InterruptedException e) { e.printStackTrace(); } ViewerMain.resetWhenCancel(); } }); if (mMode!= ViewerMain.DO_SNAPSHOT) progressDialog.show(); <<<<<<< if (!mDoSnapshot) mProgressDialog.setMax(vectorSize); for (int i = 0; i < vectorSize; i++) { if(!mContinueThread) break; ======= if (mMode!= ViewerMain.DO_SNAPSHOT) mProgressDialog.setMax(vectorSize); for (int i = 0; i < vectorSize; i++) { >>>>>>> if (mMode!= ViewerMain.DO_SNAPSHOT) mProgressDialog.setMax(vectorSize); for (int i = 0; i < vectorSize; i++) { if(!mContinueThread) break;
<<<<<<< ======= //Adding original project //TODO elsewhere? if (mSlicingHandler != null) if (mSlicingHandler.getOriginalProject() == null) mSlicingHandler.setOriginalProject(mFile.getParentFile().getParent()); >>>>>>> <<<<<<< Toast.makeText(mContext,mContext.getString(R.string.viewer_mode_tag) + ": " + item.getTitle(), Toast.LENGTH_SHORT).show(); switch (item.getItemId()) { case R.id.move: mSurface.setEditionMode(ViewerSurfaceView.MOVE_EDITION_MODE); return true; case R.id.rotate: changeCurrentAxis(); mRotationLayout.setVisibility(View.VISIBLE); mSurface.setEditionMode(ViewerSurfaceView.ROTATION_EDITION_MODE); return true; case R.id.scale: mSurface.setEditionMode(ViewerSurfaceView.SCALED_EDITION_MODE); return true; ======= switch (item.getId()) { case R.id.move_item_button: hideCurrentActionPopUpWindow(); mSurface.setEditionMode(ViewerSurfaceView.MOVE_EDITION_MODE); break; case R.id.rotate_item_button: if (mCurrentActionPopupWindow == null) { final String[] actionButtonsValues = mContext.getResources().getStringArray(R.array.rotate_model_values); final TypedArray actionButtonsIcons = mContext.getResources().obtainTypedArray(R.array.rotate_model_icons); showHorizontalMenuPopUpWindow(item, actionButtonsValues, actionButtonsIcons, null, new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { changeCurrentAxis(Integer.parseInt(actionButtonsValues[position])); mRotationLayout.setVisibility(View.VISIBLE); mStatusBottomBar.setVisibility(View.INVISIBLE); mSurface.setEditionMode(ViewerSurfaceView.ROTATION_EDITION_MODE); hideCurrentActionPopUpWindow(); item.setImageResource(actionButtonsIcons.getResourceId(position, -1)); } }); } else { hideCurrentActionPopUpWindow(); } break; case R.id.scale_item_button: hideCurrentActionPopUpWindow(); mSurface.setEditionMode(ViewerSurfaceView.SCALED_EDITION_MODE); break; >>>>>>> switch (item.getId()) { case R.id.move_item_button: hideCurrentActionPopUpWindow(); mSurface.setEditionMode(ViewerSurfaceView.MOVE_EDITION_MODE); break; case R.id.rotate_item_button: if (mCurrentActionPopupWindow == null) { final String[] actionButtonsValues = mContext.getResources().getStringArray(R.array.rotate_model_values); final TypedArray actionButtonsIcons = mContext.getResources().obtainTypedArray(R.array.rotate_model_icons); showHorizontalMenuPopUpWindow(item, actionButtonsValues, actionButtonsIcons, null, new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { changeCurrentAxis(Integer.parseInt(actionButtonsValues[position])); mRotationLayout.setVisibility(View.VISIBLE); mStatusBottomBar.setVisibility(View.INVISIBLE); mSurface.setEditionMode(ViewerSurfaceView.ROTATION_EDITION_MODE); hideCurrentActionPopUpWindow(); item.setImageResource(actionButtonsIcons.getResourceId(position, -1)); } }); } else { hideCurrentActionPopUpWindow(); } break; case R.id.scale_item_button: hideCurrentActionPopUpWindow(); mSurface.setEditionMode(ViewerSurfaceView.SCALED_EDITION_MODE); break; <<<<<<< @Override public void onDestroyActionMode(ActionMode mode) { mSurface.exitEditionMode(); mRotationLayout.setVisibility(View.INVISIBLE); mActionMode = null; ======= /** * Show a pop up window with the visibility options: Normal, overhang, transparent and layers. */ public void showVisibilityPopUpMenu() { >>>>>>> /** * Show a pop up window with the visibility options: Normal, overhang, transparent and layers. */ public void showVisibilityPopUpMenu() { <<<<<<< //Exit edition mode public static void finishEdition(){ hideActionModeBar(); } ======= } /** * Show a pop up window with a horizontal list view as a content view */ public static void showHorizontalMenuPopUpWindow(View currentView, String[] actionButtonsValues, TypedArray actionButtonsIcons, String selectedOption, AdapterView.OnItemClickListener onItemClickListener) { HorizontalListView landscapeList = new HorizontalListView(mContext, null); ListIconPopupWindowAdapter listAdapter = new ListIconPopupWindowAdapter(mContext, actionButtonsValues, actionButtonsIcons, selectedOption); landscapeList.setOnItemClickListener(onItemClickListener); landscapeList.setAdapter(listAdapter); landscapeList.measure(0, 0); int popupLayoutHeight = 0; int popupLayoutWidth = 0; for (int i = 0; i < listAdapter.getCount(); i++) { View mView = listAdapter.getView(i, null, landscapeList); mView.measure( View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); popupLayoutHeight = mView.getMeasuredHeight(); popupLayoutWidth += mView.getMeasuredWidth(); } //Show the pop up window in the correct position int[] actionButtonCoordinates = new int[2]; currentView.getLocationOnScreen(actionButtonCoordinates); int popupLayoutPadding = (int) mContext.getResources().getDimensionPixelSize(R.dimen.content_padding_normal); final int popupLayoutX = actionButtonCoordinates[0] - popupLayoutWidth - popupLayoutPadding / 2; final int popupLayoutY = actionButtonCoordinates[1]; mCurrentActionPopupWindow = (new CustomPopupWindow(landscapeList, popupLayoutWidth, popupLayoutHeight + popupLayoutPadding, R.style.SlideRightAnimation).getPopupWindow()); mCurrentActionPopupWindow.showAtLocation(mSurface, Gravity.NO_GRAVITY, popupLayoutX, popupLayoutY); } >>>>>>> } /** * Show a pop up window with a horizontal list view as a content view */ public static void showHorizontalMenuPopUpWindow(View currentView, String[] actionButtonsValues, TypedArray actionButtonsIcons, String selectedOption, AdapterView.OnItemClickListener onItemClickListener) { HorizontalListView landscapeList = new HorizontalListView(mContext, null); ListIconPopupWindowAdapter listAdapter = new ListIconPopupWindowAdapter(mContext, actionButtonsValues, actionButtonsIcons, selectedOption); landscapeList.setOnItemClickListener(onItemClickListener); landscapeList.setAdapter(listAdapter); landscapeList.measure(0, 0); int popupLayoutHeight = 0; int popupLayoutWidth = 0; for (int i = 0; i < listAdapter.getCount(); i++) { View mView = listAdapter.getView(i, null, landscapeList); mView.measure( View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); popupLayoutHeight = mView.getMeasuredHeight(); popupLayoutWidth += mView.getMeasuredWidth(); } //Show the pop up window in the correct position int[] actionButtonCoordinates = new int[2]; currentView.getLocationOnScreen(actionButtonCoordinates); int popupLayoutPadding = (int) mContext.getResources().getDimensionPixelSize(R.dimen.content_padding_normal); final int popupLayoutX = actionButtonCoordinates[0] - popupLayoutWidth - popupLayoutPadding / 2; final int popupLayoutY = actionButtonCoordinates[1]; mCurrentActionPopupWindow = (new CustomPopupWindow(landscapeList, popupLayoutWidth, popupLayoutHeight + popupLayoutPadding, R.style.SlideRightAnimation).getPopupWindow()); mCurrentActionPopupWindow.showAtLocation(mSurface, Gravity.NO_GRAVITY, popupLayoutX, popupLayoutY); } <<<<<<< if (mSidePanelHandler.profileAdapter!=null)mSidePanelHandler.profileAdapter.notifyDataSetChanged(); if (mSidePanelHandler.printerAdapter!=null)mSidePanelHandler.printerAdapter.notifyDataSetChanged(); } catch (NullPointerException e ){ ======= mSidePanelHandler.profileAdapter.notifyDataSetChanged(); if (mSidePanelHandler.printerAdapter != null) mSidePanelHandler.printerAdapter.notifyDataSetChanged(); } catch (NullPointerException e) { >>>>>>> if (mSidePanelHandler.profileAdapter!=null)mSidePanelHandler.profileAdapter.notifyDataSetChanged(); if (mSidePanelHandler.printerAdapter != null) mSidePanelHandler.printerAdapter.notifyDataSetChanged(); } catch (NullPointerException e) { <<<<<<< Log.i("Slicer","MOG, new positiong to pr0nt " + x + ":" + y); ======= Log.i("Slicer", "MOG, new positiong to pront " + x + ":" + y); >>>>>>> Log.i("Slicer","MOG, new positiong to pr0nt " + x + ":" + y);
<<<<<<< private static boolean mContinueThread = true; public static void openGcodeFile (Context context, File file, DataStorage data, boolean doSnapshot) { mContext = context; ======= public static void openGcodeFile (Context context, File file, DataStorage data, int mode) { Log.i(TAG, " Open GcodeFile "); >>>>>>> private static boolean mContinueThread = true; public static void openGcodeFile (Context context, File file, DataStorage data, int mode) { Log.i(TAG, " Open GcodeFile "); <<<<<<< mDoSnapshot = doSnapshot; mContinueThread = true; if(!mDoSnapshot) mProgressDialog = prepareProgressDialog(context); mData.setPathFile(mFile.getAbsolutePath()); ======= mMode = mode; if(mMode!= ViewerMain.DO_SNAPSHOT) mProgressDialog = prepareProgressDialog(context); mData.setPathFile(mFile.getName().replace(".", "-")); >>>>>>> mMode = mode; mContinueThread = true; if(mMode!= ViewerMain.DO_SNAPSHOT) mProgressDialog = prepareProgressDialog(context); mData.setPathFile(mFile.getAbsolutePath()); <<<<<<< Toast.makeText(mContext, R.string.error_opening_invalid_file, Toast.LENGTH_SHORT).show(); ViewerMain.resetWhenCancel(); if(!mDoSnapshot) mProgressDialog.dismiss(); ======= if(mMode!= ViewerMain.DO_SNAPSHOT) mProgressDialog.dismiss(); >>>>>>> Toast.makeText(mContext, R.string.error_opening_invalid_file, Toast.LENGTH_SHORT).show(); ViewerMain.resetWhenCancel(); if(mMode!= ViewerMain.DO_SNAPSHOT) mProgressDialog.dismiss();
<<<<<<< ======= import android.view.Window; import android.widget.ImageButton; >>>>>>> import android.view.Window; import android.widget.ImageButton; <<<<<<< ======= import github.daneren2005.dsub.service.OfflineException; import github.daneren2005.dsub.service.ServerTooOldException; import github.daneren2005.dsub.util.Constants; >>>>>>> import github.daneren2005.dsub.service.OfflineException; import github.daneren2005.dsub.service.ServerTooOldException; import github.daneren2005.dsub.util.Constants;
<<<<<<< ServerConfigurationFactory serverConf = new ServerConfigurationFactory(instance); ======= ServerConfiguration conf = new ServerConfiguration(instance); >>>>>>> ServerConfigurationFactory conf = new ServerConfigurationFactory(instance); <<<<<<< * Initializes this garbage collector with the current system configuration. * * @param fs volume manager * @param instance instance * @param credentials credentials * @param noTrash true to not move files to trash instead of deleting */ public void init(VolumeManager fs, Instance instance, Credentials credentials, boolean noTrash) { init(fs, instance, credentials, noTrash, new ServerConfigurationFactory(instance).getConfiguration()); } /** ======= >>>>>>> <<<<<<< long gcDelay = new ServerConfigurationFactory(instance).getConfiguration().getTimeInMillis(Property.GC_CYCLE_DELAY); ======= long gcDelay = config.getTimeInMillis(Property.GC_CYCLE_DELAY); >>>>>>> long gcDelay = config.getTimeInMillis(Property.GC_CYCLE_DELAY); <<<<<<< AccumuloConfiguration conf = new ServerConfigurationFactory(instance).getConfiguration(); int port = conf.getPort(Property.GC_PORT); long maxMessageSize = conf.getMemoryInBytes(Property.GENERAL_MAX_MESSAGE_SIZE); ======= int port = config.getPort(Property.GC_PORT); long maxMessageSize = config.getMemoryInBytes(Property.GENERAL_MAX_MESSAGE_SIZE); >>>>>>> int port = config.getPort(Property.GC_PORT); long maxMessageSize = config.getMemoryInBytes(Property.GENERAL_MAX_MESSAGE_SIZE); <<<<<<< return TServerUtils.startTServer(result, processor, this.getClass().getSimpleName(), "GC Monitor Service", 2, conf.getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE), 1000, maxMessageSize, SslConnectionParams.forServer(conf), 0).address; ======= return TServerUtils.startTServer(result, processor, this.getClass().getSimpleName(), "GC Monitor Service", 2, 1000, maxMessageSize, SslConnectionParams.forServer(config), 0).address; >>>>>>> return TServerUtils.startTServer(result, processor, this.getClass().getSimpleName(), "GC Monitor Service", 2, config.getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE), 1000, maxMessageSize, SslConnectionParams.forServer(config), 0).address;
<<<<<<< import org.pgsqlite.SQLitePluginPackage; public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { ======= import com.microsoft.codepush.react.CodePush; import android.support.v4.app.FragmentActivity; public class MainActivity extends FragmentActivity implements DefaultHardwareBackBtnHandler { >>>>>>> import org.pgsqlite.SQLitePluginPackage; import com.microsoft.codepush.react.CodePush; import android.support.v4.app.FragmentActivity; public class MainActivity extends FragmentActivity implements DefaultHardwareBackBtnHandler { <<<<<<< .addPackage(new SQLitePluginPackage(this)) // register SQLite Plugin here ======= .addPackage(codePush.getReactPackage()) >>>>>>> .addPackage(new SQLitePluginPackage(this)) // register SQLite Plugin here .addPackage(codePush.getReactPackage())
<<<<<<< Class<? extends Constraint> clazz = loader.loadClass(className).asSubclass(Constraint.class); log.debug("Loaded constraint {} for {}", clazz.getName(), conf.getTableId()); ======= Class<? extends Constraint> clazz = loader.loadClass(className) .asSubclass(Constraint.class); log.debug("Loaded constraint " + clazz.getName() + " for " + conf.getTableId()); >>>>>>> Class<? extends Constraint> clazz = loader.loadClass(className) .asSubclass(Constraint.class); log.debug("Loaded constraint {} for {}", clazz.getName(), conf.getTableId());
<<<<<<< public static final AttributeDefinition DELIVERY_ACTIVE = new SimpleAttributeDefinitionBuilder("delivery-active", ModelType.BOOLEAN, true) .setDefaultValue(new ModelNode(true)) ======= public static final AttributeDefinition DELIVERY_ACTIVE = new SimpleAttributeDefinitionBuilder("delivery-active", ModelType.BOOLEAN) .setDefaultValue(ModelNode.TRUE) >>>>>>> public static final AttributeDefinition DELIVERY_ACTIVE = new SimpleAttributeDefinitionBuilder("delivery-active", ModelType.BOOLEAN, true) .setDefaultValue(ModelNode.TRUE)
<<<<<<< ======= List<DfsLogger> closedCopy; synchronized (closedLogs) { closedCopy = copyClosedLogs(closedLogs); } int numMajorCompactionsInProgress = 0; >>>>>>> List<DfsLogger> closedCopy; synchronized (closedLogs) { closedCopy = copyClosedLogs(closedLogs); } <<<<<<< int maxLogEntriesPerTablet = getTableConfiguration(tablet.getExtent()) .getCount(Property.TABLE_MINC_LOGS_MAX); if (tablet.getLogCount() >= maxLogEntriesPerTablet) { log.debug("Initiating minor compaction for {} because it has {} write ahead logs", tablet.getExtent(), tablet.getLogCount()); tablet.initiateMinorCompaction(MinorCompactionReason.SYSTEM); } ======= tablet.checkIfMinorCompactionNeededForLogs(closedCopy); >>>>>>> tablet.checkIfMinorCompactionNeededForLogs(closedCopy);
<<<<<<< ======= import org.jboss.as.Extension; import org.jboss.as.model.socket.InterfaceElement; import org.jboss.as.model.socket.ServerInterfaceElement; import org.jboss.as.model.socket.SocketBindingElement; import org.jboss.as.model.socket.SocketBindingGroupElement; import org.jboss.as.model.socket.SocketBindingGroupRefElement; import org.jboss.modules.Module; import org.jboss.modules.ModuleLoadException; import org.jboss.msc.service.BatchBuilder; >>>>>>> import org.jboss.as.Extension; import org.jboss.as.model.socket.InterfaceElement; import org.jboss.as.model.socket.ServerInterfaceElement; import org.jboss.as.model.socket.SocketBindingElement; import org.jboss.as.model.socket.SocketBindingGroupElement; import org.jboss.as.model.socket.SocketBindingGroupRefElement; import org.jboss.modules.Module; import org.jboss.modules.ModuleLoadException; import org.jboss.msc.service.BatchBuilder; <<<<<<< import java.util.Collection; import java.util.NavigableMap; import java.util.TreeMap; ======= import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; >>>>>>> import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; <<<<<<< public void activate(final ServiceActivatorContext context) { ======= public void activate(final ServiceContainer container, final BatchBuilder batchBuilder) { // Activate extensions final Map<String, ExtensionElement> extensions = this.extensions; for(Map.Entry<String, ExtensionElement> extensionEntry : extensions.entrySet()) { final ExtensionElement extensionElement = extensionEntry.getValue(); final String moduleSpec = extensionElement.getModule(); try { for (Extension extension : Module.loadService(moduleSpec, Extension.class)) { extension.activate(container, batchBuilder); } } catch(ModuleLoadException e) { throw new RuntimeException("Failed activate subsystem: " + extensionEntry.getKey(), e); } } // Activate profile profile.activate(container, batchBuilder); // Activate Interfaces final Map<String, InterfaceElement> interfaces = this.interfaces; for(InterfaceElement interfaceElement : interfaces.values()) { interfaceElement.activate(container, batchBuilder); } // TODO: Activate Socket Bindings // Activate deployments final Map<DeploymentUnitKey, ServerGroupDeploymentElement> deployments = this.deployments; for(ServerGroupDeploymentElement deploymentElement : deployments.values()) { deploymentElement.activate(container, batchBuilder); } >>>>>>> public void activate(final ServiceActivatorContext context) { final BatchBuilder batchBuilder = context.getBatchBuilder(); // Activate extensions final Map<String, ExtensionElement> extensions = this.extensions; for(Map.Entry<String, ExtensionElement> extensionEntry : extensions.entrySet()) { final ExtensionElement extensionElement = extensionEntry.getValue(); final String moduleSpec = extensionElement.getModule(); try { for (Extension extension : Module.loadService(moduleSpec, Extension.class)) { extension.activate(context); } } catch(ModuleLoadException e) { throw new RuntimeException("Failed activate subsystem: " + extensionEntry.getKey(), e); } } // Activate profile profile.activate(context); // Activate Interfaces final Map<String, InterfaceElement> interfaces = this.interfaces; for(InterfaceElement interfaceElement : interfaces.values()) { interfaceElement.activate(context); } // TODO: Activate Socket Bindings // Activate deployments final Map<DeploymentUnitKey, ServerGroupDeploymentElement> deployments = this.deployments; for(ServerGroupDeploymentElement deploymentElement : deployments.values()) { deploymentElement.activate(context); }
<<<<<<< String serverProcessName = SERVER_PROCESS_NAME_PREFIX + serverConfig.getServerName(); List<String> command = getServerLaunchCommand(serverConfig, jvmElement); Map<String, String> env = getServerLaunchEnvironment(jvmElement); ======= String serverProcessName = getServerProcessName(serverConfig); List<String> command = getServerLaunchCommand(serverConfig); Map<String, String> env = getServerLaunchEnvironment(serverConfig.getJvm()); >>>>>>> String serverProcessName = getServerProcessName(serverConfig); List<String> command = getServerLaunchCommand(serverConfig, jvmElement); Map<String, String> env = getServerLaunchEnvironment(jvmElement);
<<<<<<< private static final String LEGACY_SECURITY_CAPABILITY_NAME = "org.wildfly.legacy-security"; private static final String LEGACY_JACC_CAPABILITY_NAME = "org.wildfly.legacy-security.jacc"; private static final String ELYTRON_JACC_CAPABILITY_NAME = "org.wildfly.security.jacc-policy"; private static final String LEGACY_JAAS_CONTEXT_ROOT = "java:/jaas/"; ======= >>>>>>> private static final String LEGACY_JACC_CAPABILITY_NAME = "org.wildfly.legacy-security.jacc"; private static final String ELYTRON_JACC_CAPABILITY_NAME = "org.wildfly.security.jacc-policy"; <<<<<<< final boolean elytronJacc = capabilitySupport.hasCapability(ELYTRON_JACC_CAPABILITY_NAME); final boolean legacyJacc = !elytronJacc && capabilitySupport.hasCapability(LEGACY_JACC_CAPABILITY_NAME); if(legacyJacc || elytronJacc) { ======= if(legacySecurityInstalled(deploymentUnit)) { >>>>>>> final boolean elytronJacc = capabilitySupport.hasCapability(ELYTRON_JACC_CAPABILITY_NAME); final boolean legacyJacc = !elytronJacc && legacySecurityInstalled(deploymentUnit); if(legacyJacc || elytronJacc) {
<<<<<<< public static final SimpleAttributeDefinition PROCESS_ID_UUID = new SimpleAttributeDefinitionBuilder("process-id-uuid", ModelType.BOOLEAN, true) .setDefaultValue(new ModelNode().set(false)) ======= public static final SimpleAttributeDefinition PROCESS_ID_UUID = new SimpleAttributeDefinitionBuilder("process-id-uuid", ModelType.BOOLEAN) .setRequired(true) .setDefaultValue(ModelNode.FALSE) >>>>>>> public static final SimpleAttributeDefinition PROCESS_ID_UUID = new SimpleAttributeDefinitionBuilder("process-id-uuid", ModelType.BOOLEAN, true) .setDefaultValue(ModelNode.FALSE)
<<<<<<< import org.jboss.as.controller.capability.CapabilityServiceSupport; ======= import org.jboss.as.controller.capability.RuntimeCapability; >>>>>>> import org.jboss.as.controller.capability.CapabilityServiceSupport; import org.jboss.as.controller.capability.RuntimeCapability;
<<<<<<< import io.undertow.util.ConduitFactory; ======= import io.undertow.util.StatusCodes; >>>>>>> import io.undertow.util.ConduitFactory; import io.undertow.util.StatusCodes; <<<<<<< import org.wildfly.extension.undertow.security.UndertowSecurityAttachments; import org.xnio.conduits.StreamSinkConduit; ======= import org.wildfly.extension.undertow.security.UndertowSecurityAttachments; import javax.security.auth.message.AuthException; >>>>>>> import org.wildfly.extension.undertow.security.UndertowSecurityAttachments; import org.xnio.conduits.StreamSinkConduit;
<<<<<<< ======= import org.jboss.as.controller.RunningMode; import org.jboss.as.controller.SimpleAttributeDefinition; >>>>>>> import org.jboss.as.controller.RunningMode;
<<<<<<< static final SimpleAttributeDefinition MANAGE = SimpleAttributeDefinitionBuilder.create("manage", BOOLEAN, true) .setDefaultValue(new ModelNode(false)) ======= static final SimpleAttributeDefinition MANAGE = SimpleAttributeDefinitionBuilder.create("manage", BOOLEAN) .setDefaultValue(ModelNode.FALSE) >>>>>>> static final SimpleAttributeDefinition MANAGE = SimpleAttributeDefinitionBuilder.create("manage", BOOLEAN, true) .setDefaultValue(ModelNode.FALSE)
<<<<<<< public void queyrStoreHouseListToSelect(InputObject inputObject, OutputObject outputObject) throws Exception; ======= public void queryStoreHouseByIdAndInfo(InputObject inputObject, OutputObject outputObject) throws Exception; >>>>>>> public void queyrStoreHouseListToSelect(InputObject inputObject, OutputObject outputObject) throws Exception; public void queryStoreHouseByIdAndInfo(InputObject inputObject, OutputObject outputObject) throws Exception;
<<<<<<< import org.ehcache.jsr107.EhcacheCachingProvider; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.cache.annotation.CachingConfigurerSupport; ======= import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; >>>>>>> import org.ehcache.jsr107.EhcacheCachingProvider; import org.springframework.cache.annotation.CachingConfigurerSupport; <<<<<<< @AutoConfigureAfter(value = { MetricsConfiguration.class }) @AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class }) public class CacheConfiguration extends CachingConfigurerSupport { ======= public class CacheConfiguration { private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration; >>>>>>> public class CacheConfiguration extends CachingConfigurerSupport {
<<<<<<< CheckBox scaleBox, voltageBox, currentBox, powerBox, peakBox, negPeakBox, freqBox, spectrumBox; CheckBox rmsBox, dutyBox, viBox, xyBox, resistanceBox, ibBox, icBox, ieBox, vbeBox, vbcBox, vceBox, vceIcBox, logSpectrumBox; RadioButton autoButton, maxButton, manualButton; ======= CheckBox scaleBox, maxScaleBox, voltageBox, currentBox, powerBox, peakBox, negPeakBox, freqBox, spectrumBox, manualScaleBox; CheckBox rmsBox, dutyBox, viBox, xyBox, resistanceBox, ibBox, icBox, ieBox, vbeBox, vbcBox, vceBox, vceIcBox, logSpectrumBox, averageBox; >>>>>>> RadioButton autoButton, maxButton, manualButton; CheckBox scaleBox, voltageBox, currentBox, powerBox, peakBox, negPeakBox, freqBox, spectrumBox, manualScaleBox; CheckBox rmsBox, dutyBox, viBox, xyBox, resistanceBox, ibBox, icBox, ieBox, vbeBox, vbcBox, vceBox, vceIcBox, logSpectrumBox, averageBox;
<<<<<<< activeBlocMenuBar.addItem(getClassCheckItem(LS("Add Comparator (Hi-Z/GND output)"), "ComparatorElm")); activeBlocMenuBar.addItem(getClassCheckItem(LS("Add OTA (LM13700 style)"), "OTAElm")); ======= // activeBlocMenuBar.addItem(getClassCheckItem(LS("Add Custom Device"), "CustomAnalogElm")); >>>>>>> activeBlocMenuBar.addItem(getClassCheckItem(LS("Add Comparator (Hi-Z/GND output)"), "ComparatorElm")); activeBlocMenuBar.addItem(getClassCheckItem(LS("Add OTA (LM13700 style)"), "OTAElm")); // activeBlocMenuBar.addItem(getClassCheckItem(LS("Add Custom Device"), "CustomAnalogElm")); <<<<<<< /* System.out.println("matrixSize = " + matrixSize + " " + circuitNonLinear); for (j = 0; j != circuitMatrixSize; j++) { for (i = 0; i != circuitMatrixSize; i++) System.out.print(circuitMatrix[j][i] + " "); System.out.print(" " + circuitRightSide[j] + "\n"); } System.out.print("\n");*/ // if a matrix is linear, we can do the lu_factor here instead of // needing to do it every frame if (!circuitNonLinear) { if (!lu_factor(circuitMatrix, circuitMatrixSize, circuitPermute)) { stop(LS("Singular matrix!"), null); return; } } // show resistance in voltage sources if there's only one boolean gotVoltageSource = false; showResistanceInVoltageSources = true; for (i = 0; i != elmList.size(); i++) { CircuitElm ce = getElm(i); if (ce instanceof VoltageElm) { if (gotVoltageSource) showResistanceInVoltageSources = false; else gotVoltageSource = true; } } dumpNodelist(); ======= >>>>>>> <<<<<<< if (n=="NDarlingtonElm") return (CircuitElm) new NDarlingtonElm(x1, y1); if (n=="PDarlingtonElm") return (CircuitElm) new PDarlingtonElm(x1, y1); if (n=="ComparatorElm") return (CircuitElm) new ComparatorElm(x1, y1); if (n=="OTAElm") return (CircuitElm) new OTAElm(x1, y1); ======= if (n=="NoiseElm") return (CircuitElm) new NoiseElm(x1, y1); if (n=="CustomAnalogElm") return (CircuitElm) new CustomAnalogElm(x1, y1); >>>>>>> if (n=="NDarlingtonElm") return (CircuitElm) new NDarlingtonElm(x1, y1); if (n=="PDarlingtonElm") return (CircuitElm) new PDarlingtonElm(x1, y1); if (n=="ComparatorElm") return (CircuitElm) new ComparatorElm(x1, y1); if (n=="OTAElm") return (CircuitElm) new OTAElm(x1, y1); if (n=="NoiseElm") return (CircuitElm) new NoiseElm(x1, y1); if (n=="CustomAnalogElm") return (CircuitElm) new CustomAnalogElm(x1, y1);
<<<<<<< CanonicalizerUtils.checkC14NAlgorithm(canonAlg); Transforms transforms = new Transforms(xmlSig.getDocument()); transforms.addTransform(canonAlg.getUri(), xmlSig.getKeyInfo().getElement()); xmlSig.addKeyInfo(signingCertificate); ======= X509Data x509Data = new X509Data(xmlSig.getDocument()); x509Data.addCertificate(signingCertificate); x509Data.addSubjectName(signingCertificate); x509Data.addIssuerSerial(signingCertificate.getIssuerX500Principal().getName(), signingCertificate.getSerialNumber()); xmlSig.getKeyInfo().add(x509Data); >>>>>>> X509Data x509Data = new X509Data(xmlSig.getDocument()); x509Data.addCertificate(signingCertificate); x509Data.addSubjectName(signingCertificate); x509Data.addIssuerSerial(signingCertificate.getIssuerX500Principal().getName(), signingCertificate.getSerialNumber()); xmlSig.getKeyInfo().add(x509Data); CanonicalizerUtils.checkC14NAlgorithm(canonAlg); Transforms transforms = new Transforms(xmlSig.getDocument()); transforms.addTransform(canonAlg.getUri(), xmlSig.getKeyInfo().getElement());
<<<<<<< /** * Empties the Recycle Bin on the specified drive. * * @param hwnd * A handle to the parent window of any dialog boxes that might * be displayed during the operation.<br> * This parameter can be NULL. * @param pszRootPath * a null-terminated string of maximum length MAX_PATH that * contains the path of the root<br> * drive on which the Recycle Bin is located. This parameter can * contain a string formatted with the drive,<br> * folder, and subfolder names, for example c:\windows\system\, * etc. It can also contain an empty string or<br> * NULL. If this value is an empty string or NULL, all Recycle * Bins on all drives will be emptied. * @param dwFlags * a bitwise combination of SHERB_NOCONFIRMATION, * SHERB_NOPROGRESSUI and SHERB_NOSOUND.<br> * @return Returns S_OK (0) if successful, or a COM-defined error value * otherwise.<br> */ int SHEmptyRecycleBin(HANDLE hwnd, String pszRootPath, int dwFlags); /** * @param lpExecInfo * <p> * Type: <strong>SHELLEXECUTEINFO*</strong> * </p> * <p> * A pointer to a <a href= * "https://msdn.microsoft.com/en-us/library/windows/desktop/bb759784(v=vs.85).aspx"> * <strong xmlns="http://www.w3.org/1999/xhtml">SHELLEXECUTEINFO * </strong></a> structure that contains and receives information * about the application being executed. * </p> * @return * <p> * Returns <strong>TRUE</strong> if successful; otherwise, * <strong>FALSE</strong>. Call <a href= * "https://msdn.microsoft.com/en-us/library/windows/desktop/ms679360(v=vs.85).aspx"> * <strong xmlns="http://www.w3.org/1999/xhtml">GetLastError * </strong></a> for extended error information. * </p> */ boolean ShellExecuteEx(ShellAPI.SHELLEXECUTEINFO lpExecInfo); ======= /* * SHGetSpecialFolderLocation function for getting PIDL reference to My Computer etc * * @param hwndOwner * Reserved. * @param nFolder * A CSIDL value that identifies the folder of interest. * @param ppidl * A PIDL specifying the folder's location relative to the root of the namespace (the desktop). It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree. * * @return If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. * */ WinNT.HRESULT SHGetSpecialFolderLocation(WinDef.HWND hwndOwner, int nFolder, PointerByReference ppidl); >>>>>>> /** * Empties the Recycle Bin on the specified drive. * * @param hwnd * A handle to the parent window of any dialog boxes that might * be displayed during the operation.<br> * This parameter can be NULL. * @param pszRootPath * a null-terminated string of maximum length MAX_PATH that * contains the path of the root<br> * drive on which the Recycle Bin is located. This parameter can * contain a string formatted with the drive,<br> * folder, and subfolder names, for example c:\windows\system\, * etc. It can also contain an empty string or<br> * NULL. If this value is an empty string or NULL, all Recycle * Bins on all drives will be emptied. * @param dwFlags * a bitwise combination of SHERB_NOCONFIRMATION, * SHERB_NOPROGRESSUI and SHERB_NOSOUND.<br> * @return Returns S_OK (0) if successful, or a COM-defined error value * otherwise.<br> */ int SHEmptyRecycleBin(HANDLE hwnd, String pszRootPath, int dwFlags); /** * @param lpExecInfo * <p> * Type: <strong>SHELLEXECUTEINFO*</strong> * </p> * <p> * A pointer to a <a href= * "https://msdn.microsoft.com/en-us/library/windows/desktop/bb759784(v=vs.85).aspx"> * <strong xmlns="http://www.w3.org/1999/xhtml">SHELLEXECUTEINFO * </strong></a> structure that contains and receives information * about the application being executed. * </p> * @return * <p> * Returns <strong>TRUE</strong> if successful; otherwise, * <strong>FALSE</strong>. Call <a href= * "https://msdn.microsoft.com/en-us/library/windows/desktop/ms679360(v=vs.85).aspx"> * <strong xmlns="http://www.w3.org/1999/xhtml">GetLastError * </strong></a> for extended error information. * </p> */ boolean ShellExecuteEx(ShellAPI.SHELLEXECUTEINFO lpExecInfo); /** * SHGetSpecialFolderLocation function for getting PIDL reference to My Computer etc * * @param hwndOwner * Reserved. * @param nFolder * A CSIDL value that identifies the folder of interest. * @param ppidl * A PIDL specifying the folder's location relative to the root of the namespace (the desktop). It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree. * * @return If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. * */ WinNT.HRESULT SHGetSpecialFolderLocation(WinDef.HWND hwndOwner, int nFolder, PointerByReference ppidl);
<<<<<<< /** This structure is equal to another based on the same data type * and memory contents. * @param o object to compare * @return equality result ======= /** Return whether the given Structure's backing data is identical to * this one. >>>>>>> /** Return whether the given Structure's backing data is identical to * this one. * @param o object to compare * @return equality result <<<<<<< /** Since {@link #equals} depends on the contents of memory, use that * as the basis for the hash code. * @return hash code for this object. ======= /** Structures are equal if they share the same pointer. */ public boolean equals(Object o) { return o instanceof Structure && o.getClass() == getClass() && ((Structure)o).getPointer().equals(getPointer()); } /** Use the underlying memory pointer's hash code. >>>>>>> /** * @return whether the given structure's type and pointer match. */ public boolean equals(Object o) { return o instanceof Structure && o.getClass() == getClass() && ((Structure)o).getPointer().equals(getPointer()); } /** * @return hash code for this structure's pointer.
<<<<<<< "{420B2830-E718-11CF-893D-00A0C9054228}"), clsid); COMUtils.checkTypeLibRC(hr); ======= "{00020905-0000-0000-C000-000000000046}"), clsid); COMUtils.checkRC(hr); >>>>>>> "{420B2830-E718-11CF-893D-00A0C9054228}"), clsid); COMUtils.checkRC(hr); <<<<<<< // get typelib version 1.0 hr = OleAuto.INSTANCE.LoadRegTypeLib(clsid, 1, 0, lcid, pWordTypeLib); COMUtils.checkTypeLibRC(hr); ======= // get typelib based on Word 8.3 (v11) hr = OleAuto.INSTANCE.LoadRegTypeLib(clsid, 8, 3, lcid, pWordTypeLib); COMUtils.checkRC(hr); >>>>>>> // get typelib version 1.0 hr = OleAuto.INSTANCE.LoadRegTypeLib(clsid, 1, 0, lcid, pWordTypeLib); COMUtils.checkRC(hr);
<<<<<<< ======= import com.sun.jna.win32.StdCallLibrary; import com.sun.jna.win32.W32APITypeMapper; >>>>>>>
<<<<<<< ======= public boolean getPimDisabled() { return pimDisabled; } public void setPimDisabled(final boolean pimDisabled) { this.pimDisabled = pimDisabled; } public boolean getPimOutdated() { return pimOutdated; } public void setPimOutdated(final boolean pimOutdated) { this.pimOutdated = pimOutdated; } public Date getPimUpdated() { return pimUpdated; } public void setPimUpdated(final Date pimUpdated) { this.pimUpdated = pimUpdated; } @Field(index = Index.YES, analyze = Analyze.NO, norms = Norms.NO, store = Store.YES) >>>>>>> public boolean getPimDisabled() { return pimDisabled; } public void setPimDisabled(final boolean pimDisabled) { this.pimDisabled = pimDisabled; } public boolean getPimOutdated() { return pimOutdated; } public void setPimOutdated(final boolean pimOutdated) { this.pimOutdated = pimOutdated; } public Date getPimUpdated() { return pimUpdated; } public void setPimUpdated(final Date pimUpdated) { this.pimUpdated = pimUpdated; }
<<<<<<< final Attribute attribute = (Attribute) genericDAO.findSingleByNamedQuery("ATTRIBUTE.BY.CODE", object); ======= final Attribute attribute = genericDAO.findSingleByNamedQuery("ATTRIBUTE.BY.CODE", code); >>>>>>> final Attribute attribute = (Attribute) genericDAO.findSingleByNamedQuery("ATTRIBUTE.BY.CODE", code);
<<<<<<< import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; ======= import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; >>>>>>> import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; <<<<<<< import android.provider.Settings; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; ======= import android.support.v7.app.AlertDialog; >>>>>>> import android.support.v7.app.AlertDialog; import android.provider.Settings; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; <<<<<<< private static final int INSTALL_PACKAGES_REQUESTCODE = 101; private static final int GET_UNKNOWN_APP_SOURCES = 102; private String manifestJsonUrl = "https://raw.githubusercontent.com/itlwy/AppSmartUpdate/master/resources/app/UpdateManifest.json"; // private String manifestJsonUrl = "http://192.168.2.107:8000/app/UpdateManifest.json"; ======= private String manifestJsonUrl = "https://raw.githubusercontent.com/itlwy/AppSmartUpdate/master/resources/app/UpdateManifest.json"; // private String manifestJsonUrl = "http://192.168.2.107:8000/app/UpdateManifest.json"; >>>>>>> private static final int INSTALL_PACKAGES_REQUESTCODE = 101; private static final int GET_UNKNOWN_APP_SOURCES = 102; private String manifestJsonUrl = "https://raw.githubusercontent.com/itlwy/AppSmartUpdate/master/resources/app/UpdateManifest.json"; // private String manifestJsonUrl = "http://192.168.2.107:8000/app/UpdateManifest.json"; <<<<<<< checkAndroidOUnknowSource(); ======= // registerUpdateCallbak(); // 需要自定义弹框时打开注释 >>>>>>> checkAndroidOUnknowSource(); // registerUpdateCallbak(); // 需要自定义弹框时打开注释
<<<<<<< switching_provider = false; startActivityForResult(new Intent(this, ConfigurationWizard.class), Constants.REQUEST_CODE_SWITCH_PROVIDER); ======= >>>>>>> switching_provider = false; startActivityForResult(new Intent(this, ConfigurationWizard.class), Constants.REQUEST_CODE_SWITCH_PROVIDER);
<<<<<<< @Deprecated TSERV_WAL_SYNC_METHOD("tserver.wal.sync.method", "hsync", PropertyType.STRING, "This property is deprecated. Use table.durability instead."), TSERV_REPLICATION_REPLAYERS("tserver.replication.replayer.", null, PropertyType.PREFIX, "Allows configuration of implementation used to apply replicated data"), TSERV_REPLICATION_DEFAULT_HANDLER("tserver.replication.default.replayer", "org.apache.accumulo.tserver.replication.BatchWriterReplicationReplayer", PropertyType.CLASSNAME, "Default AccumuloReplicationReplayer implementation"), TSERV_REPLICATION_BW_REPLAYER_MEMORY("tserver.replication.batchwriter.replayer.memory", "50M", PropertyType.MEMORY, "Memory to provide to batchwriter to replay mutations for replication"), ======= TSERV_WAL_SYNC_METHOD("tserver.wal.sync.method", "hsync", PropertyType.STRING, "The method to invoke when sync'ing WALs. HSync will provide " + "resiliency in the face of unexpected power outages, at the cost of speed. If method is not available, the legacy 'sync' method " + "will be used to ensure backwards compatibility with older Hadoop versions. A value of 'hflush' is the alternative to the default value " + "of 'hsync' which will result in faster writes, but with less durability"), TSERV_ASSIGNMENT_DURATION_WARNING("tserver.assignment.duration.warning", "10m", PropertyType.TIMEDURATION, "The amount of time an assignment can run " + " before the server will print a warning along with the current stack trace. Meant to help debug stuck assignments"), >>>>>>> @Deprecated TSERV_WAL_SYNC_METHOD("tserver.wal.sync.method", "hsync", PropertyType.STRING, "This property is deprecated. Use table.durability instead."), TSERV_ASSIGNMENT_DURATION_WARNING("tserver.assignment.duration.warning", "10m", PropertyType.TIMEDURATION, "The amount of time an assignment can run " + " before the server will print a warning along with the current stack trace. Meant to help debug stuck assignments"), TSERV_REPLICATION_REPLAYERS("tserver.replication.replayer.", null, PropertyType.PREFIX, "Allows configuration of implementation used to apply replicated data"), TSERV_REPLICATION_DEFAULT_HANDLER("tserver.replication.default.replayer", "org.apache.accumulo.tserver.replication.BatchWriterReplicationReplayer", PropertyType.CLASSNAME, "Default AccumuloReplicationReplayer implementation"), TSERV_REPLICATION_BW_REPLAYER_MEMORY("tserver.replication.batchwriter.replayer.memory", "50M", PropertyType.MEMORY, "Memory to provide to batchwriter to replay mutations for replication"),
<<<<<<< import static android.view.View.GONE; import static android.view.View.VISIBLE; import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE; import static se.leap.bitmaskclient.ProviderAPI.PROVIDER_API_EVENT; import static se.leap.bitmaskclient.ProviderAPI.RESULT_CODE; import static se.leap.bitmaskclient.ProviderAPI.RESULT_KEY; import static se.leap.bitmaskclient.userstatus.SessionDialog.USERNAME; ======= import static se.leap.bitmaskclient.MainActivity.ACTION_SHOW_VPN_FRAGMENT; >>>>>>> import static se.leap.bitmaskclient.MainActivity.ACTION_SHOW_VPN_FRAGMENT; import static android.view.View.GONE; import static android.view.View.VISIBLE; import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE; import static se.leap.bitmaskclient.ProviderAPI.PROVIDER_API_EVENT; import static se.leap.bitmaskclient.ProviderAPI.RESULT_CODE; import static se.leap.bitmaskclient.ProviderAPI.RESULT_KEY; import static se.leap.bitmaskclient.userstatus.SessionDialog.USERNAME; <<<<<<< public void onReceive(Context context, Intent intent) { Log.d(TAG, "received Broadcast"); String action = intent.getAction(); if (action == null || !action.equalsIgnoreCase(PROVIDER_API_EVENT)) { return; } int resultCode = intent.getIntExtra(RESULT_CODE, -1); switch (resultCode) { case ProviderAPI.SUCCESSFUL_SIGNUP: case ProviderAPI.SUCCESSFUL_LOGIN: downloadVpnCertificate(); break; case ProviderAPI.FAILED_LOGIN: case ProviderAPI.FAILED_SIGNUP: handleReceivedErrors((Bundle) intent.getParcelableExtra(RESULT_KEY)); break; case ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE: intent = new Intent(ProviderCredentialsBaseActivity.this, MainActivity.class); startActivity(intent); //activity.eip_fragment.updateEipService(); break; case ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE: // TODO activity.setResult(RESULT_CANCELED); break; ======= public void onReceiveResult(int resultCode, Bundle resultData) { if (resultCode == ProviderAPI.SUCCESSFUL_SIGNUP) { String username = resultData.getString(SessionDialog.USERNAME); String password = resultData.getString(SessionDialog.PASSWORD); activity.login(username, password); } else if (resultCode == ProviderAPI.FAILED_SIGNUP) { //MainActivity.sessionDialog(resultData); } else if (resultCode == ProviderAPI.SUCCESSFUL_LOGIN) { Intent intent = new Intent(activity, MainActivity.class); intent.setAction(ACTION_SHOW_VPN_FRAGMENT); activity.startActivity(intent); } else if (resultCode == ProviderAPI.FAILED_LOGIN) { //MainActivity.sessionDialog(resultData); // TODO MOVE // } else if (resultCode == ProviderAPI.SUCCESSFUL_LOGOUT) { // if (switching_provider) activity.switchProvider(); // } else if (resultCode == ProviderAPI.LOGOUT_FAILED) { // activity.setResult(RESULT_CANCELED); // } else if (resultCode == ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE) { // activity.eip_fragment.updateEipService(); // activity.setResult(RESULT_OK); // } else if (resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE) { // activity.setResult(RESULT_CANCELED); // } else if (resultCode == ProviderAPI.CORRECTLY_DOWNLOADED_EIP_SERVICE) { // activity.eip_fragment.updateEipService(); // activity.setResult(RESULT_OK); // } else if (resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_EIP_SERVICE) { // activity.setResult(RESULT_CANCELED); >>>>>>> public void onReceive(Context context, Intent intent) { Log.d(TAG, "received Broadcast"); String action = intent.getAction(); if (action == null || !action.equalsIgnoreCase(PROVIDER_API_EVENT)) { return; } int resultCode = intent.getIntExtra(RESULT_CODE, -1); switch (resultCode) { case ProviderAPI.SUCCESSFUL_SIGNUP: case ProviderAPI.SUCCESSFUL_LOGIN: downloadVpnCertificate(); break; case ProviderAPI.FAILED_LOGIN: case ProviderAPI.FAILED_SIGNUP: handleReceivedErrors((Bundle) intent.getParcelableExtra(RESULT_KEY)); break; case ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE: intent = new Intent(ProviderCredentialsBaseActivity.this, MainActivity.class); intent.setAction(ACTION_SHOW_VPN_FRAGMENT); startActivity(intent); //activity.eip_fragment.updateEipService(); break; case ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE: // TODO activity.setResult(RESULT_CANCELED); break;
<<<<<<< provider = ConfigHelper.getSavedProviderFromSharedPreferences(preferences); fragmentManager = new FragmentManagerEnhanced(getSupportFragmentManager()); ======= >>>>>>> provider = ConfigHelper.getSavedProviderFromSharedPreferences(preferences); fragmentManager = new FragmentManagerEnhanced(getSupportFragmentManager()); <<<<<<< ======= Fragment fragment = null; >>>>>>> Fragment fragment = null; <<<<<<< showEipFragment(); ======= fragment = new EipFragment(); if (intent.hasExtra(ASK_TO_CANCEL_VPN)) { Bundle bundle = new Bundle(); bundle.putBoolean(ASK_TO_CANCEL_VPN, true); fragment.setArguments(bundle); } >>>>>>> fragment = new EipFragment(); if (intent.hasExtra(ASK_TO_CANCEL_VPN)) { Bundle bundle = new Bundle(); bundle.putBoolean(ASK_TO_CANCEL_VPN, true); fragment.setArguments(bundle); } <<<<<<< ======= if (fragment != null) { new FragmentManagerEnhanced(getSupportFragmentManager()).beginTransaction() .replace(R.id.container, fragment) .commit(); } >>>>>>> if (fragment != null) { new FragmentManagerEnhanced(getSupportFragmentManager()).beginTransaction() .replace(R.id.container, fragment) .commit(); } <<<<<<< private void showEipFragment() { Fragment fragment = new EipFragment(); Bundle arguments = new Bundle(); arguments.putParcelable(PROVIDER_KEY, provider); fragment.setArguments(arguments); fragmentManager.beginTransaction() .replace(R.id.container, fragment) .commit(); } ======= >>>>>>> @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (data == null) { return; } if (resultCode == RESULT_OK && data.hasExtra(Provider.KEY)) { provider = data.getParcelableExtra(Provider.KEY); if (provider == null) { return; } ConfigHelper.storeProviderInPreferences(preferences, provider); navigationDrawerFragment.refresh(); switch (requestCode) { case REQUEST_CODE_SWITCH_PROVIDER: EipCommand.stopVPN(this); break; case REQUEST_CODE_CONFIGURE_LEAP: break; case REQUEST_CODE_LOG_IN: EipCommand.startVPN(this); break; } } Fragment fragment = new EipFragment(); Bundle arguments = new Bundle(); arguments.putParcelable(PROVIDER_KEY, provider); fragment.setArguments(arguments); fragmentManager.beginTransaction() .replace(R.id.container, fragment) .commit(); }
<<<<<<< import android.os.Handler; ======= import android.support.v4.app.DialogFragment; >>>>>>> import android.os.Handler; import android.support.v4.app.DialogFragment;
<<<<<<< import android.content.Context; import android.content.SharedPreferences; ======= import android.support.annotation.NonNull; >>>>>>> import android.content.Context; import android.support.annotation.NonNull; <<<<<<< import java.io.StringReader; import java.util.HashSet; import java.util.Set; ======= import java.util.HashMap; >>>>>>> import java.util.HashSet; import java.util.Set; import java.util.HashMap; <<<<<<< import se.leap.bitmaskclient.BitmaskApp; import se.leap.bitmaskclient.utils.PreferenceHelper; ======= import de.blinkt.openvpn.core.connection.Connection; import static se.leap.bitmaskclient.Constants.IP_ADDRESS; import static se.leap.bitmaskclient.Constants.LOCATION; import static se.leap.bitmaskclient.Constants.LOCATIONS; import static se.leap.bitmaskclient.Constants.NAME; import static se.leap.bitmaskclient.Constants.OPENVPN_CONFIGURATION; import static se.leap.bitmaskclient.Constants.TIMEZONE; import static se.leap.bitmaskclient.Constants.VERSION; >>>>>>> import se.leap.bitmaskclient.utils.PreferenceHelper; import de.blinkt.openvpn.core.connection.Connection; import static se.leap.bitmaskclient.Constants.IP_ADDRESS; import static se.leap.bitmaskclient.Constants.LOCATION; import static se.leap.bitmaskclient.Constants.LOCATIONS; import static se.leap.bitmaskclient.Constants.NAME; import static se.leap.bitmaskclient.Constants.OPENVPN_CONFIGURATION; import static se.leap.bitmaskclient.Constants.TIMEZONE; import static se.leap.bitmaskclient.Constants.VERSION; <<<<<<< public Gateway(JSONObject eip_definition, JSONObject secrets, JSONObject gateway, Context context) { ======= public Gateway(JSONObject eipDefinition, JSONObject secrets, JSONObject gateway) { >>>>>>> public Gateway(JSONObject eipDefinition, JSONObject secrets, JSONObject gateway, Context context) {
<<<<<<< import se.leap.bitmaskclient.ConfigurationWizard; import se.leap.bitmaskclient.Dashboard; import se.leap.bitmaskclient.R; ======= >>>>>>> <<<<<<< private void setAirplaneMode(boolean airplane_mode) { Context context = solo.getCurrentActivity().getApplicationContext(); boolean isEnabled = Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1; Log.d("AirplaneMode", "Service state: " + isEnabled); Settings.System.putInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON, airplane_mode ? 1 : 0); // Post an intent to reload Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); intent.putExtra("state", airplane_mode); Log.d("AirplaneMode", "New Service state: " + !isEnabled); solo.getCurrentActivity().sendBroadcast(intent); IntentFilter intentFilter = new IntentFilter("android.intent.action.SERVICE_STATE"); BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { boolean isEnabled = Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1; Log.d("AirplaneMode", "Service state changed: " + isEnabled); } }; context.registerReceiver(receiver, intentFilter); } ======= public void testIcsOpenVpnInterface() { solo.clickOnMenuItem("ICS OpenVPN Interface"); solo.waitForActivity(MainActivity.class); solo.goBack(); solo.clickOnMenuItem("ICS OpenVPN Interface"); solo.waitForActivity(MainActivity.class); } >>>>>>> public void testSwitchProvider() { solo.clickOnMenuItem("Switch provider"); solo.waitForActivity(ConfigurationWizard.class); solo.goBack(); } }
<<<<<<< "status", ======= "script-security", >>>>>>> "status", "script-security",
<<<<<<< import se.leap.bitmaskclient.fragments.ExcludeAppsFragment; ======= import se.leap.bitmaskclient.views.IconSwitchEntry; import se.leap.bitmaskclient.views.IconTextEntry; >>>>>>> import se.leap.bitmaskclient.views.IconSwitchEntry; import se.leap.bitmaskclient.views.IconTextEntry; <<<<<<< import static se.leap.bitmaskclient.DrawerSettingsAdapter.ABOUT; import static se.leap.bitmaskclient.DrawerSettingsAdapter.ALWAYS_ON; import static se.leap.bitmaskclient.DrawerSettingsAdapter.BATTERY_SAVER; import static se.leap.bitmaskclient.DrawerSettingsAdapter.DONATE; import static se.leap.bitmaskclient.DrawerSettingsAdapter.DrawerSettingsItem.getSimpleTextInstance; import static se.leap.bitmaskclient.DrawerSettingsAdapter.DrawerSettingsItem.getSwitchInstance; import static se.leap.bitmaskclient.DrawerSettingsAdapter.LOG; import static se.leap.bitmaskclient.DrawerSettingsAdapter.SELECT_APPS; import static se.leap.bitmaskclient.DrawerSettingsAdapter.SWITCH_PROVIDER; ======= >>>>>>> <<<<<<< import static se.leap.bitmaskclient.R.string.exclude_apps_fragment_title; import static se.leap.bitmaskclient.R.string.donate_title; ======= >>>>>>> import static se.leap.bitmaskclient.R.string.exclude_apps_fragment_title; <<<<<<< settingsListAdapter.addItem(getSimpleTextInstance(getContext(), getString(exclude_apps_fragment_title), R.drawable.ic_shield_remove_grey600_36dp, SELECT_APPS)); settingsListAdapter.addItem(getSimpleTextInstance(getContext(), getString(log_fragment_title), R.drawable.ic_log_36, LOG)); ======= } private void initDonateEntry() { >>>>>>> } private void initExcludeAppsEntry() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { IconTextEntry excludeApps = drawerView.findViewById(R.id.exclude_apps); excludeApps.setVisibility(VISIBLE); FragmentManagerEnhanced fragmentManager = new FragmentManagerEnhanced(getActivity().getSupportFragmentManager()); excludeApps.setOnClickListener((buttonView) -> { closeDrawer(); Fragment fragment = new ExcludeAppsFragment(); setActionBarTitle(exclude_apps_fragment_title); fragmentManager.replace(R.id.main_container, fragment, MainActivity.TAG); }); } } private void initDonateEntry() { <<<<<<< private void onSwitchItemSelected(int elementType, boolean newStateIsChecked) { switch (elementType) { case BATTERY_SAVER: if (getSaveBattery(getContext()) == newStateIsChecked) { //initial ui setup, ignore return; } if (newStateIsChecked) { showExperimentalFeatureAlert(); } else { saveBattery(this.getContext(), false); disableSwitch(BATTERY_SAVER); } break; default: break; } } private void disableSwitch(int elementType) { DrawerSettingsItem item = settingsListAdapter.getDrawerItem(elementType); item.setChecked(false); settingsListAdapter.notifyDataSetChanged(); } public void onTextItemSelected(AdapterView<?> parent, int position) { // update the main content by replacing fragments FragmentManagerEnhanced fragmentManager = new FragmentManagerEnhanced(getActivity().getSupportFragmentManager()); Fragment fragment = null; if (parent == drawerAccountsListView) { fragment = new EipFragment(); Bundle arguments = new Bundle(); Provider currentProvider = getSavedProviderFromSharedPreferences(preferences); arguments.putParcelable(PROVIDER_KEY, currentProvider); fragment.setArguments(arguments); hideActionBarSubTitle(); } else { DrawerSettingsItem settingsItem = settingsListAdapter.getItem(position); switch (settingsItem.getItemType()) { case SWITCH_PROVIDER: getActivity().startActivityForResult(new Intent(getActivity(), ProviderListActivity.class), REQUEST_CODE_SWITCH_PROVIDER); break; case LOG: fragment = new LogFragment(); setActionBarTitle(log_fragment_title); break; case ABOUT: fragment = new AboutFragment(); setActionBarTitle(about_fragment_title); break; case ALWAYS_ON: if (getShowAlwaysOnDialog(getContext())) { showAlwaysOnDialog(); } else { Intent intent = new Intent("android.net.vpn.SETTINGS"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } break; case DONATE: Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DONATION_URL)); startActivity(browserIntent); break; case SELECT_APPS: fragment = new ExcludeAppsFragment(); setActionBarTitle(exclude_apps_fragment_title); break; default: break; } } if (fragment != null) { fragmentManager.replace(R.id.main_container, fragment, MainActivity.TAG); } } ======= >>>>>>>
<<<<<<< import io.seldon.trust.impl.jdo.LastRecommendationBean; ======= import io.seldon.memcache.MemCachePeer; import io.seldon.recommendation.LastRecommendationBean; import net.spy.memcached.MemcachedClient; >>>>>>> import io.seldon.recommendation.LastRecommendationBean;
<<<<<<< ======= import org.apache.accumulo.core.util.ArgumentChecker; import org.apache.accumulo.core.util.Base64; >>>>>>> import org.apache.accumulo.core.util.Base64; <<<<<<< sb.append(new String(Base64.encodeBase64(auth), StandardCharsets.UTF_8)); ======= sb.append(Base64.encodeBase64String(auth)); >>>>>>> sb.append(Base64.encodeBase64String(auth));
<<<<<<< public Object generateKey(int threadIndex, int keyIndex); /** * Called for benchmarks with shared attributes * * @param keyIndex * @return */ public Object generateKey(int keyIndex); ======= Object generateKey(int threadIndex, int keyIndex); >>>>>>> Object generateKey(int threadIndex, int keyIndex); /** * Called for benchmarks with shared attributes * * @param keyIndex * @return */ Object generateKey(int keyIndex);
<<<<<<< import org.apache.accumulo.core.client.impl.Table; ======= import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; >>>>>>> import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import org.apache.accumulo.core.client.impl.Table; <<<<<<< Assert.assertEquals(expected1, new ReplicationTarget("foo", "bar", Table.ID.of("1"))); Assert.assertNotEquals(expected1, new ReplicationTarget("foo", "foo", Table.ID.of("1"))); Assert.assertNotEquals(expected1, new ReplicationTarget("bar", "bar", Table.ID.of("1"))); Assert.assertNotEquals(expected1, new ReplicationTarget(null, "bar", Table.ID.of("1"))); Assert.assertNotEquals(expected1, new ReplicationTarget("foo", null, Table.ID.of("1"))); ======= assertEquals(expected1, new ReplicationTarget("foo", "bar", "1")); assertNotEquals(expected1, new ReplicationTarget("foo", "foo", "1")); assertNotEquals(expected1, new ReplicationTarget("bar", "bar", "1")); assertNotEquals(expected1, new ReplicationTarget(null, "bar", "1")); assertNotEquals(expected1, new ReplicationTarget("foo", null, "1")); >>>>>>> assertEquals(expected1, new ReplicationTarget("foo", "bar", Table.ID.of("1"))); assertNotEquals(expected1, new ReplicationTarget("foo", "foo", Table.ID.of("1"))); assertNotEquals(expected1, new ReplicationTarget("bar", "bar", Table.ID.of("1"))); assertNotEquals(expected1, new ReplicationTarget(null, "bar", Table.ID.of("1"))); assertNotEquals(expected1, new ReplicationTarget("foo", null, Table.ID.of("1")));
<<<<<<< "A map/reduce program that counts the words in the input files."); programDriver.addClass("export-table", Export.class, "A map/reduce program that exports a table to a file."); ======= "A map/reduce program that counts the words in the input files."); programDriver.addClass("cellcounter", CellCounter.class, "Count them cells!"); >>>>>>> "A map/reduce program that counts the words in the input files."); programDriver.addClass("export-table", Export.class, "A map/reduce program that exports a table to a file."); programDriver.addClass("cellcounter", CellCounter.class, "Count them cells!");
<<<<<<< ======= import io.hyscale.commons.models.*; import io.hyscale.deployer.services.builder.PodBuilder; import io.hyscale.deployer.services.handler.impl.V1PersistentVolumeClaimHandler; import io.hyscale.deployer.services.model.*; import io.hyscale.deployer.services.util.*; import io.kubernetes.client.openapi.models.V1PersistentVolumeClaim; import io.kubernetes.client.openapi.models.V1Volume; import io.kubernetes.client.openapi.models.V1VolumeMount; >>>>>>> <<<<<<< @Override public boolean authenticate(AuthConfig authConfig) throws HyscaleException { return false; } ======= @Override public boolean authenticate(K8sAuthorisation authConfig) { // TODO return false; } >>>>>>> @Override public boolean authenticate(K8sAuthorisation authConfig) { // TODO return false; }