conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.when;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
>>>>>>>
import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.when;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
<<<<<<<
import org.apache.maven.project.MavenProject;
import org.eluder.coveralls.maven.plugin.domain.*;
import org.eluder.coveralls.maven.plugin.domain.Git.Head;
=======
import org.eluder.coveralls.maven.plugin.domain.CoverallsResponse;
import org.eluder.coveralls.maven.plugin.domain.Job;
import org.eluder.coveralls.maven.plugin.domain.Source;
import org.eluder.coveralls.maven.plugin.domain.SourceLoader;
>>>>>>>
import org.apache.maven.project.MavenProject;
import org.eluder.coveralls.maven.plugin.domain.CoverallsResponse;
import org.eluder.coveralls.maven.plugin.domain.Job;
import org.eluder.coveralls.maven.plugin.domain.Source;
import org.eluder.coveralls.maven.plugin.domain.SourceLoader; |
<<<<<<<
=======
if(resetFromXml) {
zmaster587.advancedRocketry.dimension.DimensionManager.getInstance().unregisterAllDimensions();
zmaster587.advancedRocketry.api.Configuration.MoonId = -1;
//Delete old dimensions
File dir = new File(net.minecraftforge.common.DimensionManager.getCurrentSaveRootDirectory() + "/" + DimensionManager.workingPath);
for(File file2 : dir.listFiles()) {
if(file2.getName().startsWith("DIM") && !file2.getName().equals("DIM" + zmaster587.advancedRocketry.api.Configuration.spaceDimId)) {
try {
FileUtils.deleteDirectory(file2);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
boolean loadedFromXML = false;
>>>>>>>
<<<<<<<
//TODO: add properties fromXML
//Add artifacts if needed
if(DimensionManager.getInstance().isDimensionCreated(properties.getId())) {
DimensionProperties loadedProps;
loadedProps = DimensionManager.getInstance().getDimensionProperties(properties.getId());
List<ItemStack> list = new LinkedList<ItemStack>(properties.getRequiredArtifacts());
loadedProps.getRequiredArtifacts().clear();
loadedProps.getRequiredArtifacts().addAll(list);
}
=======
>>>>>>>
//TODO: add properties fromXML
//Add artifacts if needed
if(DimensionManager.getInstance().isDimensionCreated(properties.getId())) {
DimensionProperties loadedProps;
loadedProps = DimensionManager.getInstance().getDimensionProperties(properties.getId());
List<ItemStack> list = new LinkedList<ItemStack>(properties.getRequiredArtifacts());
loadedProps.getRequiredArtifacts().clear();
loadedProps.getRequiredArtifacts().addAll(list);
}
<<<<<<<
((BlockSeal)AdvancedRocketryBlocks.blockPipeSealer).clearMap();
DimensionManager.dimOffset = config.getInt("minDimension", PLANET, 2, -127, 8000, "Dimensions including and after this number are allowed to be made into planets");
DimensionManager.getInstance().knownPlanets.clear();
if(!zmaster587.advancedRocketry.api.Configuration.lockUI)
proxy.saveUILayout(config);
=======
DimensionManager.dimOffset = config.getInt("minDimension", PLANET, 2, -127, 8000, "Dimensions including and after this number are allowed to be made into planets");
if(!zmaster587.advancedRocketry.api.Configuration.lockUI)
proxy.saveUILayout(config);
>>>>>>>
((BlockSeal)AdvancedRocketryBlocks.blockPipeSealer).clearMap();
DimensionManager.dimOffset = config.getInt("minDimension", PLANET, 2, -127, 8000, "Dimensions including and after this number are allowed to be made into planets");
DimensionManager.getInstance().knownPlanets.clear();
if(!zmaster587.advancedRocketry.api.Configuration.lockUI)
proxy.saveUILayout(config); |
<<<<<<<
public static final float ENTITY_OFFSET = 0.075f;
public static final float ITEM_GRAV_OFFSET = 0.04f;
=======
static Class gcWorldProvider;
static Method gcGetGravity;
static {
AdvancedRocketryAPI.gravityManager = new GravityHandler();
try {
gcWorldProvider = Class.forName("micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider");
AdvancedRocketry.logger.info("GC IGalacticraftWorldProvider found");
gcGetGravity = gcWorldProvider.getMethod("getGravity");
} catch(ClassNotFoundException e){
gcWorldProvider = null;
AdvancedRocketry.logger.info("GC IGalacticraftWorldProvider not found");
}
catch(NoSuchMethodException e){
gcWorldProvider = null;
AdvancedRocketry.logger.info("GC IGalacticraftWorldProvider not found");
}
}
>>>>>>>
public static final float ENTITY_OFFSET = 0.075f;
public static final float ITEM_GRAV_OFFSET = 0.04f;
static Class gcWorldProvider;
static Method gcGetGravity;
static {
AdvancedRocketryAPI.gravityManager = new GravityHandler();
try {
gcWorldProvider = Class.forName("micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider");
AdvancedRocketry.logger.info("GC IGalacticraftWorldProvider found");
gcGetGravity = gcWorldProvider.getMethod("getGravity");
} catch(ClassNotFoundException e){
gcWorldProvider = null;
AdvancedRocketry.logger.info("GC IGalacticraftWorldProvider not found");
}
catch(NoSuchMethodException e){
gcWorldProvider = null;
AdvancedRocketry.logger.info("GC IGalacticraftWorldProvider not found");
}
}
<<<<<<<
Double d;
if(entityMap.containsKey(entity) && (d = entityMap.get(entity)) != null) {
double multiplier = (entity instanceof EntityItem) ? ITEM_GRAV_OFFSET*d : 0.075f*d;
entity.motionY += multiplier;
=======
if(DimensionManager.getInstance().isDimensionCreated(entity.worldObj.provider.getDimension()) || entity.worldObj.provider instanceof WorldProviderSpace) {
double gravMult;
>>>>>>>
Double d;
if(entityMap.containsKey(entity) && (d = entityMap.get(entity)) != null) {
double multiplier = (entity instanceof EntityItem) ? ITEM_GRAV_OFFSET*d : 0.075f*d;
entity.motionY += multiplier;
<<<<<<<
if(entity instanceof EntityItem)
entity.motionY -= ITEM_GRAV_OFFSET;
else
entity.motionY -= ENTITY_OFFSET + 0.005f;
=======
//GC handling
if(gcWorldProvider != null && gcWorldProvider.isAssignableFrom(entity.worldObj.provider.getClass())) {
try {
entity.motionY -= 0.075f - (float)gcGetGravity.invoke(entity.worldObj.provider);
} catch (IllegalAccessException | IllegalArgumentException
| InvocationTargetException e) {
e.printStackTrace();
}
}
else {
if(entity instanceof EntityItem)
entity.motionY -= 0.04f;
else
entity.motionY -= 0.08D;
}
>>>>>>>
//GC handling
if(gcWorldProvider != null && gcWorldProvider.isAssignableFrom(entity.worldObj.provider.getClass())) {
try {
entity.motionY -= 0.075f - (float)gcGetGravity.invoke(entity.worldObj.provider);
} catch (IllegalAccessException | IllegalArgumentException
| InvocationTargetException e) {
e.printStackTrace();
}
}
else {
if(entity instanceof EntityItem)
entity.motionY -= ITEM_GRAV_OFFSET;
else
entity.motionY -= ENTITY_OFFSET + 0.005d;
} |
<<<<<<<
//Load Asteroids from XML
File file = new File("./config/" + zmaster587.advancedRocketry.api.Configuration.configFolder + "/asteroidConfig.xml");
logger.fine("Checking for asteroid config at " + file.getAbsolutePath());
if(!file.exists()) {
logger.fine(file.getAbsolutePath() + " not found, generating");
try {
file.createNewFile();
BufferedWriter stream;
stream = new BufferedWriter(new FileWriter(file));
stream.write("<Asteroids>\n\t<asteroid name=\"Small Asteroid\" distance=\"10\" mass=\"100\" massVariability=\"0.5\" minLevel=\"0\" probability=\"1\" richness=\"0.2\" richnessVariability=\"0.5\">"
+ "\n\t\t<ore itemStack=\"minecraft:iron_ore\" chance=\"15\" />"
+ "\n\t\t<ore itemStack=\"minecraft:gold_ore\" chance=\"10\" />"
+ "\n\t\t<ore itemStack=\"minecraft:redstone_ore\" chance=\"10\" />"
+ "\n\t</asteroid>\n</Asteroids>");
stream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
XMLAsteroidLoader load = new XMLAsteroidLoader();
try {
load.loadFile(file);
for(AsteroidSmall asteroid : load.loadPropertyFile()) {
zmaster587.advancedRocketry.api.Configuration.asteroidTypes.put(asteroid.ID, asteroid);
}
} catch (IOException e) {
e.printStackTrace();
}
// End load asteroids from XML
=======
>>>>>>>
//Load Asteroids from XML
File file = new File("./config/" + zmaster587.advancedRocketry.api.Configuration.configFolder + "/asteroidConfig.xml");
logger.fine("Checking for asteroid config at " + file.getAbsolutePath());
if(!file.exists()) {
logger.fine(file.getAbsolutePath() + " not found, generating");
try {
file.createNewFile();
BufferedWriter stream;
stream = new BufferedWriter(new FileWriter(file));
stream.write("<Asteroids>\n\t<asteroid name=\"Small Asteroid\" distance=\"10\" mass=\"100\" massVariability=\"0.5\" minLevel=\"0\" probability=\"1\" richness=\"0.2\" richnessVariability=\"0.5\">"
+ "\n\t\t<ore itemStack=\"minecraft:iron_ore\" chance=\"15\" />"
+ "\n\t\t<ore itemStack=\"minecraft:gold_ore\" chance=\"10\" />"
+ "\n\t\t<ore itemStack=\"minecraft:redstone_ore\" chance=\"10\" />"
+ "\n\t</asteroid>\n</Asteroids>");
stream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
XMLAsteroidLoader load = new XMLAsteroidLoader();
try {
load.loadFile(file);
for(AsteroidSmall asteroid : load.loadPropertyFile()) {
zmaster587.advancedRocketry.api.Configuration.asteroidTypes.put(asteroid.ID, asteroid);
}
} catch (IOException e) {
e.printStackTrace();
}
// End load asteroids from XML |
<<<<<<<
import java.util.Set;
=======
import java.io.StringWriter;
import java.io.PrintWriter;
>>>>>>>
import java.io.StringWriter;
import java.io.PrintWriter;
import java.util.Set; |
<<<<<<<
import cofh.api.energy.IEnergyContainerItem;
import appeng.api.IAEItemStack;
import appeng.api.me.items.IAEChargeableItem;
import appeng.api.me.items.IStorageCell;
=======
>>>>>>>
import cofh.api.energy.IEnergyContainerItem;
import appeng.api.IAEItemStack;
import appeng.api.me.items.IAEChargeableItem;
import appeng.api.me.items.IStorageCell;
<<<<<<<
import tconstruct.library.util.MathUtils;
=======
import cofh.api.energy.IEnergyContainerItem;
import cofh.util.MathHelper;
>>>>>>>
import tconstruct.library.util.MathUtils;
import cofh.api.energy.IEnergyContainerItem;
import cofh.util.MathHelper; |
<<<<<<<
@NotNull(message = "content can't be NULL") final byte[] content
) throws IOException {
=======
final InputStream content) throws IOException {
>>>>>>>
@NotNull(message = "content can't be NULL")
final InputStream content
) throws IOException { |
<<<<<<<
import com.jcabi.github.Limits;
=======
import com.jcabi.github.Markdown;
>>>>>>>
import com.jcabi.github.Limits;
import com.jcabi.github.Markdown;
<<<<<<<
@Override
public Limits limits() {
return new MkLimits(this.storage, this.self);
}
=======
/**
* {@inheritDoc}
* @todo #6:30min Markdown rendering mechanism should be mocked
* and implemented in MkMarkdown class, in a primitive way, of course.
* We don't need to do a real rendering, but at least return the
* same text back. When done, just remote this entire JavaDoc block.
*/
@Override
public Markdown markdown() {
throw new UnsupportedOperationException("#markdown()");
}
>>>>>>>
@Override
public Limits limits() {
return new MkLimits(this.storage, this.self);
}
/**
* {@inheritDoc}
* @todo #6:30min Markdown rendering mechanism should be mocked
* and implemented in MkMarkdown class, in a primitive way, of course.
* We don't need to do a real rendering, but at least return the
* same text back. When done, just remote this entire JavaDoc block.
*/
@Override
public Markdown markdown() {
throw new UnsupportedOperationException("#markdown()");
} |
<<<<<<<
/**
* Content.Smart can fetch encoded content.
* @throws Exception If some problem inside
*/
@Test
public final void fetchesContent() throws Exception {
final Content content = Mockito.mock(Content.class);
final String prop = "dGVzdCBlbmNvZGU=";
Mockito.doReturn(
Json.createObjectBuilder()
.add("content", prop)
.build()
).when(content).json();
MatcherAssert.assertThat(
new Content.Smart(content).content(),
Matchers.is(prop)
);
}
=======
/**
* Content.Smart can get underlying repo.
* @throws Exception If some problem inside
*/
@Test
public final void smartCanGetUnderlyingRepo() throws Exception {
final Content content = Mockito.mock(Content.class);
final Repo repo = Mockito.mock(Repo.class);
Mockito.doReturn(repo).when(content).repo();
MatcherAssert.assertThat(
new Content.Smart(content).repo(),
Matchers.is(repo)
);
}
>>>>>>>
/**
* Content.Smart can fetch encoded content.
* @throws Exception If some problem inside
*/
@Test
public final void fetchesContent() throws Exception {
final Content content = Mockito.mock(Content.class);
final String prop = "dGVzdCBlbmNvZGU=";
Mockito.doReturn(
Json.createObjectBuilder()
.add("content", prop)
.build()
).when(content).json();
MatcherAssert.assertThat(
new Content.Smart(content).content(),
Matchers.is(prop)
);
}
/**
* Content.Smart can get underlying repo.
* @throws Exception If some problem inside
*/
@Test
public final void smartCanGetUnderlyingRepo() throws Exception {
final Content content = Mockito.mock(Content.class);
final Repo repo = Mockito.mock(Repo.class);
Mockito.doReturn(repo).when(content).repo();
MatcherAssert.assertThat(
new Content.Smart(content).repo(),
Matchers.is(repo)
);
} |
<<<<<<<
public Iterable<RepoCommit> iterate(final Map<String, String> params) {
return new RtPagination<RepoCommit>(
this.request.uri().queryParams(params).back(),
new RtPagination.Mapping<RepoCommit, JsonObject>() {
@Override
public RepoCommit map(final JsonObject value) {
return RtRepoCommits.this.get(value.getString("sha"));
}
}
);
=======
@NotNull(message = "Iterable of commits is never NULL")
public Iterable<RepoCommit> iterate() {
throw new UnsupportedOperationException();
>>>>>>>
@NotNull(message = "Iterable of commits is never NULL")
public Iterable<RepoCommit> iterate(final Map<String, String> params) {
return new RtPagination<RepoCommit>(
this.request.uri().queryParams(params).back(),
new RtPagination.Mapping<RepoCommit, JsonObject>() {
@Override
public RepoCommit map(final JsonObject value) {
return RtRepoCommits.this.get(value.getString("sha"));
}
}
); |
<<<<<<<
import com.jcabi.aspects.Tv;
import java.util.Iterator;
=======
import org.apache.commons.lang3.NotImplementedException;
>>>>>>>
import com.jcabi.aspects.Tv;
import java.util.Iterator;
import org.apache.commons.lang3.NotImplementedException; |
<<<<<<<
* Get all deploy keys of the repo.
* @return DeployKeys
* @see @see <a href="http://developer.github.com/v3/repos/keys/">Deploy Keys API</a>
*/
@NotNull(message = "deploy keys are never NULL")
DeployKeys keys();
/**
=======
* Get all forks of the repo.
* @return Forks
* @see <a href="http://developer.github.com/v3/repos/forks/">Forks API</a>
*/
@NotNull(message = "Forks are never NULL")
Forks forks();
/**
>>>>>>>
* Get all deploy keys of the repo.
* @return DeployKeys
* @see @see <a href="http://developer.github.com/v3/repos/keys/">Deploy Keys API</a>
*/
@NotNull(message = "deploy keys are never NULL")
DeployKeys keys();
/**
* Get all forks of the repo.
* @return Forks
* @see <a href="http://developer.github.com/v3/repos/forks/">Forks API</a>
*/
@NotNull(message = "Forks are never NULL")
Forks forks();
/**
<<<<<<<
public DeployKeys keys() {
return this.repo.keys();
}
@Override
=======
public Forks forks() {
return this.repo.forks();
}
@Override
>>>>>>>
public DeployKeys keys() {
return this.repo.keys();
}
public Forks forks() {
return this.repo.forks();
}
@Override |
<<<<<<<
/**
* Copyright (c) 2012-2013, JCabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. 3) Neither the name of the jcabi.com nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jcabi.github;
import com.jcabi.aspects.Immutable;
import com.jcabi.aspects.Loggable;
import com.rexsl.test.Request;
import java.io.IOException;
import javax.json.JsonObject;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
/**
* Github repository.
*
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
* @todo #1 Unit test for RtRepo is required. Let's mock
* request using Mockito or com.rexsl.test.request.FakeRequest, and make
* sure that the class can do its key operations.
*/
@Immutable
@Loggable(Loggable.DEBUG)
@EqualsAndHashCode(of = { "ghub", "entry", "coords" })
final class RtRepo implements Repo {
/**
* Github.
*/
private final transient Github ghub;
/**
* RESTful entry.
*/
private final transient Request entry;
/**
* RESTful request.
*/
private final transient Request request;
/**
* Repository coordinates.
*/
private final transient Coordinates coords;
/**
* Public ctor.
* @param github Github
* @param req Request
* @param crd Coordinate of the repo
*/
RtRepo(final Github github, final Request req, final Coordinates crd) {
this.ghub = github;
this.entry = req;
this.coords = crd;
this.request = this.entry.uri()
.path("/repos")
.path(this.coords.user())
.path(this.coords.repo())
.back();
}
@Override
public String toString() {
return this.coords.toString();
}
@Override
public Github github() {
return this.ghub;
}
@Override
public Coordinates coordinates() {
return this.coords;
}
@Override
public Issues issues() {
return new RtIssues(this.entry, this);
}
@Override
public Milestones milestones() {
return new RtMilestones(this.entry, this);
}
@Override
public Pulls pulls() {
return new RtPulls(this.entry, this);
}
@Override
public Iterable<Event> events() {
return new RtPagination<Event>(
this.request.uri().path("/issues/events").back(),
new RtPagination.Mapping<Event>() {
@Override
public Event map(final JsonObject object) {
return new RtEvent(
RtRepo.this.entry,
RtRepo.this,
object.getInt("id")
);
}
}
);
}
@Override
public Labels labels() {
return new RtLabels(this.entry, this);
}
@Override
public void patch(
@NotNull(message = "JSON is never NULL") final JsonObject json)
throws IOException {
new RtJson(this.request).patch(json);
}
@Override
public JsonObject json() throws IOException {
return new RtJson(this.request).fetch();
}
}
=======
/**
* Copyright (c) 2012-2013, JCabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. 3) Neither the name of the jcabi.com nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jcabi.github;
import com.jcabi.aspects.Immutable;
import com.jcabi.aspects.Loggable;
import com.rexsl.test.Request;
import java.io.IOException;
import javax.json.JsonObject;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
/**
* Github repository.
*
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1
*/
@Immutable
@Loggable(Loggable.DEBUG)
@EqualsAndHashCode(of = { "ghub", "entry", "coords" })
final class RtRepo implements Repo {
/**
* Github.
*/
private final transient Github ghub;
/**
* RESTful entry.
*/
private final transient Request entry;
/**
* RESTful request.
*/
private final transient Request request;
/**
* Repository coordinates.
*/
private final transient Coordinates coords;
/**
* Public ctor.
* @param github Github
* @param req Request
* @param crd Coordinate of the repo
*/
RtRepo(final Github github, final Request req, final Coordinates crd) {
this.ghub = github;
this.entry = req;
this.coords = crd;
this.request = this.entry.uri()
.path("/repos")
.path(this.coords.user())
.path(this.coords.repo())
.back();
}
@Override
public String toString() {
return this.coords.toString();
}
@Override
public Github github() {
return this.ghub;
}
@Override
public Coordinates coordinates() {
return this.coords;
}
@Override
public Issues issues() {
return new RtIssues(this.entry, this);
}
@Override
public Pulls pulls() {
return new RtPulls(this.entry, this);
}
@Override
public Iterable<Event> events() {
return new RtPagination<Event>(
this.request.uri().path("/issues/events").back(),
new RtPagination.Mapping<Event>() {
@Override
public Event map(final JsonObject object) {
return new RtEvent(
RtRepo.this.entry,
RtRepo.this,
object.getInt("id")
);
}
}
);
}
@Override
public Labels labels() {
return new RtLabels(this.entry, this);
}
@Override
public Assignees assignees() {
return null;
}
@Override
public void patch(
@NotNull(message = "JSON is never NULL") final JsonObject json)
throws IOException {
new RtJson(this.request).patch(json);
}
@Override
public JsonObject json() throws IOException {
return new RtJson(this.request).fetch();
}
}
>>>>>>>
/**
* Copyright (c) 2012-2013, JCabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. 3) Neither the name of the jcabi.com nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jcabi.github;
import com.jcabi.aspects.Immutable;
import com.jcabi.aspects.Loggable;
import com.rexsl.test.Request;
import java.io.IOException;
import javax.json.JsonObject;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
/**
* Github repository.
*
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1
*/
@Immutable
@Loggable(Loggable.DEBUG)
@EqualsAndHashCode(of = { "ghub", "entry", "coords" })
final class RtRepo implements Repo {
/**
* Github.
*/
private final transient Github ghub;
/**
* RESTful entry.
*/
private final transient Request entry;
/**
* RESTful request.
*/
private final transient Request request;
/**
* Repository coordinates.
*/
private final transient Coordinates coords;
/**
* Public ctor.
* @param github Github
* @param req Request
* @param crd Coordinate of the repo
*/
RtRepo(final Github github, final Request req, final Coordinates crd) {
this.ghub = github;
this.entry = req;
this.coords = crd;
this.request = this.entry.uri()
.path("/repos")
.path(this.coords.user())
.path(this.coords.repo())
.back();
}
@Override
public String toString() {
return this.coords.toString();
}
@Override
public Github github() {
return this.ghub;
}
@Override
public Coordinates coordinates() {
return this.coords;
}
@Override
public Issues issues() {
return new RtIssues(this.entry, this);
}
@Override
public Milestones milestones() {
return new RtMilestones(this.entry, this);
}
@Override
public Pulls pulls() {
return new RtPulls(this.entry, this);
}
@Override
public Iterable<Event> events() {
return new RtPagination<Event>(
this.request.uri().path("/issues/events").back(),
new RtPagination.Mapping<Event>() {
@Override
public Event map(final JsonObject object) {
return new RtEvent(
RtRepo.this.entry,
RtRepo.this,
object.getInt("id")
);
}
}
);
}
@Override
public Labels labels() {
return new RtLabels(this.entry, this);
}
@Override
public Assignees assignees() {
return null;
}
@Override
public void patch(
@NotNull(message = "JSON is never NULL") final JsonObject json)
throws IOException {
new RtJson(this.request).patch(json);
}
@Override
public JsonObject json() throws IOException {
return new RtJson(this.request).fetch();
}
} |
<<<<<<<
* @todo #2:30min Organizations of a user.
* Let's implements a new method organizations(),
* which should return an instance of interface Organisations.
=======
* @todo #1 Unit test for GhUser is required. Let's mock
* request using Mockito or com.rexsl.test.request.FakeRequest, and make
* sure that the class can do its key operations.
>>>>>>>
* @todo #1 Unit test for GhUser is required. Let's mock
* request using Mockito or com.rexsl.test.request.FakeRequest, and make
* sure that the class can do its key operations.
* @todo #2:30min Organizations of a user.
* Let's implements a new method organizations(),
* which should return an instance of interface Organisations. |
<<<<<<<
=======
* @checkstyle ClassFanOutComplexity (500 lines)
* @todo #9 Implement milestones() method.
* Please, implement milestones() method to return
* MkMilestones. Don't forget about unit tests
>>>>>>>
* @checkstyle ClassFanOutComplexity (500 lines) |
<<<<<<<
/**
* Create new file.
* @param path The content path
* @param message The commit message
* @param content File content, Base64 encoded
* @return Content just created
* @throws IOException If there is any I/O problem
* @see <a href="http://developer.github.com/v3/repos/contents/#create-a-file">Create a file</a>
*/
@NotNull(message = "Content is never NULL")
Content create(
@NotNull(message = "path is never NULL") String path,
@NotNull(message = "message is never NULL") String message,
@NotNull(message = "content is never NULL") String content)
throws IOException;
=======
/**
* Removes a file.
* @param path The content path
* @param message The commit message
* @param sha Blob SHA of file to be deleted
* @return Commit referring to this operation
* @throws IOException If there is any I/O problem
* @see <a href="http://developer.github.com/v3/repos/contents/#delete-a-file">Delete a file</a>
*/
@NotNull(message = "Content is never NULL")
Commit remove(
@NotNull(message = "path is never NULL") String path,
@NotNull(message = "message is never NULL") String message,
@NotNull(message = "sha is never NULL") String sha)
throws IOException;
>>>>>>>
/**
* Create new file.
* @param path The content path
* @param message The commit message
* @param content File content, Base64 encoded
* @return Content just created
* @throws IOException If there is any I/O problem
* @see <a href="http://developer.github.com/v3/repos/contents/#create-a-file">Create a file</a>
*/
@NotNull(message = "Content is never NULL")
Content create(
@NotNull(message = "path is never NULL") String path,
@NotNull(message = "message is never NULL") String message,
@NotNull(message = "content is never NULL") String content)
throws IOException;
/**
* Removes a file.
* @param path The content path
* @param message The commit message
* @param sha Blob SHA of file to be deleted
* @return Commit referring to this operation
* @throws IOException If there is any I/O problem
* @see <a href="http://developer.github.com/v3/repos/contents/#delete-a-file">Delete a file</a>
*/
@NotNull(message = "Content is never NULL")
Commit remove(
@NotNull(message = "path is never NULL") String path,
@NotNull(message = "message is never NULL") String message,
@NotNull(message = "sha is never NULL") String sha)
throws IOException; |
<<<<<<<
import javax.json.Json;
import org.apache.commons.lang3.RandomStringUtils;
=======
import java.util.Collections;
import org.apache.commons.lang3.RandomStringUtils;
>>>>>>>
import java.util.Collections;
import javax.json.Json;
import org.apache.commons.lang3.RandomStringUtils;
<<<<<<<
import org.junit.BeforeClass;
import org.junit.Ignore;
=======
>>>>>>>
import org.junit.BeforeClass;
import org.junit.Ignore; |
<<<<<<<
import com.jcabi.aspects.Immutable;
=======
import java.io.IOException;
>>>>>>>
import com.jcabi.aspects.Immutable;
import java.io.IOException;
<<<<<<<
/**
* Iterate them all.
* @return Iterator of hooks
* @see <a href="http://developer.github.com/v3/repos/hooks/#list">List</a>
*/
/**
* Get specific hook by number.
* @param number Hook number
* @return Hook
* @see <a href="http://developer.github.com/v3/repos/hooks/#get-single-hook">Get single hook</a>
*/
@NotNull(message = "hook is never NULL")
Hook get(int number);
=======
/**
* Remove hook by ID.
* @param number ID of the label to remove
* @throws IOException If there is any I/O problem
* @see <a href="http://developer.github.com/v3/repos/hooks/#delete-a-hook">List</a>
*/
void remove(int number) throws IOException;
>>>>>>>
/**
* Remove hook by ID.
* @param number ID of the label to remove
* @throws IOException If there is any I/O problem
* @see <a href="http://developer.github.com/v3/repos/hooks/#delete-a-hook">List</a>
*/
void remove(int number) throws IOException;
/**
* Get specific hook by number.
* @param number Hook number
* @return Hook
* @see <a href="http://developer.github.com/v3/repos/hooks/#get-single-hook">Get single hook</a>
*/
@NotNull(message = "hook is never NULL")
Hook get(int number); |
<<<<<<<
// Read JavaScript flags if it exists.
String jsFlags = mSettings.getJsFlags();
if (jsFlags.trim().length() != 0) {
mTabControl.getCurrentWebView().setJsFlags(jsFlags);
}
/* enables registration for changes in network status from
http stack */
mNetworkStateChangedFilter = new IntentFilter();
mNetworkStateChangedFilter.addAction(
ConnectivityManager.CONNECTIVITY_ACTION);
mNetworkStateIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(
ConnectivityManager.CONNECTIVITY_ACTION)) {
boolean down = intent.getBooleanExtra(
ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
onNetworkToggle(!down);
}
}
};
IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addDataScheme("package");
mPackageInstallationReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
final String packageName = intent.getData()
.getSchemeSpecificPart();
final boolean replacing = intent.getBooleanExtra(
Intent.EXTRA_REPLACING, false);
if (Intent.ACTION_PACKAGE_REMOVED.equals(action) && replacing) {
// if it is replacing, refreshPlugins() when adding
return;
}
PackageManager pm = BrowserActivity.this.getPackageManager();
PackageInfo pkgInfo = null;
try {
pkgInfo = pm.getPackageInfo(packageName,
PackageManager.GET_PERMISSIONS);
} catch (PackageManager.NameNotFoundException e) {
return;
}
if (pkgInfo != null) {
String permissions[] = pkgInfo.requestedPermissions;
if (permissions == null) {
return;
}
boolean permissionOk = false;
for (String permit : permissions) {
if (PluginManager.PLUGIN_PERMISSION.equals(permit)) {
permissionOk = true;
break;
}
}
if (permissionOk) {
PluginManager.getInstance(BrowserActivity.this)
.refreshPlugins(
Intent.ACTION_PACKAGE_ADDED
.equals(action));
}
}
}
};
registerReceiver(mPackageInstallationReceiver, filter);
=======
>>>>>>>
// Read JavaScript flags if it exists.
String jsFlags = mSettings.getJsFlags();
if (jsFlags.trim().length() != 0) {
mTabControl.getCurrentWebView().setJsFlags(jsFlags);
} |
<<<<<<<
sendAnimateFromOverview(tab, false, null, null, delay, null);
=======
sendAnimateFromOverview(tab, false, EMPTY_URL_DATA, delay, null);
>>>>>>>
sendAnimateFromOverview(tab, false, EMPTY_URL_DATA, null, delay,
null);
<<<<<<<
final TabControl.Tab newTab = openTabAndShow((String) null, msg, false,
null);
if (newTab != parent) {
parent.addChildTab(newTab);
}
=======
openTabAndShow(EMPTY_URL_DATA, msg, false, null);
parent.addChildTab(mTabControl.getCurrentTab());
>>>>>>>
final TabControl.Tab newTab =
openTabAndShow(EMPTY_URL_DATA, msg, false, null);
if (newTab != parent) {
parent.addChildTab(newTab);
}
<<<<<<<
false, null, null, 0, null);
=======
false, EMPTY_URL_DATA, 0, null);
>>>>>>>
false, EMPTY_URL_DATA, null, 0, null); |
<<<<<<<
// call pauseWebViewTimers() now, we won't be able to call
// it in onPause() as the WebView won't be valid.
pauseWebViewTimers();
=======
// call pauseWebView() now, we won't be able to call it in
// onPause() as the WebView won't be valid. Temporarily
// change mActivityInPause to be true as pauseWebView() will
// do nothing if mActivityInPause is false.
boolean savedState = mActivityInPause;
if (savedState) {
Log.e(LOGTAG, "BrowserActivity is already paused " +
"while handing goBackOnePageOrQuit.");
}
mActivityInPause = true;
pauseWebView();
mActivityInPause = savedState;
>>>>>>>
// call pauseWebViewTimers() now, we won't be able to call
// it in onPause() as the WebView won't be valid.
// Temporarily change mActivityInPause to be true as
// pauseWebViewTimers() will do nothing if mActivityInPause
// is false.
boolean savedState = mActivityInPause;
if (savedState) {
Log.e(LOGTAG, "BrowserActivity is already paused "
+ "while handing goBackOnePageOrQuit.");
}
mActivityInPause = true;
pauseWebViewTimers();
mActivityInPause = savedState; |
<<<<<<<
private WebStorage.QuotaUpdater mWebStorageQuotaUpdater = null;
=======
// These are single-character shortcuts for searching popular sources.
private static final int SHORTCUT_INVALID = 0;
private static final int SHORTCUT_GOOGLE_SEARCH = 1;
private static final int SHORTCUT_WIKIPEDIA_SEARCH = 2;
private static final int SHORTCUT_DICTIONARY_SEARCH = 3;
private static final int SHORTCUT_GOOGLE_MOBILE_LOCAL_SEARCH = 4;
>>>>>>>
private WebStorage.QuotaUpdater mWebStorageQuotaUpdater = null;
// These are single-character shortcuts for searching popular sources.
private static final int SHORTCUT_INVALID = 0;
private static final int SHORTCUT_GOOGLE_SEARCH = 1;
private static final int SHORTCUT_WIKIPEDIA_SEARCH = 2;
private static final int SHORTCUT_DICTIONARY_SEARCH = 3;
private static final int SHORTCUT_GOOGLE_MOBILE_LOCAL_SEARCH = 4; |
<<<<<<<
byte[] postData = getLocationData(intent);
if (postData != null) {
webView.postUrl(url, postData);
} else {
webView.loadUrl(url);
}
=======
urlData.loadIn(webView);
>>>>>>>
byte[] postData = getLocationData(intent);
if (postData != null) {
webView.postUrl(urlData.mUrl, postData);
} else {
urlData.loadIn(webView);
}
<<<<<<<
needsLoad ? url : null, null,
TAB_OVERVIEW_DELAY, null);
=======
needsLoad ? urlData : EMPTY_URL_DATA, TAB_OVERVIEW_DELAY,
null);
>>>>>>>
needsLoad ? urlData : EMPTY_URL_DATA, null,
TAB_OVERVIEW_DELAY, null);
<<<<<<<
sendAnimateFromOverview(current, false, url,
postData, TAB_OVERVIEW_DELAY, null);
=======
sendAnimateFromOverview(current, false, urlData,
TAB_OVERVIEW_DELAY, null);
>>>>>>>
sendAnimateFromOverview(current, false, urlData,
postData, TAB_OVERVIEW_DELAY, null);
<<<<<<<
if (postData != null) {
current.getWebView().postUrl(url, postData);
} else {
current.getWebView().loadUrl(url);
}
=======
urlData.loadIn(current.getWebView());
>>>>>>>
if (postData != null) {
current.getWebView().postUrl(urlData.mUrl, postData);
} else {
urlData.loadIn(current.getWebView());
}
<<<<<<<
final boolean newTab, final String url, final byte[] postData,
final int delay, final Message msg) {
=======
final boolean newTab, final UrlData urlData, final int delay,
final Message msg) {
>>>>>>>
final boolean newTab, final UrlData urlData, final byte[] postData,
final int delay, final Message msg) {
<<<<<<<
if (postData != null) {
tab.getWebView().postUrl(url, postData);
} else {
tab.getWebView().loadUrl(url);
}
=======
urlData.loadIn(tab.getWebView());
>>>>>>>
if (postData != null) {
tab.getWebView().postUrl(urlData.mUrl, postData);
} else {
urlData.loadIn(tab.getWebView());
}
<<<<<<<
sendAnimateFromOverview(t, false, url, null, delay, null);
=======
sendAnimateFromOverview(t, false, urlData, delay, null);
}
// A wrapper function of {@link #openTabAndShow(UrlData, Message, boolean, String)}
// that accepts url as string.
private void openTabAndShow(String url, final Message msg,
boolean closeOnExit, String appId) {
openTabAndShow(new UrlData(url), msg, closeOnExit, appId);
>>>>>>>
sendAnimateFromOverview(t, false, urlData, null, delay, null);
}
// A wrapper function of {@link #openTabAndShow(UrlData, Message, boolean, String)}
// that accepts url as string.
private TabControl.Tab openTabAndShow(String url, final Message msg,
boolean closeOnExit, String appId) {
return openTabAndShow(new UrlData(url), msg, closeOnExit, appId);
<<<<<<<
private TabControl.Tab openTabAndShow(String url, final Message msg,
=======
private void openTabAndShow(UrlData urlData, final Message msg,
>>>>>>>
private TabControl.Tab openTabAndShow(UrlData urlData, final Message msg,
<<<<<<<
final TabControl.Tab tab = mTabControl.createNewTab(
closeOnExit, appId, url);
sendAnimateFromOverview(tab, true, url, null, delay, msg);
return tab;
=======
sendAnimateFromOverview(
mTabControl.createNewTab(closeOnExit, appId, urlData.mUrl), true,
urlData, delay, msg);
>>>>>>>
final TabControl.Tab tab = mTabControl.createNewTab(
closeOnExit, appId, urlData.mUrl);
sendAnimateFromOverview(tab, true, urlData, null, delay, msg);
return tab;
<<<<<<<
sendAnimateFromOverview(currentTab, false, url, null,
=======
sendAnimateFromOverview(currentTab, false, urlData,
>>>>>>>
sendAnimateFromOverview(currentTab, false, urlData, null,
<<<<<<<
final TabControl.Tab newTab = openTabAndShow(null, msg, false,
null);
if (newTab != parent) {
parent.addChildTab(newTab);
}
=======
openTabAndShow((String) null, msg, false, null);
parent.addChildTab(mTabControl.getCurrentTab());
>>>>>>>
final TabControl.Tab newTab = openTabAndShow((String) null, msg, false,
null);
if (newTab != parent) {
parent.addChildTab(newTab);
}
<<<<<<<
sendAnimateFromOverview(currentTab, false, data,
null, TAB_OVERVIEW_DELAY, null);
=======
sendAnimateFromOverview(currentTab, false, new UrlData(data),
TAB_OVERVIEW_DELAY, null);
>>>>>>>
sendAnimateFromOverview(currentTab, false, new UrlData(data),
null, TAB_OVERVIEW_DELAY, null);
<<<<<<<
mSettings.getHomePage(), null, TAB_OVERVIEW_DELAY,
null);
=======
new UrlData(mSettings.getHomePage()), TAB_OVERVIEW_DELAY, null);
>>>>>>>
new UrlData(mSettings.getHomePage()), null, TAB_OVERVIEW_DELAY,
null); |
<<<<<<<
values.put(Downloads.COLUMN_URI, url);
values.put(Downloads.COLUMN_COOKIE_DATA, cookies);
values.put(Downloads.COLUMN_USER_AGENT, userAgent);
values.put(Downloads.COLUMN_NOTIFICATION_PACKAGE,
=======
values.put(Downloads.URI, uri.toString());
values.put(Downloads.COOKIE_DATA, cookies);
values.put(Downloads.USER_AGENT, userAgent);
values.put(Downloads.NOTIFICATION_PACKAGE,
>>>>>>>
values.put(Downloads.COLUMN_URI, uri.toString());
values.put(Downloads.COLUMN_COOKIE_DATA, cookies);
values.put(Downloads.COLUMN_USER_AGENT, userAgent);
values.put(Downloads.COLUMN_NOTIFICATION_PACKAGE,
<<<<<<<
values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
values.put(Downloads.COLUMN_MIME_TYPE, mimetype);
values.put(Downloads.COLUMN_FILE_NAME_HINT, filename);
values.put(Downloads.COLUMN_DESCRIPTION, Uri.parse(url).getHost());
=======
values.put(Downloads.VISIBILITY, Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
values.put(Downloads.MIMETYPE, mimetype);
values.put(Downloads.FILENAME_HINT, filename);
values.put(Downloads.DESCRIPTION, uri.getHost());
>>>>>>>
values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
values.put(Downloads.COLUMN_MIME_TYPE, mimetype);
values.put(Downloads.COLUMN_FILE_NAME_HINT, filename);
values.put(Downloads.COLUMN_DESCRIPTION, uri.getHost()); |
<<<<<<<
private final String mUserAgent; // Sites may serve a different icon to different UAs
private Message mMessage;
private final Activity mActivity;
=======
private final String mUserAgent;
private final Context mContext;
>>>>>>>
private final String mUserAgent; // Sites may serve a different icon to different UAs
private Message mMessage;
private final Context mContext;
<<<<<<<
/**
* Use this ctor to store the touch icon in the bookmarks database for
* the originalUrl so we take account of redirects. Used when the user
* bookmarks a page from outside the bookmarks activity.
*/
public DownloadTouchIcon(Tab tab, BrowserActivity activity, ContentResolver cr, WebView view) {
=======
public DownloadTouchIcon(Tab tab, Context ctx, ContentResolver cr, WebView view) {
>>>>>>>
/**
* Use this ctor to store the touch icon in the bookmarks database for
* the originalUrl so we take account of redirects. Used when the user
* bookmarks a page from outside the bookmarks activity.
*/
public DownloadTouchIcon(Tab tab, Context ctx, ContentResolver cr, WebView view) {
<<<<<<<
/**
* Use this ctor to download the touch icon and update the bookmarks database
* entry for the given url. Used when the user creates a bookmark from
* within the bookmarks activity and there haven't been any redirects.
* TODO: Would be nice to set the user agent here so that there is no
* potential for the three different ctors here to return different icons.
*/
public DownloadTouchIcon(AddBookmarkPage activity, ContentResolver cr, String url) {
=======
public DownloadTouchIcon(Context ctx, ContentResolver cr, String url) {
>>>>>>>
/**
* Use this ctor to download the touch icon and update the bookmarks database
* entry for the given url. Used when the user creates a bookmark from
* within the bookmarks activity and there haven't been any redirects.
* TODO: Would be nice to set the user agent here so that there is no
* potential for the three different ctors here to return different icons.
*/
public DownloadTouchIcon(Context ctx, ContentResolver cr, String url) {
<<<<<<<
mActivity = activity;
=======
mContext = ctx;
>>>>>>>
mContext = ctx;
<<<<<<<
if (inDatabase || mMessage != null) {
AndroidHttpClient client = AndroidHttpClient.newInstance(mUserAgent);
HttpHost httpHost = Proxy.getPreferredHttpHost(mActivity, url);
=======
AndroidHttpClient client = AndroidHttpClient.newInstance(
mUserAgent);
HttpHost httpHost = Proxy.getPreferredHttpHost(mContext, url);
>>>>>>>
if (inDatabase || mMessage != null) {
AndroidHttpClient client = AndroidHttpClient.newInstance(mUserAgent);
HttpHost httpHost = Proxy.getPreferredHttpHost(mContext, url); |
<<<<<<<
public synchronized OtpErlangObject callGraph(OtpErlangAtom module, OtpErlangAtom function, OtpErlangLong arity) throws IOException, OtpErlangException {
sendRPC("erlyberly", "xref_analysis", list(module, function, arity));
OtpErlangObject result = (OtpErlangObject) receiveRPC();
System.out.println(result);
return result;
}
=======
public synchronized String moduleFunctionSourceCode(String module, String function, Integer arity) throws IOException, OtpErlangException {
OtpErlangInt otpArity = new OtpErlangInt(arity);
sendRPC("erlyberly", "get_source_code", list( tuple(atom(module), atom(function), otpArity) ));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get source code for " + module + ":" + function + "/" + arity.toString() + ".");
}
public synchronized String moduleFunctionSourceCode(String module) throws IOException, OtpErlangException {
sendRPC("erlyberly", "get_source_code", list( atom(module) ));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get source code for " + module + ".");
}
public synchronized String moduleFunctionAbstCode(String module) throws IOException, OtpErlangException {
sendRPC("erlyberly", "get_abstract_code", list(atom(module)));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get abstract code for " + module + ".");
}
public synchronized String moduleFunctionAbstCode(String module, String function, Integer arity) throws IOException, OtpErlangException {
OtpErlangInt otpArity = new OtpErlangInt(arity);
sendRPC("erlyberly", "get_abstract_code", list( tuple(atom(module), atom(function), otpArity) ));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get abstract code for " + module + ".");
}
public String returnCode(OtpErlangObject result, String errorResponse){
if(isTupleTagged(OK_ATOM, result)) {
OtpErlangBinary bin = (OtpErlangBinary) ((OtpErlangTuple)result).elementAt(1);
String ss = new String(bin.binaryValue());
return ss;
} else {
OtpErlangBinary bin = (OtpErlangBinary) ((OtpErlangTuple)result).elementAt(1);
String err = new String(bin.binaryValue());
System.out.println(err);
return errorResponse;
}
}
>>>>>>>
public synchronized OtpErlangObject callGraph(OtpErlangAtom module, OtpErlangAtom function, OtpErlangLong arity) throws IOException, OtpErlangException {
sendRPC("erlyberly", "xref_analysis", list(module, function, arity));
OtpErlangObject result = (OtpErlangObject) receiveRPC();
System.out.println(result);
return result;
}
public synchronized String moduleFunctionSourceCode(String module, String function, Integer arity) throws IOException, OtpErlangException {
OtpErlangInt otpArity = new OtpErlangInt(arity);
sendRPC("erlyberly", "get_source_code", list( tuple(atom(module), atom(function), otpArity) ));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get source code for " + module + ":" + function + "/" + arity.toString() + ".");
}
public synchronized String moduleFunctionSourceCode(String module) throws IOException, OtpErlangException {
sendRPC("erlyberly", "get_source_code", list( atom(module) ));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get source code for " + module + ".");
}
public synchronized String moduleFunctionAbstCode(String module) throws IOException, OtpErlangException {
sendRPC("erlyberly", "get_abstract_code", list(atom(module)));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get abstract code for " + module + ".");
}
public synchronized String moduleFunctionAbstCode(String module, String function, Integer arity) throws IOException, OtpErlangException {
OtpErlangInt otpArity = new OtpErlangInt(arity);
sendRPC("erlyberly", "get_abstract_code", list( tuple(atom(module), atom(function), otpArity) ));
OtpErlangObject result = receiveRPC();
return returnCode(result, "Failed to get abstract code for " + module + ".");
}
public String returnCode(OtpErlangObject result, String errorResponse){
if(isTupleTagged(OK_ATOM, result)) {
OtpErlangBinary bin = (OtpErlangBinary) ((OtpErlangTuple)result).elementAt(1);
String ss = new String(bin.binaryValue());
return ss;
} else {
OtpErlangBinary bin = (OtpErlangBinary) ((OtpErlangTuple)result).elementAt(1);
String err = new String(bin.binaryValue());
System.out.println(err);
return errorResponse;
}
} |
<<<<<<<
/**
* Check if this field have been packed into a length-delimited
* field. If so, update internal state to reflect that packed fields
* are being read.
* @throws IOException
*/
private void checkIfPackedField() throws IOException
{
// Do we have the start of a packed field?
if (packedLimit == 0 && WireFormat.getTagWireType(lastTag) == WIRETYPE_LENGTH_DELIMITED)
{
final int length = readRawVarint32();
if (length < 0)
throw ProtobufException.negativeSize();
this.packedLimit = getTotalBytesRead() + length;
}
}
=======
@Override
>>>>>>>
/**
* Check if this field have been packed into a length-delimited
* field. If so, update internal state to reflect that packed fields
* are being read.
* @throws IOException
*/
private void checkIfPackedField() throws IOException
{
// Do we have the start of a packed field?
if (packedLimit == 0 && WireFormat.getTagWireType(lastTag) == WIRETYPE_LENGTH_DELIMITED)
{
final int length = readRawVarint32();
if (length < 0)
throw ProtobufException.negativeSize();
this.packedLimit = getTotalBytesRead() + length;
}
}
@Override |
<<<<<<<
import com.binance.client.model.ResponseResult;
import com.binance.client.model.market.AggregateTrade;
import com.binance.client.model.market.Candlestick;
import com.binance.client.model.market.ExchangeFilter;
import com.binance.client.model.market.ExchangeInfoEntry;
import com.binance.client.model.market.ExchangeInformation;
import com.binance.client.model.market.FundingRate;
import com.binance.client.model.market.LiquidationOrder;
import com.binance.client.model.market.MarkPrice;
import com.binance.client.model.market.OrderBook;
import com.binance.client.model.market.OrderBookEntry;
import com.binance.client.model.market.PriceChangeTicker;
import com.binance.client.model.market.RateLimit;
import com.binance.client.model.market.SymbolOrderBook;
import com.binance.client.model.market.SymbolPrice;
import com.binance.client.model.market.Trade;
=======
import com.binance.client.model.market.*;
>>>>>>>
import com.binance.client.model.ResponseResult;
import com.binance.client.model.market.*; |
<<<<<<<
import com.binance.client.model.ResponseResult;
import com.binance.client.model.market.AggregateTrade;
import com.binance.client.model.market.Candlestick;
import com.binance.client.model.market.ExchangeInformation;
import com.binance.client.model.market.FundingRate;
import com.binance.client.model.market.LiquidationOrder;
import com.binance.client.model.market.MarkPrice;
import com.binance.client.model.market.OrderBook;
import com.binance.client.model.market.PriceChangeTicker;
import com.binance.client.model.market.SymbolOrderBook;
import com.binance.client.model.market.SymbolPrice;
import com.binance.client.model.market.Trade;
=======
import com.binance.client.model.market.*;
>>>>>>>
import com.binance.client.model.ResponseResult;
import com.binance.client.model.market.*; |
<<<<<<<
InterMineAPI im = SessionMethods.getInterMineAPI(session);
if (request.getParameter("upgradeBagName") == null) {
InterMineBag bag = profile.createBag(bagName, bagType, "", im.getClassKeys());
bag.addIdsToBag(contents, bagType);
session.removeAttribute("bagQueryResult");
} else {
String bagToUpgradeName = bagName;
InterMineBag bagToUpgrade = profile.getSavedBags().get(bagToUpgradeName);
bagToUpgrade.upgradeOsb(contents);
session.removeAttribute("bagQueryResult_" + bagToUpgradeName);
}
=======
InterMineBag bag = profile.createBag(bagName, bagType, "");
bag.addIdsToBag(contents, bagType);
//track the list creation
im.getTrackerDelegate().trackListCreation(bagType, bag.getSize(),
ListBuildMode.IDENTIFIERS, profile, session.getId());
session.removeAttribute("bagQueryResult");
>>>>>>>
if (request.getParameter("upgradeBagName") == null) {
InterMineBag bag = profile.createBag(bagName, bagType, "", im.getClassKeys());
bag.addIdsToBag(contents, bagType);
//track the list creation
im.getTrackerDelegate().trackListCreation(bagType, bag.getSize(),
ListBuildMode.IDENTIFIERS, profile, session.getId());
session.removeAttribute("bagQueryResult");
} else {
String bagToUpgradeName = bagName;
InterMineBag bagToUpgrade = profile.getSavedBags().get(bagToUpgradeName);
bagToUpgrade.upgradeOsb(contents);
session.removeAttribute("bagQueryResult_" + bagToUpgradeName);
} |
<<<<<<<
public BigInteger getSerialNumber() {
return serialNumber;
}
=======
public String getPolicyID() {
return policy.toString();
}
>>>>>>>
public String getPolicyID() {
return policy.toString();
}
public BigInteger getSerialNumber() {
return serialNumber;
} |
<<<<<<<
import org.intermine.api.profile.InterMineBag;
=======
import org.apache.log4j.Logger;
>>>>>>>
import org.intermine.api.profile.InterMineBag;
import org.apache.log4j.Logger; |
<<<<<<<
if (rslv == null) {
rslv = IdResolverService.getHumanIdResolver();
}
=======
>>>>>>>
<<<<<<<
=======
private String resolveGene(String mimId) {
int resCount = rslv.countResolutions(HUMAN_TAXON, mimId);
if (resCount != 1) {
LOG.info("RESOLVER: failed to resolve gene to one identifier, ignoring gene - MIM:"
+ mimId + " count: " + resCount + " - "
+ rslv.resolveId("" + HUMAN_TAXON, mimId));
return null;
}
return rslv.resolveId(HUMAN_TAXON, mimId).iterator().next();
}
>>>>>>> |
<<<<<<<
private final ServletContext context;
private static final String WEB_INF = "WEB-INF";
=======
private ServletContext context;
private static final String WEB_INF = "/WEB-INF";
>>>>>>>
private final ServletContext context;
private static final String WEB_INF = "/WEB-INF"; |
<<<<<<<
converter.setGaff("2.0");
converter.setLicence("https://creativecommons.org/licenses/by/4.0/legalcode");
=======
>>>>>>>
converter.setLicence("https://creativecommons.org/licenses/by/4.0/legalcode"); |
<<<<<<<
tab.put("description", props.containsKey(i + ".description")
? (String) props.get(i + ".description") : "");
=======
tab.put("description", props.containsKey(i + ".description")
? (String) props.get(i + ".description") : "");
>>>>>>>
tab.put("description", props.containsKey(i + ".description")
? (String) props.get(i + ".description") : "");
tab.put("description", props.containsKey(i + ".description")
? (String) props.get(i + ".description") : "");
<<<<<<<
tab.put("name", props.containsKey(i + ".name")
? (String) props.get(i + ".name") : identifier);
=======
tab.put("name", props.containsKey(i + ".name")
? (String) props.get(i + ".name") : identifier);
>>>>>>>
tab.put("name", props.containsKey(i + ".name")
? (String) props.get(i + ".name") : identifier);
<<<<<<<
templates = templateManager.getAspectTemplates(
TagNames.IM_ASPECT_PREFIX + identifier, null);
if (SessionMethods.getProfile(session).isLoggedIn()) {
mostPopularTemplateNames = trackerDelegate.getMostPopularTemplateOrder(
SessionMethods.getProfile(session), session.getId());
=======
/*TrackerDelegate trackerDelegate = im.getTrackerDelegate();
if (trackerDelegate != null) {
trackerDelegate.setTemplateManager(im.getTemplateManager());
}*/
TemplateManager tm = im.getTemplateManager();
Profile profile = SessionMethods.getProfile(session);
if (profile.isLoggedIn()) {
templates = tm.getPopularTemplatesByAspect(
TagNames.IM_ASPECT_PREFIX + identifier,
MAX_TEMPLATES, profile.getUsername(),
session.getId());
>>>>>>>
TemplateManager tm = im.getTemplateManager();
Profile profile = SessionMethods.getProfile(session);
if (profile.isLoggedIn()) {
templates = tm.getPopularTemplatesByAspect(
TagNames.IM_ASPECT_PREFIX + identifier,
MAX_TEMPLATES, profile.getUsername(),
session.getId());
<<<<<<<
List<Tag> preferredBagTypeTags = tagManager.getTags(
"im:preferredBagType", null, "class", im.getProfileManager().getSuperuser());
=======
List<Tag> preferredBagTypeTags = tagManager.getTags("im:preferredBagType", null, "class",
im.getProfileManager().getSuperuser());
>>>>>>>
List<Tag> preferredBagTypeTags = tagManager.getTags(
"im:preferredBagType", null, "class", im.getProfileManager().getSuperuser()); |
<<<<<<<
if (profileManager != null) {
profileManager.close();
}
if (trackerDelegate != null) {
trackerDelegate.close();
}
=======
profileManager.close();
trackerDelegate.close();
((ObjectStoreInterMineImpl) os).close();
>>>>>>>
if (profileManager != null) {
profileManager.close();
}
if (trackerDelegate != null) {
trackerDelegate.close();
}
((ObjectStoreInterMineImpl) os).close(); |
<<<<<<<
import org.eclipse.hawkbit.eventbus.event.TargetTagUpdateEvent;
=======
import org.eclipse.hawkbit.eventbus.event.TargetTagDeletedEvent;
>>>>>>>
import org.eclipse.hawkbit.eventbus.event.TargetTagDeletedEvent;
import org.eclipse.hawkbit.eventbus.event.TargetTagUpdateEvent; |
<<<<<<<
import org.springframework.transaction.annotation.Isolation;
=======
import org.springframework.stereotype.Service;
>>>>>>>
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation; |
<<<<<<<
this.isAuthorized = true;
=======
Permission[] tmp = null;
if (perms != null) {
tmp = new Permission[perms.length];
for (int i=0; i < perms.length; i++) {
if (perms[i] == null) {
throw new NullPointerException("permission can't be null");
}
/*
* An AllPermission argument is equivalent to calling
* doPrivileged() without any limit permissions.
*/
if (perms[i].getClass() == AllPermission.class) {
parent = null;
}
tmp[i] = perms[i];
}
}
/*
* For a doPrivileged() with limited privilege scope, initialize
* the relevant fields.
*
* The limitedContext field contains the union of all domains which
* are enclosed by this limited privilege scope. In other words,
* it contains all of the domains which could potentially be checked
* if none of the limiting permissions implied a requested permission.
*/
if (parent != null) {
this.limitedContext = combine(parent.context, parent.limitedContext);
this.isLimited = true;
this.isWrapped = true;
this.permissions = tmp;
this.parent = parent;
this.privilegedContext = context; // used in checkPermission2()
}
>>>>>>>
Permission[] tmp = null;
if (perms != null) {
tmp = new Permission[perms.length];
for (int i=0; i < perms.length; i++) {
if (perms[i] == null) {
throw new NullPointerException("permission can't be null");
}
/*
* An AllPermission argument is equivalent to calling
* doPrivileged() without any limit permissions.
*/
if (perms[i].getClass() == AllPermission.class) {
parent = null;
}
tmp[i] = perms[i];
}
}
/*
* For a doPrivileged() with limited privilege scope, initialize
* the relevant fields.
*
* The limitedContext field contains the union of all domains which
* are enclosed by this limited privilege scope. In other words,
* it contains all of the domains which could potentially be checked
* if none of the limiting permissions implied a requested permission.
*/
if (parent != null) {
this.limitedContext = combine(parent.context, parent.limitedContext);
this.isLimited = true;
this.isWrapped = true;
this.permissions = tmp;
this.parent = parent;
this.privilegedContext = context; // used in checkPermission2()
}
this.isAuthorized = true;
<<<<<<<
private AccessControlContext goCombiner(ProtectionDomain[] current,
AccessControlContext assigned) {
// the assigned ACC's combiner is not null --
// let the combiner do its thing
=======
>>>>>>>
<<<<<<<
// No need to clone current and assigned.context
// combine() will not update them
ProtectionDomain[] combinedPds = assigned.combiner.combine(
current, assigned.context);
// return new AccessControlContext(combinedPds, assigned.combiner);
// Reuse existing ACC
this.context = combinedPds;
this.combiner = assigned.combiner;
this.isPrivileged = false;
this.isAuthorized = assigned.isAuthorized;
return this;
=======
>>>>>>> |
<<<<<<<
import org.springframework.test.context.TestPropertySource;
=======
import org.springframework.test.context.TestExecutionListeners.MergeMode;
>>>>>>>
import org.springframework.test.context.TestExecutionListeners.MergeMode;
import org.springframework.test.context.TestPropertySource;
<<<<<<<
@TestPropertySource(properties = { "hawkbit.server.security.cors.enabled=true",
"hawkbit.server.security.cors.allowedOrigins=" + CorsTest.ALLOWED_ORIGIN_FIRST + ","
+ CorsTest.ALLOWED_ORIGIN_SECOND })
=======
@RunWith(SpringRunner.class)
@SpringBootTest(properties = { "hawkbit.dmf.rabbitmq.enabled=false", "hawkbit.server.security.cors.enabled=true",
"hawkbit.server.security.cors.allowedOrigins=" + CorsTest.ALLOWED_ORIGIN_FIRST + ","
+ CorsTest.ALLOWED_ORIGIN_SECOND })
@TestExecutionListeners(listeners = { MySqlTestDatabase.class, MsSqlTestDatabase.class,
PostgreSqlTestDatabase.class }, mergeMode = MergeMode.MERGE_WITH_DEFAULTS)
>>>>>>>
@SpringBootTest(properties = {"hawkbit.dmf.rabbitmq.enabled=false", "hawkbit.server.security.cors.enabled=true",
"hawkbit.server.security.cors.allowedOrigins=" + CorsTest.ALLOWED_ORIGIN_FIRST + "," + CorsTest.ALLOWED_ORIGIN_SECOND})
@TestExecutionListeners(listeners = { MySqlTestDatabase.class, MsSqlTestDatabase.class },
mergeMode = MergeMode.MERGE_WITH_DEFAULTS) |
<<<<<<<
=======
private DistributionSetManagement distributionSetManagement;
private DsMetadataPopupLayout dsMetadataPopupLayout;
>>>>>>>
<<<<<<<
private static final String VIEW = "view";
private transient DistributionSetManagement distributionSetManagement;
private DsMetadataPopupLayout dsMetadataPopupLayout;
=======
private static final String VIEW = "view";
>>>>>>>
private static final String VIEW = "view";
private DistributionSetManagement distributionSetManagement;
private DsMetadataPopupLayout dsMetadataPopupLayout;
<<<<<<<
private Long selectedDistSetId;
/**
*
* @param i18n
* @param permissionChecker
* @param distributionSetManagement
* @param dsMetadataPopupLayout
*/
=======
private Long selectedDistSetId;
/**
* Initialize the component.
* @param i18n
* @param permissionChecker
* @param distributionSetManagement
* @param dsMetadataPopupLayout
* @param entityFactory
*/
>>>>>>>
private Long selectedDistSetId;
/**
*
* @param i18n
* @param permissionChecker
* @param distributionSetManagement
* @param dsMetadataPopupLayout
* @param entityFactory
*/
<<<<<<<
}
/**
* Create metadata.
*
* @param metadataKeyName
*/
public void createMetadata(final String metadataKeyName) {
final IndexedContainer metadataContainer = (IndexedContainer) getContainerDataSource();
final Item item = metadataContainer.addItem(metadataKeyName);
item.getItemProperty(METADATA_KEY).setValue(metadataKeyName);
}
/**
* Delete metadata.
*
* @param metadataKeyName
*/
public void deleteMetadata(final String metadataKeyName) {
final IndexedContainer metadataContainer = (IndexedContainer) getContainerDataSource();
metadataContainer.removeItem(metadataKeyName);
=======
>>>>>>> |
<<<<<<<
nameTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.name"), "", ValoTheme.TEXTFIELD_TINY,
true, null, i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
nameTextField.setId(SPUIComponetIdProvider.SOFT_MODULE_NAME);
=======
nameTextField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
nameTextField.setId(SPUIComponentIdProvider.SOFT_MODULE_NAME);
>>>>>>>
nameTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.name"), "", ValoTheme.TEXTFIELD_TINY,
true, null, i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
nameTextField.setId(SPUIComponentIdProvider.SOFT_MODULE_NAME);
<<<<<<<
versionTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.version"), "",
ValoTheme.TEXTFIELD_TINY, true, null, i18n.get("textfield.version"), true,
SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
versionTextField.setId(SPUIComponetIdProvider.SOFT_MODULE_VERSION);
=======
versionTextField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("textfield.version"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
versionTextField.setId(SPUIComponentIdProvider.SOFT_MODULE_VERSION);
>>>>>>>
versionTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.version"), "",
ValoTheme.TEXTFIELD_TINY, true, null, i18n.get("textfield.version"), true,
SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
versionTextField.setId(SPUIComponentIdProvider.SOFT_MODULE_VERSION);
<<<<<<<
typeComboBox = SPUIComponentProvider.getComboBox(i18n.get("upload.swmodule.type"), "", "", null, null, false,
null, i18n.get("upload.swmodule.type"));
typeComboBox.setId(SPUIComponetIdProvider.SW_MODULE_TYPE);
=======
typeComboBox = SPUIComponentProvider.getComboBox("", "", null, null, false, null,
i18n.get("upload.swmodule.type"));
typeComboBox.setId(SPUIComponentIdProvider.SW_MODULE_TYPE);
>>>>>>>
typeComboBox = SPUIComponentProvider.getComboBox(i18n.get("upload.swmodule.type"), "", "", null, null, false,
null, i18n.get("upload.swmodule.type"));
typeComboBox.setId(SPUIComponentIdProvider.SW_MODULE_TYPE);
<<<<<<<
=======
/* save or update button */
saveSoftware = SPUIComponentProvider.getButton(SPUIComponentIdProvider.SOFT_MODULE_SAVE, "", "", "", true,
FontAwesome.SAVE, SPUIButtonStyleSmallNoBorder.class);
saveSoftware.addClickListener(event -> {
if (editSwModule) {
updateSwModule();
} else {
/* add new or update software module */
addNewBaseSoftware();
}
});
/* close button */
closeWindow = SPUIComponentProvider.getButton(SPUIComponentIdProvider.SOFT_MODULE_DISCARD, "", "", "", true,
FontAwesome.TIMES, SPUIButtonStyleSmallNoBorder.class);
/* Just close this window when this button is clicked */
closeWindow.addClickListener(event -> closeThisWindow());
>>>>>>> |
<<<<<<<
"hawkbit.server.controller.security.authentication.header.enabled", Boolean.class, Boolean.FALSE.toString(),
TenantConfigurationBooleanValidator.class),
=======
"hawkbit.server.ddi.security.authentication.header.enabled", Boolean.FALSE.toString()),
>>>>>>>
"hawkbit.server.ddi.security.authentication.header.enabled", Boolean.class, Boolean.FALSE.toString(),
TenantConfigurationBooleanValidator.class),
<<<<<<<
"hawkbit.server.controller.security.authentication.header.authority", String.class,
Boolean.FALSE.toString(), TenantConfigurationStringValidator.class),
=======
"hawkbit.server.ddi.security.authentication.header.authority", Boolean.FALSE.toString()),
>>>>>>>
"hawkbit.server.ddi.security.authentication.header.authority", String.class, Boolean.FALSE.toString(),
TenantConfigurationStringValidator.class),
<<<<<<<
"hawkbit.server.controller.security.authentication.targettoken.enabled", Boolean.class,
Boolean.FALSE.toString(), TenantConfigurationBooleanValidator.class),
=======
"hawkbit.server.ddi.security.authentication.targettoken.enabled", Boolean.FALSE.toString()),
>>>>>>>
"hawkbit.server.ddi.security.authentication.targettoken.enabled", Boolean.class, Boolean.FALSE.toString(),
TenantConfigurationBooleanValidator.class),
<<<<<<<
"hawkbit.server.controller.security.authentication.gatewaytoken.enabled", Boolean.class,
Boolean.FALSE.toString(), TenantConfigurationBooleanValidator.class),
=======
"hawkbit.server.ddi.security.authentication.gatewaytoken.enabled", Boolean.FALSE.toString()),
>>>>>>>
"hawkbit.server.ddi.security.authentication.gatewaytoken.enabled", Boolean.class, Boolean.FALSE.toString(),
TenantConfigurationBooleanValidator.class),
<<<<<<<
"hawkbit.server.controller.security.authentication.gatewaytoken.name", String.class, null,
TenantConfigurationStringValidator.class),
=======
"hawkbit.server.ddi.security.authentication.gatewaytoken.name", null),
>>>>>>>
"hawkbit.server.ddi.security.authentication.gatewaytoken.name", String.class, null,
TenantConfigurationStringValidator.class),
<<<<<<<
"hawkbit.server.controller.security.authentication.gatewaytoken.key", String.class, null,
TenantConfigurationStringValidator.class),
/**
* string value which holds the polling time interval in the format HH:mm:ss
*/
POLLING_TIME_INTERVAL("pollingOverdueTime", "hawkbit.controller.pollingOverdueTime", String.class, null,
TenantConfigurationPollingDurationValidator.class),
/**
* string value which holds the polling time interval in the format HH:mm:ss
*/
POLLING_OVERDUE_TIME_INTERVAL("pollingTime", "hawkbit.controller.pollingTime", String.class, null,
TenantConfigurationPollingDurationValidator.class);
=======
"hawkbit.server.ddi.security.authentication.gatewaytoken.key", null);
>>>>>>>
"hawkbit.server.ddi.security.authentication.gatewaytoken.key", String.class, null,
TenantConfigurationStringValidator.class),
/**
* string value which holds the polling time interval in the format HH:mm:ss
*/
POLLING_TIME_INTERVAL("pollingOverdueTime", "hawkbit.controller.pollingOverdueTime", String.class, null,
TenantConfigurationPollingDurationValidator.class),
/**
* string value which holds the polling time interval in the format HH:mm:ss
*/
POLLING_OVERDUE_TIME_INTERVAL("pollingTime", "hawkbit.controller.pollingTime", String.class, null,
TenantConfigurationPollingDurationValidator.class); |
<<<<<<<
import org.eclipse.hawkbit.repository.model.NamedEntity;
=======
import org.eclipse.hawkbit.repository.eventbus.event.TargetUpdatedEvent;
>>>>>>>
import org.eclipse.hawkbit.repository.eventbus.event.TargetUpdatedEvent;
import org.eclipse.hawkbit.repository.model.NamedEntity; |
<<<<<<<
import org.eclipse.hawkbit.repository.FilterParams;
=======
import org.apache.commons.collections4.CollectionUtils;
>>>>>>>
import org.eclipse.hawkbit.repository.FilterParams;
import org.apache.commons.collections4.CollectionUtils;
<<<<<<<
private transient Collection<TargetUpdateStatus> status = null;
private transient Boolean overdueState;
private String[] targetTags = null;
private Long distributionId = null;
private String searchText = null;
private Boolean noTagClicked = Boolean.FALSE;
=======
private transient Collection<TargetUpdateStatus> status;
private String[] targetTags;
private Long distributionId;
private String searchText;
private Boolean noTagClicked;
>>>>>>>
private transient Collection<TargetUpdateStatus> status;
private transient Boolean overdueState;
private String[] targetTags;
private Long distributionId;
private String searchText;
private Boolean noTagClicked;
<<<<<<<
=======
private Boolean anyFilterSelected() {
if (CollectionUtils.isEmpty(status) && distributionId == null && Strings.isNullOrEmpty(searchText)
&& !isTagSelected()) {
return false;
}
return true;
}
>>>>>>> |
<<<<<<<
=======
void onEvent(final MetadataEvent event) {
UI.getCurrent().access(() -> {
final DistributionSetMetadata dsMetadata = event.getDistributionSetMetadata();
if (dsMetadata != null && isDistributionSetSelected(dsMetadata.getDistributionSet())) {
if (event.getMetadataUIEvent() == MetadataEvent.MetadataUIEvent.CREATE_DISTRIBUTION_SET_METADATA) {
dsMetadataTable.createMetadata(event.getDistributionSetMetadata().getKey());
} else if (event
.getMetadataUIEvent() == MetadataEvent.MetadataUIEvent.DELETE_DISTRIBUTION_SET_METADATA) {
dsMetadataTable.deleteMetadata(event.getDistributionSetMetadata().getKey());
}
}
});
}
@EventBusListenerMethod(scope = EventScope.SESSION)
>>>>>>>
<<<<<<<
@Override
protected String getShowMetadataButtonId() {
final DistributionSetIdName lastselectedDistDS = managementUIState.getLastSelectedDistribution().isPresent()
? managementUIState.getLastSelectedDistribution().get() : null;
return SPUIComponentIdProvider.DS_TABLE_MANAGE_METADATA_ID + "." + lastselectedDistDS.getName() + "."
+ lastselectedDistDS.getVersion();
}
=======
>>>>>>> |
<<<<<<<
distNameTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.name"), "", ValoTheme.TEXTFIELD_TINY,
true, null, i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
distNameTextField.setId(SPUIComponetIdProvider.DIST_ADD_NAME);
=======
distNameTextField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
distNameTextField.setId(SPUIComponentIdProvider.DIST_ADD_NAME);
>>>>>>>
distNameTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.name"), "", ValoTheme.TEXTFIELD_TINY,
true, null, i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
distNameTextField.setId(SPUIComponentIdProvider.DIST_ADD_NAME);
<<<<<<<
distVersionTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.version"), "",
ValoTheme.TEXTFIELD_TINY, true, null, i18n.get("textfield.version"), true,
SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
distVersionTextField.setId(SPUIComponetIdProvider.DIST_ADD_VERSION);
=======
distVersionTextField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("textfield.version"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
distVersionTextField.setId(SPUIComponentIdProvider.DIST_ADD_VERSION);
>>>>>>>
distVersionTextField = SPUIComponentProvider.getTextField(i18n.get("textfield.version"), "",
ValoTheme.TEXTFIELD_TINY, true, null, i18n.get("textfield.version"), true,
SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
distVersionTextField.setId(SPUIComponentIdProvider.DIST_ADD_VERSION);
<<<<<<<
descTextArea = SPUIComponentProvider.getTextArea(i18n.get("textfield.description"), "text-area-style",
ValoTheme.TEXTAREA_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descTextArea.setId(SPUIComponetIdProvider.DIST_ADD_DESC);
=======
descTextArea = SPUIComponentProvider.getTextArea("text-area-style", ValoTheme.TEXTAREA_TINY, false, null,
i18n.get("textfield.description"), SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descTextArea.setId(SPUIComponentIdProvider.DIST_ADD_DESC);
>>>>>>>
descTextArea = SPUIComponentProvider.getTextArea(i18n.get("textfield.description"), "text-area-style",
ValoTheme.TEXTAREA_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descTextArea.setId(SPUIComponentIdProvider.DIST_ADD_DESC);
<<<<<<<
reqMigStepCheckbox.setId(SPUIComponetIdProvider.DIST_ADD_MIGRATION_CHECK);
=======
reqMigStepCheckbox.setId(SPUIComponentIdProvider.DIST_ADD_MIGRATION_CHECK);
/* save or update button */
saveDistributionBtn = SPUIComponentProvider.getButton(SPUIComponentIdProvider.DIST_ADD_SAVE, "", "", "", true,
FontAwesome.SAVE, SPUIButtonStyleSmallNoBorder.class);
saveDistributionBtn.addClickListener(event -> saveDistribution());
/* close button */
discardDistributionBtn = SPUIComponentProvider.getButton(SPUIComponentIdProvider.DIST_ADD_DISCARD, "", "", "",
true, FontAwesome.TIMES, SPUIButtonStyleSmallNoBorder.class);
discardDistributionBtn.addClickListener(event -> discardDistribution());
>>>>>>>
reqMigStepCheckbox.setId(SPUIComponentIdProvider.DIST_ADD_MIGRATION_CHECK); |
<<<<<<<
=======
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
>>>>>>>
import org.springframework.beans.factory.annotation.Autowired; |
<<<<<<<
import java.util.HashSet;
import java.util.List;
=======
>>>>>>>
import java.util.HashSet;
<<<<<<<
import org.eclipse.hawkbit.ui.distributions.dstable.DistributionSetTable;
=======
import org.eclipse.hawkbit.ui.decorators.SPUIWindowDecorator;
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
>>>>>>>
import org.eclipse.hawkbit.ui.decorators.SPUIWindowDecorator;
import org.eclipse.hawkbit.ui.distributions.dstable.DistributionSetTable;
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
<<<<<<<
/* close the window */
closeThisWindow();
final Set<DistributionSetIdName> s = new HashSet<>();
s.add(new DistributionSetIdName(newDist.getId(),newDist.getName(),newDist.getVersion()));
distributionSetTable.setValue(s);
=======
eventBus.publish(this, new DistributionTableEvent(BaseEntityEventType.NEW_ENTITY, newDist));
>>>>>>>
final Set<DistributionSetIdName> s = new HashSet<>();
s.add(new DistributionSetIdName(newDist.getId(),newDist.getName(),newDist.getVersion()));
distributionSetTable.setValue(s); |
<<<<<<<
final TextArea filterField = SPUIComponentProvider.getTextArea(null, "text-area-style",
ValoTheme.TEXTFIELD_TINY, false, null, null,
SPUILabelDefinitions.TARGET_FILTER_QUERY_TEXT_FIELD_LENGTH);
filterField.setId(SPUIComponetIdProvider.ROLLOUT_TARGET_FILTER_QUERY_FIELD);
=======
final TextArea filterField = SPUIComponentProvider.getTextArea("text-area-style", ValoTheme.TEXTFIELD_TINY,
false, null, null, SPUILabelDefinitions.TARGET_FILTER_QUERY_TEXT_FIELD_LENGTH);
filterField.setId(SPUIComponentIdProvider.ROLLOUT_TARGET_FILTER_QUERY_FIELD);
>>>>>>>
final TextArea filterField = SPUIComponentProvider.getTextArea(null, "text-area-style",
ValoTheme.TEXTFIELD_TINY, false, null, null,
SPUILabelDefinitions.TARGET_FILTER_QUERY_TEXT_FIELD_LENGTH);
filterField.setId(SPUIComponentIdProvider.ROLLOUT_TARGET_FILTER_QUERY_FIELD);
<<<<<<<
targetFilter.setId(SPUIComponetIdProvider.ROLLOUT_TARGET_FILTER_COMBO_ID);
targetFilter.setSizeUndefined();
=======
targetFilter.setId(SPUIComponentIdProvider.ROLLOUT_TARGET_FILTER_COMBO_ID);
targetFilter.setSizeFull();
>>>>>>>
targetFilter.setId(SPUIComponentIdProvider.ROLLOUT_TARGET_FILTER_COMBO_ID);
targetFilter.setSizeUndefined();
<<<<<<<
=======
}
private Button createDiscardButton() {
final Button discardRollloutBtn = SPUIComponentProvider.getButton(
SPUIComponentIdProvider.ROLLOUT_CREATE_UPDATE_DISCARD_ID, "", "", "", true, FontAwesome.TIMES,
SPUIButtonStyleSmallNoBorder.class);
discardRollloutBtn.addClickListener(event -> onDiscard());
return discardRollloutBtn;
}
private Button createSaveButton() {
final Button saveRolloutBtn = SPUIComponentProvider.getButton(
SPUIComponentIdProvider.ROLLOUT_CREATE_UPDATE_SAVE_ID, "", "", "", true, FontAwesome.SAVE,
SPUIButtonStyleSmallNoBorder.class);
saveRolloutBtn.addClickListener(event -> onRolloutSave());
saveRolloutBtn.setImmediate(true);
return saveRolloutBtn;
>>>>>>>
<<<<<<<
final TextArea descriptionField = SPUIComponentProvider.getTextArea(null, "text-area-style",
ValoTheme.TEXTAREA_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descriptionField.setId(SPUIComponetIdProvider.ROLLOUT_DESCRIPTION_ID);
=======
final TextArea descriptionField = SPUIComponentProvider.getTextArea("text-area-style", ValoTheme.TEXTFIELD_TINY,
false, null, i18n.get("textfield.description"), SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descriptionField.setId(SPUIComponentIdProvider.ROLLOUT_DESCRIPTION_ID);
>>>>>>>
final TextArea descriptionField = SPUIComponentProvider.getTextArea(null, "text-area-style",
ValoTheme.TEXTAREA_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descriptionField.setId(SPUIComponentIdProvider.ROLLOUT_DESCRIPTION_ID);
<<<<<<<
private TextField createErrorThreshold() {
final TextField errorField = getTextfield("prompt.error.threshold");
errorField.addValidator(new ThresholdFieldValidator());
errorField.setId(SPUIComponetIdProvider.ROLLOUT_ERROR_THRESOLD_ID);
=======
private TextField createErrorThresold() {
final TextField errorField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("prompt.error.threshold"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
errorField.addValidator(new ThresoldFieldValidator());
errorField.setId(SPUIComponentIdProvider.ROLLOUT_ERROR_THRESOLD_ID);
>>>>>>>
private TextField createErrorThreshold() {
final TextField errorField = getTextfield("prompt.error.threshold");
errorField.addValidator(new ThresholdFieldValidator());
errorField.setId(SPUIComponentIdProvider.ROLLOUT_ERROR_THRESOLD_ID);
<<<<<<<
final TextField thresholdField = getTextfield("prompt.tigger.threshold");
thresholdField.setId(SPUIComponetIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID);
thresholdField.addValidator(new ThresholdFieldValidator());
thresholdField.setSizeUndefined();
=======
final TextField thresholdField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("prompt.tigger.thresold"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
thresholdField.setId(SPUIComponentIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID);
thresholdField.addValidator(new ThresoldFieldValidator());
thresholdField.setSizeFull();
>>>>>>>
final TextField thresholdField = getTextfield("prompt.tigger.threshold");
thresholdField.setId(SPUIComponentIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID);
thresholdField.addValidator(new ThresholdFieldValidator());
thresholdField.setSizeUndefined();
<<<<<<<
final TextField noOfGroupsField = getTextfield("prompt.number.of.groups");
noOfGroupsField.setId(SPUIComponetIdProvider.ROLLOUT_NO_OF_GROUPS_ID);
=======
final TextField noOfGroupsField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("prompt.number.of.groups"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
noOfGroupsField.setId(SPUIComponentIdProvider.ROLLOUT_NO_OF_GROUPS_ID);
>>>>>>>
final TextField noOfGroupsField = getTextfield("prompt.number.of.groups");
noOfGroupsField.setId(SPUIComponentIdProvider.ROLLOUT_NO_OF_GROUPS_ID);
<<<<<<<
dsSet.setId(SPUIComponetIdProvider.ROLLOUT_DS_ID);
dsSet.setSizeUndefined();
=======
dsSet.setId(SPUIComponentIdProvider.ROLLOUT_DS_ID);
dsSet.setSizeFull();
>>>>>>>
dsSet.setId(SPUIComponentIdProvider.ROLLOUT_DS_ID);
dsSet.setSizeUndefined();
<<<<<<<
final TextField rolloutNameField = getTextfield("textfield.name");
rolloutNameField.setId(SPUIComponetIdProvider.ROLLOUT_NAME_FIELD_ID);
rolloutNameField.setSizeUndefined();
=======
final TextField rolloutNameField = SPUIComponentProvider.getTextField("", ValoTheme.TEXTFIELD_TINY, true, null,
i18n.get("textfield.name"), true, SPUILabelDefinitions.TEXT_FIELD_MAX_LENGTH);
rolloutNameField.setId(SPUIComponentIdProvider.ROLLOUT_NAME_FIELD_ID);
rolloutNameField.setSizeFull();
>>>>>>>
final TextField rolloutNameField = getTextfield("textfield.name");
rolloutNameField.setId(SPUIComponentIdProvider.ROLLOUT_NAME_FIELD_ID);
rolloutNameField.setSizeUndefined(); |
<<<<<<<
final TextArea description = SPUIComponentProvider.getTextArea(i18n.get("textfield.description"),
"text-area-style", ValoTheme.TEXTFIELD_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
description.setId(SPUIComponetIdProvider.BULK_UPLOAD_DESC);
=======
final TextArea description = SPUIComponentProvider.getTextArea("text-area-style", ValoTheme.TEXTFIELD_TINY,
false, null, i18n.get("textfield.description"), SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
description.setId(SPUIComponentIdProvider.BULK_UPLOAD_DESC);
>>>>>>>
final TextArea description = SPUIComponentProvider.getTextArea(i18n.get("textfield.description"),
"text-area-style", ValoTheme.TEXTFIELD_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
description.setId(SPUIComponentIdProvider.BULK_UPLOAD_DESC); |
<<<<<<<
final MessageProperties messageProperties = createMessageProperties(MessageType.AUTHENTIFICATION);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123", FileResource.createFileResourceBySha1("12345"));
=======
final MessageProperties messageProperties = createMessageProperties(null);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123", FileResource.sha1("12345"));
>>>>>>>
final MessageProperties messageProperties = createMessageProperties(null);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123",
FileResource.createFileResourceBySha1("12345"));
<<<<<<<
final MessageProperties messageProperties = createMessageProperties(MessageType.AUTHENTIFICATION);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123", FileResource.createFileResourceBySha1("12345"));
=======
final MessageProperties messageProperties = createMessageProperties(null);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123", FileResource.sha1("12345"));
>>>>>>>
final MessageProperties messageProperties = createMessageProperties(null);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123",
FileResource.createFileResourceBySha1("12345"));
<<<<<<<
final MessageProperties messageProperties = createMessageProperties(MessageType.AUTHENTIFICATION);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123", FileResource.createFileResourceBySha1("12345"));
=======
final MessageProperties messageProperties = createMessageProperties(null);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123", FileResource.sha1("12345"));
>>>>>>>
final MessageProperties messageProperties = createMessageProperties(null);
final TenantSecurityToken securityToken = new TenantSecurityToken(TENANT, "123",
FileResource.createFileResourceBySha1("12345")); |
<<<<<<<
window.getButtonsLayout().removeStyleName("actionButtonsMargin");
window.setCloseListener(() -> !isDuplicate());
return window;
=======
>>>>>>>
window.setCloseListener(() -> !isDuplicate());
return window; |
<<<<<<<
import org.eclipse.hawkbit.ui.common.CommonDialogWindow.SaveDialogCloseListener;
=======
import org.eclipse.hawkbit.ui.common.builder.TextAreaBuilder;
import org.eclipse.hawkbit.ui.common.builder.TextFieldBuilder;
import org.eclipse.hawkbit.ui.common.builder.WindowBuilder;
>>>>>>>
import org.eclipse.hawkbit.ui.common.CommonDialogWindow.SaveDialogCloseListener;
import org.eclipse.hawkbit.ui.common.builder.TextAreaBuilder;
import org.eclipse.hawkbit.ui.common.builder.TextFieldBuilder;
import org.eclipse.hawkbit.ui.common.builder.WindowBuilder;
<<<<<<<
window = SPUIWindowDecorator.getWindow(i18n.get("caption.add.new.target"), null,
SPUIDefinitions.CREATE_UPDATE_WINDOW, this, null, null, formLayout, i18n);
window.setSaveDialogCloseListener(new SaveDialogCloseListener() {
@Override
public void saveOrUpdate() {
if (editTarget) {
updateTarget();
} else {
addNewTarget();
}
}
@Override
public boolean canWindowClose() {
return editTarget || !isDuplicate();
}
});
=======
window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(i18n.get("caption.add.new.target"))
.content(this).saveButtonClickListener(event -> saveTargetListner()).layout(formLayout).i18n(i18n)
.buildCommonDialogWindow();
>>>>>>>
window = new WindowBuilder(SPUIDefinitions.CREATE_UPDATE_WINDOW).caption(i18n.get("caption.add.new.target"))
.content(this).layout(formLayout).i18n(i18n).buildCommonDialogWindow();
window.setSaveDialogCloseListener(new SaveDialogCloseListener() {
@Override
public void saveOrUpdate() {
if (editTarget) {
updateTarget();
} else {
UI.getCurrent().access(() -> addNewTarget());
}
}
@Override
public boolean canWindowClose() {
return editTarget || !isDuplicate();
}
}); |
<<<<<<<
private static final String UNASSIGN_SOFT_MODULE = "unassignSoftModule";
=======
>>>>>>> |
<<<<<<<
final String ifMatch = getRequest().getHeader("If-Match");
if (ifMatch != null && !RestResourceConversionHelper.matchesHttpHeader(ifMatch, artifact.getSha1Hash())) {
result = new ResponseEntity<>(HttpStatus.PRECONDITION_FAILED);
=======
final String ifMatch = request.getHeader("If-Match");
if (ifMatch != null && !RestResourceConversionHelper.matchesHttpHeader(ifMatch, artifact.getSha1Hash())) {
result = new ResponseEntity<>(HttpStatus.PRECONDITION_FAILED);
} else {
final DbArtifact file = artifactManagement.loadLocalArtifactBinary(artifact);
// we set a download status only if we are aware of the
// targetid, i.e. authenticated and not anonymous
if (targetid != null && !"anonymous".equals(targetid)) {
final Action action = checkAndReportDownloadByTarget(request, targetid, artifact);
result = RestResourceConversionHelper.writeFileResponse(artifact, response, request, file,
cacheWriteNotify, action.getId());
>>>>>>>
final String ifMatch = getRequest().getHeader("If-Match");
if (ifMatch != null && !RestResourceConversionHelper.matchesHttpHeader(ifMatch, artifact.getSha1Hash())) {
result = new ResponseEntity<>(HttpStatus.PRECONDITION_FAILED);
} else {
final DbArtifact file = artifactManagement.loadLocalArtifactBinary(artifact);
// we set a download status only if we are aware of the
// targetid, i.e. authenticated and not anonymous
if (targetid != null && !"anonymous".equals(targetid)) {
final Action action = checkAndReportDownloadByTarget(getRequest(), targetid, artifact);
result = RestResourceConversionHelper.writeFileResponse(artifact, getResponse(), getRequest(), file,
cacheWriteNotify, action.getId());
<<<<<<<
final DbArtifact file = artifactManagement.loadLocalArtifactBinary(artifact);
// we set a download status only if we are aware of the
// targetid, i.e. authenticated and not anonymous
if (targetid != null && !"anonymous".equals(targetid)) {
final Action action = checkAndReportDownloadByTarget(getRequest(), targetid, artifact);
result = RestResourceConversionHelper.writeFileResponse(artifact, getResponse(), getRequest(), file,
cacheWriteNotify, action.getId());
} else {
result = RestResourceConversionHelper.writeFileResponse(artifact, getResponse(), getRequest(),
file);
}
=======
result = RestResourceConversionHelper.writeFileResponse(artifact, response, request, file);
>>>>>>>
result = RestResourceConversionHelper.writeFileResponse(artifact, getResponse(), getRequest(), file); |
<<<<<<<
import org.eclipse.hawkbit.repository.RepositoryProperties;
=======
import org.eclipse.hawkbit.repository.ArtifactManagement;
import org.eclipse.hawkbit.repository.ControllerManagement;
import org.eclipse.hawkbit.repository.DeploymentManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.EntityFactory;
import org.eclipse.hawkbit.repository.ReportManagement;
import org.eclipse.hawkbit.repository.RolloutGroupManagement;
import org.eclipse.hawkbit.repository.RolloutManagement;
import org.eclipse.hawkbit.repository.SoftwareManagement;
>>>>>>>
import org.eclipse.hawkbit.repository.ArtifactManagement;
import org.eclipse.hawkbit.repository.ControllerManagement;
import org.eclipse.hawkbit.repository.DeploymentManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.EntityFactory;
import org.eclipse.hawkbit.repository.ReportManagement;
import org.eclipse.hawkbit.repository.RepositoryProperties;
import org.eclipse.hawkbit.repository.RolloutGroupManagement;
import org.eclipse.hawkbit.repository.RolloutManagement;
import org.eclipse.hawkbit.repository.SoftwareManagement;
<<<<<<<
@EnableConfigurationProperties(RepositoryProperties.class)
=======
@EnableScheduling
>>>>>>>
@EnableConfigurationProperties(RepositoryProperties.class)
@EnableScheduling |
<<<<<<<
amqpMessageHandlerService.onMessage(message, MessageType.THING_CREATED.name(), TENANT, "vHost");
fail();
=======
try {
amqpMessageHandlerService.onMessage(message, MessageType.THING_CREATED.name(), TENANT);
fail("IllegalArgumentException was excepeted due to worng content type");
} catch (final IllegalArgumentException e) {
}
>>>>>>>
try {
amqpMessageHandlerService.onMessage(message, MessageType.THING_CREATED.name(), TENANT, "vHost");
fail("IllegalArgumentException was excepeted due to worng content type");
} catch (final IllegalArgumentException e) {
}
<<<<<<<
amqpMessageHandlerService.onMessage(message, MessageType.EVENT.name(), TENANT, "vHost");
fail();
=======
amqpMessageHandlerService.onMessage(message, MessageType.EVENT.name(), TENANT);
fail("IllegalArgumentException was excepeted due to unknown message type");
>>>>>>>
amqpMessageHandlerService.onMessage(message, MessageType.EVENT.name(), TENANT, "vHost");
fail("IllegalArgumentException was excepeted due to unknown message type");
<<<<<<<
amqpMessageHandlerService.onMessage(message, MessageType.EVENT.name(), TENANT, "vHost");
fail();
=======
amqpMessageHandlerService.onMessage(message, MessageType.EVENT.name(), TENANT);
fail("IllegalArgumentException was excepeted due to unknown topic");
>>>>>>>
amqpMessageHandlerService.onMessage(message, MessageType.EVENT.name(), TENANT, "vHost");
fail("IllegalArgumentException was excepeted due to unknown topic"); |
<<<<<<<
/**
* Metadata save id.
*/
public static final String METADTA_SAVE_ICON_ID = "metadata.save.icon.id";
/**
* Metadata discard id.
*/
public static final String METADTA_DISCARD_ICON_ID = "metadata.discard.icon.id";
=======
>>>>>>>
/**
* Metadata save id.
*/
public static final String METADTA_SAVE_ICON_ID = "metadata.save.icon.id";
/**
* Metadata discard id.
*/
public static final String METADTA_DISCARD_ICON_ID = "metadata.discard.icon.id";
<<<<<<<
/**
* Table multiselect for selecting DistType
*/
public static final String SELECT_DIST_TYPE = "select-dist-type";
/**
* ID for download anonymous checkbox
*/
public static final String DOWNLOAD_ANONYMOUS_CHECKBOX = "downloadanonymouscheckbox";
=======
>>>>>>>
/**
* Table multiselect for selecting DistType
*/
public static final String SELECT_DIST_TYPE = "select-dist-type";
/**
* ID for download anonymous checkbox
*/
public static final String DOWNLOAD_ANONYMOUS_CHECKBOX = "downloadanonymouscheckbox"; |
<<<<<<<
window.getButtonsLayout().removeStyleName("actionButtonsMargin");
window.setCloseListener(() -> !isDuplicate());
=======
>>>>>>>
window.setCloseListener(() -> !isDuplicate()); |
<<<<<<<
setTitle(R.string.bottom_action_home);
updateTabStyle(R.color.tab_home, R.color.tab_home_secondary);
=======
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_home));
>>>>>>>
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_home));
updateTabStyle(R.color.tab_home, R.color.tab_home_secondary);
<<<<<<<
setTitle(R.string.bottom_action_favourites);
updateTabStyle(R.color.tab_favourites, R.color.tab_favourites_secondary);
=======
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_favorites));
>>>>>>>
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_favorites));
updateTabStyle(R.color.tab_favourites, R.color.tab_favourites_secondary);
<<<<<<<
setTitle(R.string.bottom_action_people);
updateTabStyle(R.color.tab_people, R.color.tab_people_secondary);
=======
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_people));
>>>>>>>
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_people));
updateTabStyle(R.color.tab_people, R.color.tab_people_secondary);
<<<<<<<
setTitle(R.string.bottom_action_rooms);
updateTabStyle(R.color.tab_rooms, R.color.tab_rooms_secondary);
=======
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_rooms));
>>>>>>>
mSearchView.setQueryHint(getString(R.string.home_filter_placeholder_rooms));
updateTabStyle(R.color.tab_rooms, R.color.tab_rooms_secondary);
<<<<<<<
String currentFilter = mFilterInput.getText().toString() + "-" + mCurrentMenuId;
=======
String queryText = mSearchView.getQuery().toString();
String currentFilter = queryText + "-" + mCurrentMenuId;;
>>>>>>>
String queryText = mSearchView.getQuery().toString();
String currentFilter = queryText + "-" + mCurrentMenuId;; |
<<<<<<<
=======
import com.google.gson.JsonPrimitive;
import com.google.gson.internal.Excluder;
>>>>>>>
import com.google.gson.JsonPrimitive;
import com.google.gson.internal.Excluder;
<<<<<<<
// preference to start the App info screen, to facilitate App permissions access
Preference applicationInfoLInkPref = (Preference) findPreference(APP_INFO_LINK_PREFERENCE_KEY);
applicationInfoLInkPref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.fromParts("package", getActivity().getPackageName(), null);
intent.setData(uri);
if(null != getActivity()) {
getActivity().getApplicationContext().startActivity(intent);
}
return true;
}
});
=======
// background sync management
mBackgroundSyncCategory = (PreferenceCategory)getPreferenceManager().findPreference(getResources().getString(R.string.settings_background_sync));
mSyncRequestTimeoutPreference = (EditTextPreference)getPreferenceManager().findPreference(getResources().getString(R.string.settings_set_sync_timeout));
mSyncRequestDelayPreference = (EditTextPreference)getPreferenceManager().findPreference(getResources().getString(R.string.settings_set_sync_delay));
>>>>>>>
// preference to start the App info screen, to facilitate App permissions access
Preference applicationInfoLInkPref = (Preference) findPreference(APP_INFO_LINK_PREFERENCE_KEY);
applicationInfoLInkPref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.fromParts("package", getActivity().getPackageName(), null);
intent.setData(uri);
if(null != getActivity()) {
getActivity().getApplicationContext().startActivity(intent);
}
return true;
}
});
// background sync management
mBackgroundSyncCategory = (PreferenceCategory)getPreferenceManager().findPreference(getResources().getString(R.string.settings_background_sync));
mSyncRequestTimeoutPreference = (EditTextPreference)getPreferenceManager().findPreference(getResources().getString(R.string.settings_set_sync_timeout));
mSyncRequestDelayPreference = (EditTextPreference)getPreferenceManager().findPreference(getResources().getString(R.string.settings_set_sync_delay)); |
<<<<<<<
import android.database.Cursor;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
=======
>>>>>>>
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
<<<<<<<
import android.os.Environment;
import android.provider.MediaStore;
=======
import android.preference.PreferenceManager;
import android.text.TextUtils;
>>>>>>>
import android.text.TextUtils;
<<<<<<<
import org.matrix.androidsdk.call.MXCallsManager;
=======
>>>>>>>
<<<<<<<
// sounds management
private static MediaPlayer mRingingPlayer = null;
private static MediaPlayer mRingbackPlayer = null;
private static MediaPlayer mCallEndPlayer = null;
private static Ringtone mRingTone = null;
private static Ringtone mRingbackTone = null;
private static Ringtone mCallEndTone = null;
private static final int DEFAULT_PERCENT_VOLUME = 10;
private static final int FIRST_PERCENT_VOLUME = 10;
private static boolean firstCallAlert = true;
private static int mCallVolume = 0;
// sensor
SensorManager mSensorMgr;
Sensor mProximitySensor;
// activity life cycle management
private boolean mSavedSpeakerValue;
private boolean mIsSpeakerForcedFromLifeCycle;
=======
>>>>>>>
// sensor
SensorManager mSensorMgr;
Sensor mProximitySensor;
// activity life cycle management
private boolean mSavedSpeakerValue;
private boolean mIsSpeakerForcedFromLifeCycle;
<<<<<<<
initMediaPlayerVolume();
// life cycle management
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if((null != savedInstanceState) && (null != audioManager)) {
// restore mic satus
audioManager.setMicrophoneMute(savedInstanceState.getBoolean(KEY_MIC_MUTE_STATUS, false));
// restore speaker status (Cf. manageSubViews())
mIsSpeakerForcedFromLifeCycle = true;
mSavedSpeakerValue = savedInstanceState.getBoolean(KEY_SPEAKER_STATUS, mCall.isVideo());
} else {
// mic default value: enabled
audioManager.setMicrophoneMute(false);
}
// init call UI setting buttons
=======
// init the call button
restoreUserUiAudioSettings();
>>>>>>>
// life cycle management
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if((null != savedInstanceState) && (null != audioManager)) {
// restore mic satus
audioManager.setMicrophoneMute(savedInstanceState.getBoolean(KEY_MIC_MUTE_STATUS, false));
// restore speaker status (Cf. manageSubViews())
mIsSpeakerForcedFromLifeCycle = true;
mSavedSpeakerValue = savedInstanceState.getBoolean(KEY_SPEAKER_STATUS, mCall.isVideo());
} else {
// mic default value: enabled
audioManager.setMicrophoneMute(false);
}
// init call UI setting buttons
<<<<<<<
mCall.toggleSpeaker();
=======
VectorCallSoundManager.toggleSpeaker();
// save user choice in shared preference
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if (null != audioManager) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = preferences.edit();
String keyPref = mCall.isVideo()?KEY_SPEAKER_VIDEO_CALL_STATUS:KEY_SPEAKER_AUDIO_CALL_STATUS;
editor.putBoolean(keyPref, audioManager.isSpeakerphoneOn());
editor.apply();
} else {
Log.w(LOG_TAG, "## toggleSpeaker(): Failed due to invalid AudioManager");
}
>>>>>>>
VectorCallSoundManager.toggleSpeaker();
<<<<<<<
// set speaker status
boolean isSpeakerPhoneOn;
if(mIsSpeakerForcedFromLifeCycle) {
isSpeakerPhoneOn = mSavedSpeakerValue;
} else {
// default value: video => speaker ON, voice => speaker OFF
isSpeakerPhoneOn = mCall.isVideo();
}
=======
// read speaker value from preferences
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
boolean isSpeakerPhoneOn = mCall.isVideo();
>>>>>>>
// set speaker status
boolean isSpeakerPhoneOn;
if(mIsSpeakerForcedFromLifeCycle) {
isSpeakerPhoneOn = mSavedSpeakerValue;
} else {
// default value: video => speaker ON, voice => speaker OFF
isSpeakerPhoneOn = mCall.isVideo();
} |
<<<<<<<
R.string.option_send_voice,
=======
R.string.option_send_sticker,
>>>>>>>
R.string.option_send_voice,
R.string.option_send_sticker,
<<<<<<<
R.drawable.vector_micro_green,
=======
R.drawable.ic_send_sticker,
>>>>>>>
R.drawable.vector_micro_green,
R.drawable.ic_send_sticker,
<<<<<<<
} else if (selectedVal == R.string.option_send_voice ) {
VectorRoomActivity.this.launchAudioRecorderIntent();
=======
} else if (selectedVal == R.string.option_send_sticker) {
startStickerPickerActivity();
>>>>>>>
} else if (selectedVal == R.string.option_send_voice ) {
VectorRoomActivity.this.launchAudioRecorderIntent();
} else if (selectedVal == R.string.option_send_sticker) {
startStickerPickerActivity(); |
<<<<<<<
=======
import org.matrix.androidsdk.util.Log;
>>>>>>>
<<<<<<<
import org.matrix.androidsdk.util.Log;
=======
import im.vector.VectorApp;
import im.vector.Matrix;
import im.vector.MyPresenceManager;
import im.vector.R;
import im.vector.adapters.VectorRoomsSelectionAdapter;
import im.vector.contacts.ContactsManager;
import im.vector.contacts.PIDsRetriever;
import im.vector.fragments.AccountsSelectionDialogFragment;
import im.vector.ga.GAHelper;
import im.vector.gcm.GcmRegistrationManager;
import im.vector.services.EventStreamService;
>>>>>>>
import org.matrix.androidsdk.util.Log;
<<<<<<<
if(!permissionListAlreadyDenied.isEmpty()) {
if (null != resource) {
=======
if (!permissionListAlreadyDenied.isEmpty()) {
if (null != resource) {
explanationMessage = resource.getString(R.string.permissions_rationale_msg_title);
>>>>>>>
// if some permissions were already denied: display a dialog to the user before asking again..
if(!permissionListAlreadyDenied.isEmpty()) {
if (null != resource) {
<<<<<<<
if (aPermissionsToBeGrantedBitMap == REQUEST_CODE_PERMISSION_VIDEO_IP_CALL || aPermissionsToBeGrantedBitMap == REQUEST_CODE_PERMISSION_AUDIO_IP_CALL){
// Permission request for VOIP call
if (permissionListAlreadyDenied.contains(Manifest.permission.CAMERA)
&& permissionListAlreadyDenied.contains(Manifest.permission.RECORD_AUDIO)) {
// Both missing
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera_and_audio);
} else if (permissionListAlreadyDenied.contains(Manifest.permission.RECORD_AUDIO)) {
// Audio missing
explanationMessage += resource.getString(R.string.permissions_rationale_msg_record_audio);
explanationMessage += resource.getString(R.string.permissions_rationale_msg_record_audio_explanation);
} else if (permissionListAlreadyDenied.contains(Manifest.permission.CAMERA)) {
// Camera missing
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera);
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera_explanation);
}
} else {
for (String permissionAlreadyDenied : permissionListAlreadyDenied) {
if (Manifest.permission.CAMERA.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera);
} else if (Manifest.permission.RECORD_AUDIO.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_record_audio);
} else if (Manifest.permission.WRITE_EXTERNAL_STORAGE.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_storage);
} else if (Manifest.permission.READ_CONTACTS.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_contacts);
} else {
Log.d(LOG_TAG, "## checkPermissions(): already denied permission not supported");
}
=======
for (String permissionAlreadyDenied : permissionListAlreadyDenied) {
if (Manifest.permission.CAMERA.equals(permissionAlreadyDenied)) {
explanationMessage += "\n\n" + resource.getString(R.string.permissions_rationale_msg_camera, Matrix.getApplicationName());
} else if (Manifest.permission.RECORD_AUDIO.equals(permissionAlreadyDenied)) {
explanationMessage += "\n\n" + resource.getString(R.string.permissions_rationale_msg_record_audio, Matrix.getApplicationName());
} else if (Manifest.permission.WRITE_EXTERNAL_STORAGE.equals(permissionAlreadyDenied)) {
explanationMessage += "\n\n" + resource.getString(R.string.permissions_rationale_msg_storage, Matrix.getApplicationName());
} else if (Manifest.permission.READ_CONTACTS.equals(permissionAlreadyDenied)) {
explanationMessage += "\n\n" + resource.getString(R.string.permissions_rationale_msg_contacts);
} else {
Log.d(LOG_TAG, "## checkPermissions(): already denied permission not supported");
>>>>>>>
if (aPermissionsToBeGrantedBitMap == REQUEST_CODE_PERMISSION_VIDEO_IP_CALL || aPermissionsToBeGrantedBitMap == REQUEST_CODE_PERMISSION_AUDIO_IP_CALL){
// Permission request for VOIP call
if (permissionListAlreadyDenied.contains(Manifest.permission.CAMERA)
&& permissionListAlreadyDenied.contains(Manifest.permission.RECORD_AUDIO)) {
// Both missing
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera_and_audio);
} else if (permissionListAlreadyDenied.contains(Manifest.permission.RECORD_AUDIO)) {
// Audio missing
explanationMessage += resource.getString(R.string.permissions_rationale_msg_record_audio);
explanationMessage += resource.getString(R.string.permissions_rationale_msg_record_audio_explanation);
} else if (permissionListAlreadyDenied.contains(Manifest.permission.CAMERA)) {
// Camera missing
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera);
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera_explanation);
}
} else {
for (String permissionAlreadyDenied : permissionListAlreadyDenied) {
if (Manifest.permission.CAMERA.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_camera);
} else if (Manifest.permission.RECORD_AUDIO.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_record_audio);
} else if (Manifest.permission.WRITE_EXTERNAL_STORAGE.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_storage);
} else if (Manifest.permission.READ_CONTACTS.equals(permissionAlreadyDenied)) {
if (!TextUtils.isEmpty(explanationMessage)) {
explanationMessage += "\n\n";
}
explanationMessage += resource.getString(R.string.permissions_rationale_msg_contacts);
} else {
Log.d(LOG_TAG, "## checkPermissions(): already denied permission not supported");
}
<<<<<<<
if(null != resource) {
permissionsInfoDialog.setTitle(resource.getString(R.string.permissions_rationale_popup_title));
=======
if (null != resource) {
permissionsInfoDialog.setTitle(resource.getString(R.string.permissions_rationale_popup_title, Matrix.getApplicationName()));
>>>>>>>
if(null != resource) {
permissionsInfoDialog.setTitle(resource.getString(R.string.permissions_rationale_popup_title)); |
<<<<<<<
=======
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
>>>>>>>
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
<<<<<<<
Matrix.getInstance(this).removeNetworkEventListener(mNetworkEventListener);
=======
// remove listener on keyboard display
enableKeyboardShownListener(false);
>>>>>>>
Matrix.getInstance(this).removeNetworkEventListener(mNetworkEventListener);
// remove listener on keyboard display
enableKeyboardShownListener(false);
<<<<<<<
public void insertInTextEditor(String text) {
if (null != text) {
if (TextUtils.isEmpty(mEditText.getText())) {
mEditText.append(text + ": ");
} else {
mEditText.getText().insert(mEditText.getSelectionStart(), text);
}
}
}
//================================================================================
// Notifications management
//================================================================================
private void refreshNotificationsArea() {
boolean isAreaVisible = false;
boolean isTypingIconDisplayed = false;
boolean isErrorIconDisplayed = false;
SpannableString notificationsText = null;
SpannableString errorText = null;
// no network
if (!Matrix.getInstance(this).isConnected()) {
isAreaVisible = true;
isErrorIconDisplayed = true;
errorText = new SpannableString(getResources().getString(R.string.room_offline_notification));
mErrorMessageTextView.setOnClickListener(null);
} else {
Collection<Event> undeliveredEvents = mSession.getDataHandler().getStore().getUndeliverableEvents(mRoom.getRoomId());
if ((null != undeliveredEvents) && (undeliveredEvents.size() > 0)) {
isAreaVisible = true;
isErrorIconDisplayed = true;
String part1 = getResources().getString(R.string.room_unsent_messages_notification);
String part2 = getResources().getString(R.string.room_prompt_resent);
errorText = new SpannableString(part1 + part2);
errorText.setSpan(new UnderlineSpan(), part1.length(), part1.length() + part2.length(), 0);
mErrorMessageTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mRoom.resendEvents(mSession.getDataHandler().getStore().getUndeliverableEvents(mRoom.getRoomId()));
}
});
} else if (!TextUtils.isEmpty(mLatestTypingMessage)) {
isAreaVisible = true;
isTypingIconDisplayed = true;
notificationsText = new SpannableString(mLatestTypingMessage);
}
}
mNotificationsArea.setVisibility(isAreaVisible? View.VISIBLE : View.INVISIBLE);
// typing
mTypingIcon.setVisibility(isTypingIconDisplayed? View.VISIBLE : View.INVISIBLE);
mNotificationsMessageTextView.setText(notificationsText);
// error
mErrorIcon.setVisibility(isErrorIconDisplayed? View.VISIBLE : View.INVISIBLE);
mErrorMessageTextView.setText(errorText);
}
=======
private void updateRoomHeaderAvatar() {
VectorUtils.loadRoomAvatar(this, mSession, mActionBarHeaderRoomAvatar, mRoom);
}
>>>>>>>
private void updateRoomHeaderAvatar() {
VectorUtils.loadRoomAvatar(this, mSession, mActionBarHeaderRoomAvatar, mRoom);
}
public void insertInTextEditor(String text) {
if (null != text) {
if (TextUtils.isEmpty(mEditText.getText())) {
mEditText.append(text + ": ");
} else {
mEditText.getText().insert(mEditText.getSelectionStart(), text);
}
}
}
//================================================================================
// Notifications management
//================================================================================
private void refreshNotificationsArea() {
boolean isAreaVisible = false;
boolean isTypingIconDisplayed = false;
boolean isErrorIconDisplayed = false;
SpannableString notificationsText = null;
SpannableString errorText = null;
// no network
if (!Matrix.getInstance(this).isConnected()) {
isAreaVisible = true;
isErrorIconDisplayed = true;
errorText = new SpannableString(getResources().getString(R.string.room_offline_notification));
mErrorMessageTextView.setOnClickListener(null);
} else {
Collection<Event> undeliveredEvents = mSession.getDataHandler().getStore().getUndeliverableEvents(mRoom.getRoomId());
if ((null != undeliveredEvents) && (undeliveredEvents.size() > 0)) {
isAreaVisible = true;
isErrorIconDisplayed = true;
String part1 = getResources().getString(R.string.room_unsent_messages_notification);
String part2 = getResources().getString(R.string.room_prompt_resent);
errorText = new SpannableString(part1 + part2);
errorText.setSpan(new UnderlineSpan(), part1.length(), part1.length() + part2.length(), 0);
mErrorMessageTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mRoom.resendEvents(mSession.getDataHandler().getStore().getUndeliverableEvents(mRoom.getRoomId()));
}
});
} else if (!TextUtils.isEmpty(mLatestTypingMessage)) {
isAreaVisible = true;
isTypingIconDisplayed = true;
notificationsText = new SpannableString(mLatestTypingMessage);
}
}
mNotificationsArea.setVisibility(isAreaVisible? View.VISIBLE : View.INVISIBLE);
// typing
mTypingIcon.setVisibility(isTypingIconDisplayed? View.VISIBLE : View.INVISIBLE);
mNotificationsMessageTextView.setText(notificationsText);
// error
mErrorIcon.setVisibility(isErrorIconDisplayed? View.VISIBLE : View.INVISIBLE);
mErrorMessageTextView.setText(errorText);
} |
<<<<<<<
tabItem.setData(CSSSWTConstants.CSS_CLASS_NAME_KEY, ConnectionSpecifiedSelectedTabFillHandler.COLORED_BY_CONNECTION_TYPE);
if (queryIndex > 0 || resultSetNumber > 0) {
tabItem.setShowClose(true);
}
=======
tabItem.setShowClose(true);
>>>>>>>
tabItem.setShowClose(true);
tabItem.setData(CSSSWTConstants.CSS_CLASS_NAME_KEY, ConnectionSpecifiedSelectedTabFillHandler.COLORED_BY_CONNECTION_TYPE); |
<<<<<<<
boolean supportsBackslashStringEscape();
=======
boolean supportSerialTypes();
>>>>>>>
boolean supportSerialTypes();
boolean supportsBackslashStringEscape(); |
<<<<<<<
XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_OHREF, toURI(pathFromMap + attValue.toString().substring(sharpIndex)).toString());
final String topicID = getTopicID(attValue.getFragment());
final int index = attValue.toString().indexOf(SLASH, sharpIndex);
final String elementId = index != -1 ? attValue.toString().substring(index) : "";
final URI pathWithTopicID = setFragment(pathFromMap, topicID);
if (util.findId(pathWithTopicID)) {// topicId found
retAttValue = toURI(SHARP + util.getIdValue(pathWithTopicID) + elementId);
=======
XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_OHREF,
URLUtils.clean(pathFromMap + attValue.substring(sharpIndex), false));
final URI topicId = toURI(pathFromMap + getElementID(SHARP + getFragment(attValue)));
URI absolutePath = dirPath.toURI().resolve(topicId);
final int index = attValue.indexOf(SLASH, sharpIndex);
final String elementId = index != -1 ? attValue.substring(index) : "";
if (util.findId(absolutePath)) {// topicId found
retAttValue = SHARP + util.getIdValue(absolutePath) + elementId;
>>>>>>>
XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_OHREF, toURI(pathFromMap + attValue.toString().substring(sharpIndex)).toString());
final String topicID = getTopicID(attValue.getFragment());
final int index = attValue.toString().indexOf(SLASH, sharpIndex);
final String elementId = index != -1 ? attValue.toString().substring(index) : "";
final URI pathWithTopicID = setFragment(dirPath.toURI().resolve(pathFromMap), topicID);
if (util.findId(pathWithTopicID)) {// topicId found
retAttValue = toURI(SHARP + util.getIdValue(pathWithTopicID) + elementId);
<<<<<<<
retAttValue = toURI(SHARP + util.addId(pathWithTopicID) + elementId);
=======
retAttValue = SHARP + util.addId(absolutePath) + elementId;
>>>>>>>
retAttValue = toURI(SHARP + util.addId(pathWithTopicID) + elementId);
<<<<<<<
pathFromMap = toURI(filePath).resolve(attValue.toString());
=======
pathFromMap = toURI(resolveTopic(new File(filePath).getParent(), attValue));
URI absolutePath = dirPath.toURI().resolve(pathFromMap);
>>>>>>>
pathFromMap = toURI(filePath).resolve(attValue.toString());
URI absolutePath = dirPath.toURI().resolve(pathFromMap);
<<<<<<<
if (util.findId(pathFromMap)) {
retAttValue = toURI(SHARP + util.getIdValue(pathFromMap));
=======
if (util.findId(absolutePath)) {
retAttValue = SHARP + util.getIdValue(absolutePath);
>>>>>>>
if (util.findId(absolutePath)) {
retAttValue = toURI(SHARP + util.getIdValue(pathFromMap)); |
<<<<<<<
protected List<String> inputs = new ArrayList<>();
protected Map<String, String> params = new HashMap<>();
=======
protected List<Value> inputs = new ArrayList<>();
protected Map<String, String> params = new HashMap<String, String>();
>>>>>>>
protected List<Value> inputs = new ArrayList<>();
protected Map<String, String> params = new HashMap<>(); |
<<<<<<<
=======
import org.apache.commons.io.FileUtils;
import org.dita.dost.exception.DITAOTException;
>>>>>>>
import org.dita.dost.exception.DITAOTException;
<<<<<<<
import java.net.URI;
import java.nio.file.Files;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
=======
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
>>>>>>>
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
<<<<<<<
tmpDir = temporaryFolder.newFolder();
=======
tmpDir = Files.createTempDirectory(StreamStoreTest.class.getName()).toFile();
>>>>>>>
tmpDir = temporaryFolder.newFolder(); |
<<<<<<<
/* The maximum amount of time that we will wait before checking
* that a failed node is still up or not.
* Default: 5 minutes */
private long maxFailoverCheckPeriod = 300000;
public long getMaxFailoverCheckPeriod() {
return maxFailoverCheckPeriod;
}
public void setMaxFailoverCheckPeriod(long maxFailoverCheckPeriod) {
this.maxFailoverCheckPeriod = maxFailoverCheckPeriod;
}
=======
private boolean enlistInDistributedTransactions = false;
>>>>>>>
/* The maximum amount of time that we will wait before checking
* that a failed node is still up or not.
* Default: 5 minutes */
private long maxFailoverCheckPeriod = 300000;
public long getMaxFailoverCheckPeriod() {
return maxFailoverCheckPeriod;
}
public void setMaxFailoverCheckPeriod(long maxFailoverCheckPeriod) {
this.maxFailoverCheckPeriod = maxFailoverCheckPeriod;
}
private boolean enlistInDistributedTransactions = false;
<<<<<<<
public EnumSet<FailoverBehavior> getFailoverBehaviorWithoutFlags() {
EnumSet<FailoverBehavior> result = this.failoverBehavior.clone();
result.remove(FailoverBehavior.READ_FROM_ALL_SERVERS);
return result;
}
=======
public boolean isUseParallelMultiGet() {
// TODO Auto-generated method stub
return false;
}
public boolean isDisableProfiling() {
// TODO Auto-generated method stub
return false;
}
public void handleForbiddenResponse(HttpResponse forbiddenResponse) {
handleForbiddenResponse.apply(forbiddenResponse);
}
public Action1<HttpRequest> handleUnauthorizedResponse(HttpResponse unauthorizedResponse) {
return handleUnauthorizedResponse.apply(unauthorizedResponse);
}
public boolean isEnlistInDistributedTransactions() {
return enlistInDistributedTransactions;
}
public void setEnlistInDistributedTransactions(boolean enlistInDistributedTransactions) {
this.enlistInDistributedTransactions = enlistInDistributedTransactions;
}
>>>>>>>
public EnumSet<FailoverBehavior> getFailoverBehaviorWithoutFlags() {
EnumSet<FailoverBehavior> result = this.failoverBehavior.clone();
result.remove(FailoverBehavior.READ_FROM_ALL_SERVERS);
return result;
}
public boolean isUseParallelMultiGet() {
// TODO Auto-generated method stub
return false;
}
public boolean isDisableProfiling() {
// TODO Auto-generated method stub
return false;
}
public void handleForbiddenResponse(HttpResponse forbiddenResponse) {
handleForbiddenResponse.apply(forbiddenResponse);
}
public Action1<HttpRequest> handleUnauthorizedResponse(HttpResponse unauthorizedResponse) {
return handleUnauthorizedResponse.apply(unauthorizedResponse);
}
public boolean isEnlistInDistributedTransactions() {
return enlistInDistributedTransactions;
}
public void setEnlistInDistributedTransactions(boolean enlistInDistributedTransactions) {
this.enlistInDistributedTransactions = enlistInDistributedTransactions;
} |
<<<<<<<
@Test
public void testParquetCompressionTypeSupported() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "none");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.UNCOMPRESSED, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "gzip");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.GZIP, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "snappy");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.SNAPPY, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lz4");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZ4, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "zstd");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.ZSTD, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "brotli");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.BROTLI, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lzo");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZO, connectorConfig.parquetCompressionCodecName());
}
@Test(expected = ConfigException.class)
public void testUnsupportedParquetCompressionType() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "uncompressed");
connectorConfig = new S3SinkConnectorConfig(properties);
connectorConfig.parquetCompressionCodecName();
}
@Test(expected = ConfigException.class)
public void testInvalidBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "test_bucket");
connectorConfig = new S3SinkConnectorConfig(properties);
}
@Test(expected = ConfigException.class)
public void testEmptyBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "");
connectorConfig = new S3SinkConnectorConfig(properties);
}
@Test
public void testValidBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "test-bucket");
connectorConfig = new S3SinkConnectorConfig(properties);
}
=======
>>>>>>>
@Test
public void testParquetCompressionTypeSupported() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "none");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.UNCOMPRESSED, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "gzip");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.GZIP, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "snappy");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.SNAPPY, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lz4");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZ4, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "zstd");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.ZSTD, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "brotli");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.BROTLI, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lzo");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZO, connectorConfig.parquetCompressionCodecName());
}
@Test(expected = ConfigException.class)
public void testUnsupportedParquetCompressionType() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "uncompressed");
connectorConfig = new S3SinkConnectorConfig(properties);
connectorConfig.parquetCompressionCodecName();
} |
<<<<<<<
import java.util.function.Function;
import java.util.stream.Collectors;
=======
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.zip.Deflater;
>>>>>>>
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.zip.Deflater;
<<<<<<<
public CompressionCodecName parquetCompressionCodecName() {
return "none".equalsIgnoreCase(getString(PARQUET_CODEC_CONFIG))
? CompressionCodecName.fromConf(null)
: CompressionCodecName.fromConf(getString(PARQUET_CODEC_CONFIG));
}
=======
public int getCompressionLevel() {
return getInt(COMPRESSION_LEVEL_CONFIG);
}
>>>>>>>
public int getCompressionLevel() {
return getInt(COMPRESSION_LEVEL_CONFIG);
}
public CompressionCodecName parquetCompressionCodecName() {
return "none".equalsIgnoreCase(getString(PARQUET_CODEC_CONFIG))
? CompressionCodecName.fromConf(null)
: CompressionCodecName.fromConf(getString(PARQUET_CODEC_CONFIG));
}
<<<<<<<
private static class ParquetCodecRecommender extends ParentValueRecommender
implements ConfigDef.Validator {
public static final Map<String, CompressionCodecName> TYPES_BY_NAME;
public static final List<String> ALLOWED_VALUES;
static {
TYPES_BY_NAME = Arrays.stream(CompressionCodecName.values())
.filter(c -> !CompressionCodecName.UNCOMPRESSED.equals(c))
.collect(Collectors.toMap(c -> c.name().toLowerCase(), Function.identity()));
TYPES_BY_NAME.put("none", CompressionCodecName.UNCOMPRESSED);
ALLOWED_VALUES = new ArrayList<>(TYPES_BY_NAME.keySet());
// Not a hard requirement but this call usually puts 'none' first in the list of allowed
// values
Collections.reverse(ALLOWED_VALUES);
}
public ParquetCodecRecommender() {
super(FORMAT_CLASS_CONFIG, ParquetFormat.class, ALLOWED_VALUES.toArray());
}
@Override
public void ensureValid(String name, Object compressionCodecName) {
String compressionCodecNameString = ((String) compressionCodecName).trim();
if (!TYPES_BY_NAME.containsKey(compressionCodecNameString)) {
throw new ConfigException(name, compressionCodecName,
"Value must be one of: " + ALLOWED_VALUES);
}
}
@Override
public String toString() {
return "[" + Utils.join(ALLOWED_VALUES, ", ") + "]";
}
}
=======
private static class CompressionLevelValidator
implements ConfigDef.Validator, ConfigDef.Recommender {
private static final int MIN = -1;
private static final int MAX = 9;
private static final ConfigDef.Range validRange = ConfigDef.Range.between(MIN, MAX);
@Override
public void ensureValid(String name, Object compressionLevel) {
validRange.ensureValid(name, compressionLevel);
}
@Override
public String toString() {
return "-1 for system default, or " + validRange.toString() + " for levels between no "
+ "compression and best compression";
}
@Override
public List<Object> validValues(String s, Map<String, Object> map) {
return IntStream.range(MIN, MAX).boxed().collect(Collectors.toList());
}
@Override
public boolean visible(String s, Map<String, Object> map) {
return true;
}
}
>>>>>>>
private static class CompressionLevelValidator
implements ConfigDef.Validator, ConfigDef.Recommender {
private static final int MIN = -1;
private static final int MAX = 9;
private static final ConfigDef.Range validRange = ConfigDef.Range.between(MIN, MAX);
@Override
public void ensureValid(String name, Object compressionLevel) {
validRange.ensureValid(name, compressionLevel);
}
@Override
public String toString() {
return "-1 for system default, or " + validRange.toString() + " for levels between no "
+ "compression and best compression";
}
@Override
public List<Object> validValues(String s, Map<String, Object> map) {
return IntStream.range(MIN, MAX).boxed().collect(Collectors.toList());
}
@Override
public boolean visible(String s, Map<String, Object> map) {
return true;
}
}
private static class ParquetCodecRecommender extends ParentValueRecommender
implements ConfigDef.Validator {
public static final Map<String, CompressionCodecName> TYPES_BY_NAME;
public static final List<String> ALLOWED_VALUES;
static {
TYPES_BY_NAME = Arrays.stream(CompressionCodecName.values())
.filter(c -> !CompressionCodecName.UNCOMPRESSED.equals(c))
.collect(Collectors.toMap(c -> c.name().toLowerCase(), Function.identity()));
TYPES_BY_NAME.put("none", CompressionCodecName.UNCOMPRESSED);
ALLOWED_VALUES = new ArrayList<>(TYPES_BY_NAME.keySet());
// Not a hard requirement but this call usually puts 'none' first in the list of allowed
// values
Collections.reverse(ALLOWED_VALUES);
}
public ParquetCodecRecommender() {
super(FORMAT_CLASS_CONFIG, ParquetFormat.class, ALLOWED_VALUES.toArray());
}
@Override
public void ensureValid(String name, Object compressionCodecName) {
String compressionCodecNameString = ((String) compressionCodecName).trim();
if (!TYPES_BY_NAME.containsKey(compressionCodecNameString)) {
throw new ConfigException(name, compressionCodecName,
"Value must be one of: " + ALLOWED_VALUES);
}
}
@Override
public String toString() {
return "[" + Utils.join(ALLOWED_VALUES, ", ") + "]";
}
} |
<<<<<<<
@Test
public void testConfigurableS3ObjectTaggingConfigs() {
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(false, connectorConfig.get(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG));
properties.put(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG, "true");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(true, connectorConfig.get(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG));
properties.put(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG, "false");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(false, connectorConfig.get(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG));
}
=======
@Test
public void testConfigurableAwsAssumeRoleCredentialsProviderMissingConfigs() {
thrown.expect(ConfigException.class);
thrown.expectMessage("Missing required configuration");
properties.put(
S3SinkConnectorConfig.CREDENTIALS_PROVIDER_CLASS_CONFIG,
AwsAssumeRoleCredentialsProvider.class.getName()
);
String configPrefix = S3SinkConnectorConfig.CREDENTIALS_PROVIDER_CONFIG_PREFIX;
properties.put(
configPrefix.concat(AwsAssumeRoleCredentialsProvider.ROLE_ARN_CONFIG),
"arn:aws:iam::012345678901:role/my-restricted-role"
);
properties.put(
configPrefix.concat(AwsAssumeRoleCredentialsProvider.ROLE_SESSION_NAME_CONFIG),
"my-session-name"
);
properties.put(
configPrefix.concat(AwsAssumeRoleCredentialsProvider.ROLE_EXTERNAL_ID_CONFIG),
"my-external-id"
);
connectorConfig = new S3SinkConnectorConfig(properties);
AwsAssumeRoleCredentialsProvider credentialsProvider =
(AwsAssumeRoleCredentialsProvider) connectorConfig.getCredentialsProvider();
credentialsProvider.configure(properties);
}
>>>>>>>
@Test
public void testConfigurableAwsAssumeRoleCredentialsProviderMissingConfigs() {
thrown.expect(ConfigException.class);
thrown.expectMessage("Missing required configuration");
properties.put(
S3SinkConnectorConfig.CREDENTIALS_PROVIDER_CLASS_CONFIG,
AwsAssumeRoleCredentialsProvider.class.getName()
);
String configPrefix = S3SinkConnectorConfig.CREDENTIALS_PROVIDER_CONFIG_PREFIX;
properties.put(
configPrefix.concat(AwsAssumeRoleCredentialsProvider.ROLE_ARN_CONFIG),
"arn:aws:iam::012345678901:role/my-restricted-role"
);
properties.put(
configPrefix.concat(AwsAssumeRoleCredentialsProvider.ROLE_SESSION_NAME_CONFIG),
"my-session-name"
);
properties.put(
configPrefix.concat(AwsAssumeRoleCredentialsProvider.ROLE_EXTERNAL_ID_CONFIG),
"my-external-id"
);
connectorConfig = new S3SinkConnectorConfig(properties);
AwsAssumeRoleCredentialsProvider credentialsProvider =
(AwsAssumeRoleCredentialsProvider) connectorConfig.getCredentialsProvider();
credentialsProvider.configure(properties);
}
@Test
public void testConfigurableS3ObjectTaggingConfigs() {
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(false, connectorConfig.get(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG));
properties.put(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG, "true");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(true, connectorConfig.get(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG));
properties.put(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG, "false");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(false, connectorConfig.get(S3SinkConnectorConfig.S3_OBJECT_TAGGING_CONFIG));
} |
<<<<<<<
@Test
public void testParquetCompressionTypeSupported() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "none");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.UNCOMPRESSED, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "gzip");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.GZIP, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "snappy");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.SNAPPY, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lz4");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZ4, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "zstd");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.ZSTD, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "brotli");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.BROTLI, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lzo");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZO, connectorConfig.parquetCompressionCodecName());
}
@Test(expected = ConfigException.class)
public void testUnsupportedParquetCompressionType() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "uncompressed");
connectorConfig = new S3SinkConnectorConfig(properties);
connectorConfig.parquetCompressionCodecName();
}
=======
@Test(expected = ConfigException.class)
public void testInvalidBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "test_bucket");
connectorConfig = new S3SinkConnectorConfig(properties);
}
@Test(expected = ConfigException.class)
public void testEmptyBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "");
connectorConfig = new S3SinkConnectorConfig(properties);
}
@Test
public void testValidBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "test-bucket");
connectorConfig = new S3SinkConnectorConfig(properties);
}
>>>>>>>
@Test
public void testParquetCompressionTypeSupported() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "none");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.UNCOMPRESSED, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "gzip");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.GZIP, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "snappy");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.SNAPPY, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lz4");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZ4, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "zstd");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.ZSTD, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "brotli");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.BROTLI, connectorConfig.parquetCompressionCodecName());
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "lzo");
connectorConfig = new S3SinkConnectorConfig(properties);
assertEquals(CompressionCodecName.LZO, connectorConfig.parquetCompressionCodecName());
}
@Test(expected = ConfigException.class)
public void testUnsupportedParquetCompressionType() {
properties.put(S3SinkConnectorConfig.PARQUET_CODEC_CONFIG, "uncompressed");
connectorConfig = new S3SinkConnectorConfig(properties);
connectorConfig.parquetCompressionCodecName();
}
@Test(expected = ConfigException.class)
public void testInvalidBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "test_bucket");
connectorConfig = new S3SinkConnectorConfig(properties);
}
@Test(expected = ConfigException.class)
public void testEmptyBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "");
connectorConfig = new S3SinkConnectorConfig(properties);
}
@Test
public void testValidBucketName() {
properties.put(S3SinkConnectorConfig.S3_BUCKET_CONFIG, "test-bucket");
connectorConfig = new S3SinkConnectorConfig(properties);
} |
<<<<<<<
import io.confluent.connect.storage.common.StorageCommonConfig;
import io.confluent.connect.storage.StorageSinkConnectorConfig;
=======
>>>>>>>
import io.confluent.connect.storage.common.StorageCommonConfig;
<<<<<<<
@Test
public void testLateDataAppendsCurrentPartitionRotation() throws Exception {
// Do not roll on size, only based on time.
localProps.put(S3SinkConnectorConfig.FLUSH_SIZE_CONFIG, "1000");
localProps.put(
S3SinkConnectorConfig.ROTATE_INTERVAL_MS_CONFIG,
String.valueOf(TimeUnit.MINUTES.toMillis(1))
);
localProps.put(
StorageSinkConnectorConfig.APPEND_LATE_DATA,
String.valueOf(true)
);
setUp();
// Define the partitioner
Partitioner<FieldSchema> partitioner = new HourlyPartitioner<>();
parsedConfig.put(PartitionerConfig.TIMESTAMP_EXTRACTOR_CLASS_CONFIG, "RecordField");
partitioner.configure(parsedConfig);
TopicPartitionWriter topicPartitionWriter = new TopicPartitionWriter(
TOPIC_PARTITION, storage, writerProvider, partitioner, connectorConfig, context);
String key = "key";
Schema schema = createSchemaWithTimestampField();
DateTime first = new DateTime(2017, 3, 2, 10, 0, DateTimeZone.forID("America/Los_Angeles"));
ArrayList<Struct> records = new ArrayList<>(50);
long[] timestamps = {
// These two will roll together if we append-late
first.getMillis(),
first.minusSeconds(20).getMillis(),
// These will all roll together if we append-late
first.plusHours(2).getMillis(),
first.minusSeconds(20).getMillis(),
first.plusMinutes(90).getMillis(),
// These two will roll together in append-late mode, but not until they are flushed
first.plusHours(6).getMillis(),
first.plusHours(4).getMillis()
};
for (long timestamp : timestamps) {
records.add(createRecordWithTimestampField(schema, timestamp));
}
Collection<SinkRecord> sinkRecords = createSinkRecords(records.subList(0, records.size()), key, schema);
for (SinkRecord record : sinkRecords) {
topicPartitionWriter.buffer(record);
}
topicPartitionWriter.write();
topicPartitionWriter.close();
List<String> expectedFiles = new ArrayList<>();
// APPEND_LATE expects one rollup since we append late records to currently open
String encodedPartition = getTimebasedEncodedPartition(first.getMillis());
String dirPrefix = partitioner.generatePartitionedPath(TOPIC, encodedPartition);
expectedFiles.add(FileUtils.fileKeyToCommit(
topicsDir, dirPrefix, TOPIC_PARTITION, 0, extension, ZERO_PAD_FMT
));
String laterEncodedPartition = getTimebasedEncodedPartition(first.plusHours(2).getMillis());
String laterDirPrefix = partitioner.generatePartitionedPath(TOPIC, laterEncodedPartition);
expectedFiles.add(FileUtils.fileKeyToCommit(
topicsDir, laterDirPrefix, TOPIC_PARTITION, 2, extension, ZERO_PAD_FMT
));
verify(expectedFiles, schema, records);
}
@Test
public void testLateDataPartitionRotationRollSmallFile() throws Exception {
// Do not roll on size, only based on time.
localProps.put(S3SinkConnectorConfig.FLUSH_SIZE_CONFIG, "1000");
localProps.put(
S3SinkConnectorConfig.ROTATE_INTERVAL_MS_CONFIG,
String.valueOf(TimeUnit.MINUTES.toMillis(1))
);
localProps.put(
StorageSinkConnectorConfig.APPEND_LATE_DATA,
String.valueOf(false)
);
setUp();
// Define the partitioner
Partitioner<FieldSchema> partitioner = new HourlyPartitioner<>();
parsedConfig.put(PartitionerConfig.TIMESTAMP_EXTRACTOR_CLASS_CONFIG, "RecordField");
partitioner.configure(parsedConfig);
TopicPartitionWriter topicPartitionWriter = new TopicPartitionWriter(
TOPIC_PARTITION, storage, writerProvider, partitioner, connectorConfig, context);
String key = "key";
Schema schema = createSchemaWithTimestampField();
DateTime first = new DateTime(2017, 3, 2, 10, 0, DateTimeZone.forID("America/Los_Angeles"));
ArrayList<Struct> records = new ArrayList<>(50);
// Each of these records will trigger a rollup since they are not in same partition as preceding
long[] timestamps = {
first.getMillis(),
first.minusSeconds(20).getMillis(),
first.plusHours(2).getMillis(),
first.minusSeconds(20).getMillis(),
first.plusMinutes(90).getMillis(),
first.plusHours(6).getMillis(),
first.plusHours(4).getMillis()
};
for (long timestamp : timestamps) {
records.add(createRecordWithTimestampField(schema, timestamp));
}
Collection<SinkRecord> sinkRecords = createSinkRecords(records.subList(0, records.size()), key, schema);
for (SinkRecord record : sinkRecords) {
topicPartitionWriter.buffer(record);
}
topicPartitionWriter.write();
topicPartitionWriter.close();
List<String> expectedFiles = new ArrayList<>();
expectedFiles.add(getExpectedFile(timestamps[0], 0, partitioner));
expectedFiles.add(getExpectedFile(timestamps[1], 1, partitioner));
expectedFiles.add(getExpectedFile(timestamps[2], 2, partitioner));
expectedFiles.add(getExpectedFile(timestamps[3], 3, partitioner));
expectedFiles.add(getExpectedFile(timestamps[4], 4, partitioner));
expectedFiles.add(getExpectedFile(timestamps[5], 5, partitioner));
// Expect the records to be sorted in the verify, and the last one will not be flushed
Collections.sort(records.subList(0, records.size()-1), new Comparator<Struct>() {
@Override
public int compare(Struct o1, Struct o2) {
return Long.compare((long) o1.get("timestamp"), (long) o2.get("timestamp"));
}
});
verify(expectedFiles, schema, records);
}
@Test
public void testLateDataNullTimestampExtractor() throws Exception {
// Do not roll on size, only based on time.
localProps.put(S3SinkConnectorConfig.FLUSH_SIZE_CONFIG, "1000");
localProps.put(
S3SinkConnectorConfig.ROTATE_INTERVAL_MS_CONFIG,
String.valueOf(TimeUnit.MINUTES.toMillis(1))
);
localProps.put(
StorageSinkConnectorConfig.APPEND_LATE_DATA,
String.valueOf(true)
);
setUp();
// Define the partitioner
Partitioner<FieldSchema> partitioner = new DefaultPartitioner<>();
partitioner.configure(parsedConfig);
TopicPartitionWriter topicPartitionWriter = new TopicPartitionWriter(
TOPIC_PARTITION, storage, writerProvider, partitioner, connectorConfig, context);
String key = "key";
Schema schema = createSchemaWithTimestampField();
DateTime first = new DateTime(2017, 3, 2, 10, 0, DateTimeZone.forID("America/Los_Angeles"));
long advanceMs = TimeUnit.SECONDS.toMillis(20);
long timeStampNow = first.getMillis();
int size = 5;
ArrayList<Struct> records = new ArrayList<>(size);
// 0 sec: This initial record is our t=0 baseline record timestamp
records.add(createRecordWithTimestampField(schema, timeStampNow));
// -20 sec: Late arriving, and would normally go to its own partition & rollup
long tminus20 = timeStampNow - advanceMs;
records.add(createRecordWithTimestampField(schema, tminus20));
// 2 hrs later. This will flush the previous two records as a rollup, and should start a new
// partition in its own hour. I sent two so the rollups are all the same size
long tplus2hrs = timeStampNow + TimeUnit.HOURS.toMillis(2);
records.add(createRecordWithTimestampField(schema, tplus2hrs));
records.add(createRecordWithTimestampField(schema, tplus2hrs));
// 4 hrs later. This record will flush everythign in the writer
long tplus4hrs = timeStampNow + TimeUnit.HOURS.toMillis(4);
records.add(createRecordWithTimestampField(schema, tplus4hrs));
Collection<SinkRecord> sinkRecords = createSinkRecords(records.subList(0, size), key, schema);
for (SinkRecord record : sinkRecords) {
topicPartitionWriter.buffer(record);
}
topicPartitionWriter.write();
topicPartitionWriter.close();
// No flushing since there is no time-based partitioning
verify(Collections.<String>emptyList(), -1, schema, records);
}
@Test
public void testWriteRecordTimeBasedPartitionFieldTimestampHoursWithLateRecords() throws Exception {
// Do not roll on size, only based on time.
localProps.put(S3SinkConnectorConfig.FLUSH_SIZE_CONFIG, "1000");
localProps.put(
S3SinkConnectorConfig.ROTATE_INTERVAL_MS_CONFIG,
String.valueOf(TimeUnit.MINUTES.toMillis(1))
);
setUp();
// Define the partitioner
Partitioner<FieldSchema> partitioner = new HourlyPartitioner<>();
parsedConfig.put(PartitionerConfig.TIMESTAMP_EXTRACTOR_CLASS_CONFIG, "RecordField");
partitioner.configure(parsedConfig);
TopicPartitionWriter topicPartitionWriter = new TopicPartitionWriter(
TOPIC_PARTITION, storage, writerProvider, partitioner, connectorConfig, context);
String key = "key";
Schema schema = createSchemaWithTimestampField();
DateTime first = new DateTime(2017, 3, 2, 10, 0, DateTimeZone.forID("America/Los_Angeles"));
// One record every 20 sec, puts 3 records every minute/rotate interval
long advanceMs = TimeUnit.SECONDS.toMillis(20);
long timestampNow = first.getMillis();
int size = 5;
ArrayList<Struct> records = new ArrayList<>(size);
// 0 sec
records.add(createRecordWithTimestampField(schema, timestampNow));
// 20 sec
timestampNow += advanceMs;
records.add(createRecordWithTimestampField(schema, timestampNow));
// 40 sec
timestampNow += advanceMs;
records.add(createRecordWithTimestampField(schema, timestampNow));
// 30 sec: This should not flush
timestampNow -= TimeUnit.SECONDS.toMillis(10);
records.add(createRecordWithTimestampField(schema, timestampNow));
// 90 sec: This should flush
timestampNow += TimeUnit.SECONDS.toMillis(90);
records.add(createRecordWithTimestampField(schema, timestampNow));
Collection<SinkRecord> sinkRecords = createSinkRecords(records.subList(0, size), key, schema);
for (SinkRecord record : sinkRecords) {
topicPartitionWriter.buffer(record);
}
topicPartitionWriter.write();
topicPartitionWriter.close();
String encodedPartition = getTimebasedEncodedPartition(timestampNow);
String dirPrefix = partitioner.generatePartitionedPath(TOPIC, encodedPartition);
List<String> expectedFiles = new ArrayList<>();
expectedFiles.add(FileUtils.fileKeyToCommit(
topicsDir, dirPrefix, TOPIC_PARTITION, 0, extension, ZERO_PAD_FMT
));
verify(expectedFiles, 4, schema, records);
}
=======
>>>>>>> |
<<<<<<<
=======
import org.ros.address.InetAddressFactory;
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
// The user can easily use the selected ROS Hostname in the master chooser
// activity.
NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(getRosHostname());
nodeConfiguration.setMasterUri(getMasterUri());
=======
String host = InetAddressFactory.newNonLoopback().getHostAddress();
NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(host, getMasterUri());
>>>>>>>
// The user can easily use the selected ROS Hostname in the master chooser
// activity.
NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(getRosHostname());
nodeConfiguration.setMasterUri(getMasterUri()); |
<<<<<<<
import org.fossasia.susi.ai.adapters.viewHolders.ChatViewHolder;
=======
import org.fossasia.susi.ai.helper.DateTimeHelper;
>>>>>>>
import org.fossasia.susi.ai.helper.DateTimeHelper;
<<<<<<<
private ChatFeedRecyclerAdapter recyclerAdapter;
private Realm realm;
private SearchView searchView;
private Menu menu;
private int pointer;
private RealmResults<ChatMessage> results;
private int offset = 1;
=======
>>>>>>>
private SearchView searchView;
private Menu menu;
private int pointer;
private RealmResults<ChatMessage> results;
private int offset = 1;
<<<<<<<
Number temp = realm.where(ChatMessage.class).max("id");
long id;
if (temp == null) {
id = 0;
} else {
id = (long) temp + 1;
}
ChatMessage chatMessage = new ChatMessage(id, query, true, false);
updateDatabase(id, query, true, false);
recyclerAdapter.addMessage(chatMessage, true);
=======
updateDatabase(query, true, false, DateTimeHelper.getCurrentTime());
>>>>>>>
Number temp = realm.where(ChatMessage.class).max("id");
long id;
if (temp == null) {
id = 0;
} else {
id = (long) temp + 1;
}
updateDatabase(id, query, true, false, DateTimeHelper.getCurrentTime()); |
<<<<<<<
import com.wingjay.jianshi.ui.widget.DayPickDialogFragment;
import com.wingjay.jianshi.ui.widget.TextPointView;
=======
import com.wingjay.jianshi.ui.widget.RedPointView;
>>>>>>>
import com.wingjay.jianshi.ui.widget.TextPointView; |
<<<<<<<
* Calling {@link JComponent#repaint} on a Swing component will be delegated to
* the first ancestor which {@code isPaintingOrigin()} returns {@code true},
* if there are any.
=======
* Calling {@link #repaint} or {@link #paintImmediately(int, int, int, int)}
* on a Swing component will result in calling
* the {@link JComponent#paintImmediately(int, int, int, int)} method of
* the first ancestor which {@code isPaintingOrigin()} returns {@true}, if there are any.
>>>>>>>
* Calling {@link #repaint} or {@link #paintImmediately(int, int, int, int)}
* on a Swing component will result in calling
* the {@link JComponent#paintImmediately(int, int, int, int)} method of
* the first ancestor which {@code isPaintingOrigin()} returns {@code true}, if there are any. |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ForEachStmt n, final Void arg) {
=======
public Integer visit(final ForeachStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ForEachStmt n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleProvidesDirective n, final Void arg) {
=======
public Integer visit(final ModuleProvidesStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleProvidesDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleUsesDirective n, final Void arg) {
=======
public Integer visit(final ModuleUsesStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleUsesDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleOpensDirective n, final Void arg) {
=======
public Integer visit(final ModuleOpensStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleOpensDirective n, final Void arg) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ForEachStmt n, final Object arg) {
=======
public Visitable visit(final ForeachStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ForEachStmt n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleRequiresDirective n, final Object arg) {
=======
public Visitable visit(final ModuleRequiresStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleRequiresDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleExportsDirective n, final Object arg) {
=======
public Visitable visit(final ModuleExportsStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleExportsDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleProvidesDirective n, final Object arg) {
=======
public Visitable visit(final ModuleProvidesStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleProvidesDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleUsesDirective n, final Object arg) {
=======
public Visitable visit(final ModuleUsesStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleUsesDirective n, final Object arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.CloneVisitorGenerator")
public Visitable visit(final ModuleOpensDirective n, final Object arg) {
=======
public Visitable visit(final ModuleOpensStmt n, final Object arg) {
>>>>>>>
public Visitable visit(final ModuleOpensDirective n, final Object arg) { |
<<<<<<<
public Observation<?> createObservation(String id, Date phenomenonTimeStart, Date phenomenonTimeEnd, Date resultTime,
=======
public AbstractObservation createObservation(AbstractObservation observation, String id, Date phenomenonTimeStart, Date phenomenonTimeEnd, Date resultTime,
>>>>>>>
public Observation<?> createObservation(Observation<?> observation, String id, Date phenomenonTimeStart, Date phenomenonTimeEnd, Date resultTime,
<<<<<<<
AbstractObservationDAO observationDAO = DaoFactory.getInstance().getObservationDAO();
ObservationFactory observationFactory = observationDAO.getObservationFactory();
BooleanObservation observation = observationFactory.truth();
observation.setValue(true);
if (observation instanceof AbstractSeriesObservation) {
AbstractSeriesObservation<?> seriesBooleanObservation = (AbstractSeriesObservation<?>) observation;
seriesBooleanObservation.setSeries(getSeries());
if (observation instanceof AbstractEReportingObservation) {
AbstractEReportingObservation<?> abstractEReportingObservation
= (AbstractEReportingObservation) observation;
abstractEReportingObservation.setValidation(1);
abstractEReportingObservation.setVerification(1);
}
} else {
AbstractLegacyObservation<?> booleanObservation = (AbstractLegacyObservation<?>) observation;
booleanObservation.setFeatureOfInterest(getFeatureOfInterest());
booleanObservation.setProcedure(getProcedure());
booleanObservation.setObservableProperty(getObservableProperty());
}
=======
>>>>>>>
<<<<<<<
public Observation<?> createObservation(String id, DateTime begin, DateTime end) throws OwsExceptionReport {
Date s = begin != null ? begin.toDate() : null;
Date e = end != null ? end.toDate() : null;
=======
public List<AbstractObservation> createObservation(String id, DateTime s, DateTime e) throws OwsExceptionReport {
>>>>>>>
public List<Observation<?>> createObservation(String id, DateTime s, DateTime e) throws OwsExceptionReport {
<<<<<<<
public Observation<?> createObservation(String id, DateTime position) throws OwsExceptionReport {
Date s = position != null ? position.toDate() : null;
=======
public List<AbstractObservation> createObservation(String id, DateTime s) throws OwsExceptionReport {
>>>>>>>
public List<Observation<?>> createObservation(String id, DateTime s) throws OwsExceptionReport {
<<<<<<<
public Observation<?> createObservation(Enum<?> id, Date phenomenonTimeStart, Date phenomenonTimeEnd,
Date resultTime, Date validTimeStart, Date validTimeEnd) throws OwsExceptionReport {
return createObservation(id.name(), phenomenonTimeStart, phenomenonTimeEnd, resultTime, validTimeStart,
validTimeEnd);
}
public Observation<?> createObservation(Enum<?> id, DateTime phenomenonTimeStart, DateTime phenomenonTimeEnd,
=======
public List<AbstractObservation> createObservation(Enum<?> id, DateTime phenomenonTimeStart, DateTime phenomenonTimeEnd,
>>>>>>>
public List<Observation<?>> createObservation(Enum<?> id, DateTime phenomenonTimeStart, DateTime phenomenonTimeEnd,
<<<<<<<
public Observation<?> createObservation(Enum<?> id, DateTime begin, DateTime end) throws OwsExceptionReport {
=======
public List<AbstractObservation> createObservation(Enum<?> id, DateTime begin, DateTime end) throws OwsExceptionReport {
>>>>>>>
public List<Observation<?>> createObservation(Enum<?> id, DateTime begin, DateTime end) throws OwsExceptionReport {
<<<<<<<
public Observation<?> createObservation(Enum<?> id, DateTime time) throws OwsExceptionReport {
=======
public List<AbstractObservation> createObservation(Enum<?> id, DateTime time) throws OwsExceptionReport {
>>>>>>>
public List<Observation<?>> createObservation(Enum<?> id, DateTime time) throws OwsExceptionReport {
<<<<<<<
protected Series getSeries() throws OwsExceptionReport {
AbstractObservationDAO observationDAO = DaoFactory.getInstance().getObservationDAO();
SeriesObservationFactory observationFactory = (SeriesObservationFactory) observationDAO.getObservationFactory();
=======
protected Series getSeries(Offering offering) {
>>>>>>>
protected Series getSeries(Offering offering) throws OwsExceptionReport {
AbstractObservationDAO observationDAO = DaoFactory.getInstance().getObservationDAO();
SeriesObservationFactory observationFactory = (SeriesObservationFactory) observationDAO.getObservationFactory(); |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ForEachStmt n, final Void arg) {
=======
public Integer visit(final ForeachStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ForEachStmt n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleRequiresDirective n, final Void arg) {
=======
public Integer visit(final ModuleRequiresStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleRequiresDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleExportsDirective n, final Void arg) {
=======
public Integer visit(final ModuleExportsStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleExportsDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleProvidesDirective n, final Void arg) {
=======
public Integer visit(final ModuleProvidesStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleProvidesDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleUsesDirective n, final Void arg) {
=======
public Integer visit(final ModuleUsesStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleUsesDirective n, final Void arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.HashCodeVisitorGenerator")
public Integer visit(final ModuleOpensDirective n, final Void arg) {
=======
public Integer visit(final ModuleOpensStmt n, final Void arg) {
>>>>>>>
public Integer visit(final ModuleOpensDirective n, final Void arg) { |
<<<<<<<
import static com.github.javaparser.Position.pos;
import java.util.List;
=======
import static com.github.javaparser.Position.pos;
import java.util.EnumSet;
import java.util.List;
>>>>>>>
import static com.github.javaparser.Position.pos;
import java.util.List;
import static com.github.javaparser.Position.pos;
import java.util.EnumSet;
import java.util.List;
<<<<<<<
public AnnotationMemberDeclaration(int modifiers, List<AnnotationExpr> annotations, Type type, String name,
Expression defaultValue) {
=======
public AnnotationMemberDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type,
String name, Expression defaultValue) {
>>>>>>>
public AnnotationMemberDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type, String name,
Expression defaultValue) {
<<<<<<<
@Override
public AnnotationMemberDeclaration setModifiers(int modifiers) {
=======
public void setModifiers(EnumSet<Modifier> modifiers) {
>>>>>>>
@Override
public AnnotationMemberDeclaration setModifiers(EnumSet<Modifier> modifiers) { |
<<<<<<<
import static com.github.javaparser.Position.pos;
import java.util.List;
=======
import static com.github.javaparser.Position.pos;
import java.util.EnumSet;
import java.util.List;
>>>>>>>
import static com.github.javaparser.Position.pos;
import java.util.List;
import static com.github.javaparser.Position.pos;
import java.util.EnumSet;
import java.util.List;
<<<<<<<
public AnnotationDeclaration(int modifiers, List<AnnotationExpr> annotations, String name,
List<BodyDeclaration<?>> members) {
=======
public AnnotationDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, String name,
List<BodyDeclaration> members) {
>>>>>>>
public AnnotationDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, String name,
List<BodyDeclaration<?>> members) {
<<<<<<<
public AnnotationDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, int modifiers,
List<AnnotationExpr> annotations, String name, List<BodyDeclaration<?>> members) {
=======
public AnnotationDeclaration(int beginLine, int beginColumn, int endLine, int endColumn,
EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, String name,
List<BodyDeclaration> members) {
>>>>>>>
public AnnotationDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations, String name, List<BodyDeclaration<?>> members) {
<<<<<<<
public AnnotationDeclaration(Range range, int modifiers, List<AnnotationExpr> annotations, String name,
List<BodyDeclaration<?>> members) {
=======
public AnnotationDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations,
String name, List<BodyDeclaration> members) {
>>>>>>>
public AnnotationDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, String name,
List<BodyDeclaration<?>> members) { |
<<<<<<<
@Override
public Boolean visit(final TextBlockLiteralExpr n, final Visitable arg) {
final TextBlockLiteralExpr n2 = (TextBlockLiteralExpr) arg;
if (!objEquals(n.getValue(), n2.getValue()))
return false;
if (!nodeEquals(n.getComment(), n2.getComment()))
return false;
return true;
}
=======
@Override
public Boolean visit(final YieldStmt n, final Visitable arg) {
final YieldStmt n2 = (YieldStmt) arg;
if (!nodeEquals(n.getExpression(), n2.getExpression()))
return false;
if (!nodeEquals(n.getComment(), n2.getComment()))
return false;
return true;
}
>>>>>>>
@Override
public Boolean visit(final YieldStmt n, final Visitable arg) {
final YieldStmt n2 = (YieldStmt) arg;
if (!nodeEquals(n.getExpression(), n2.getExpression()))
return false;
if (!nodeEquals(n.getComment(), n2.getComment()))
return false;
return true;
}
@Override
public Boolean visit(final TextBlockLiteralExpr n, final Visitable arg) {
final TextBlockLiteralExpr n2 = (TextBlockLiteralExpr) arg;
if (!objEquals(n.getValue(), n2.getValue()))
return false;
if (!nodeEquals(n.getComment(), n2.getComment()))
return false;
return true;
} |
<<<<<<<
import static com.github.javaparser.ast.type.ArrayType.wrapInArrayTypes;
=======
import java.util.EnumSet;
import java.util.List;
>>>>>>>
import static com.github.javaparser.ast.type.ArrayType.wrapInArrayTypes;
import java.util.EnumSet;
import java.util.List; |
<<<<<<<
=======
new CloneGenerator(javaParser, sourceRoot).generate();
sourceRoot.saveAll();
>>>>>>>
new CloneGenerator(javaParser, sourceRoot).generate(); |
<<<<<<<
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
=======
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
>>>>>>>
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import static com.github.javaparser.Position.pos;
import static com.github.javaparser.ast.internal.Utils.ensureNotNull;
import java.util.EnumSet;
<<<<<<<
public abstract class BaseParameter<T>
extends Node
implements NodeWithAnnotations<T>, NodeWithName<T>, NodeWithModifiers<T> {
private int modifiers;
=======
public abstract class BaseParameter
extends Node
implements AnnotableNode, NamedNode, NodeWithModifiers
{
private EnumSet<Modifier> modifiers = EnumSet.noneOf(Modifier.class);
>>>>>>>
public abstract class BaseParameter<T>
extends Node
implements NodeWithAnnotations<T>, NodeWithName<T>, NodeWithModifiers<T> {
private EnumSet<Modifier> modifiers = EnumSet.noneOf(Modifier.class);
<<<<<<<
public BaseParameter(int modifiers, VariableDeclaratorId id) {
=======
public BaseParameter(EnumSet<Modifier> modifiers, VariableDeclaratorId id) {
>>>>>>>
public BaseParameter(EnumSet<Modifier> modifiers, VariableDeclaratorId id) {
<<<<<<<
}
public BaseParameter(int modifiers, List<AnnotationExpr> annotations, VariableDeclaratorId id) {
=======
}
public BaseParameter(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, VariableDeclaratorId id) {
>>>>>>>
}
public BaseParameter(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, VariableDeclaratorId id) {
<<<<<<<
public BaseParameter(int beginLine, int beginColumn, int endLine, int endColumn, int modifiers,
List<AnnotationExpr> annotations, VariableDeclaratorId id) {
=======
public BaseParameter(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations, VariableDeclaratorId id) {
>>>>>>>
public BaseParameter(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations, VariableDeclaratorId id) {
<<<<<<<
public BaseParameter(final Range range, int modifiers, List<AnnotationExpr> annotations, VariableDeclaratorId id) {
super(range);
=======
public BaseParameter(final Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations,
VariableDeclaratorId id) {
super(range);
>>>>>>>
public BaseParameter(final Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, VariableDeclaratorId id) {
super(range);
<<<<<<<
@Override
@SuppressWarnings("unchecked")
public T setModifiers(int modifiers) {
=======
public void setModifiers(EnumSet<Modifier> modifiers) {
>>>>>>>
@Override
@SuppressWarnings("unchecked")
public T setModifiers(EnumSet<Modifier> modifiers) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.GenericListVisitorAdapterGenerator")
public List<R> visit(final ForEachStmt n, final A arg) {
=======
public List<R> visit(final ForeachStmt n, final A arg) {
>>>>>>>
public List<R> visit(final ForEachStmt n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.GenericListVisitorAdapterGenerator")
public List<R> visit(final ModuleRequiresDirective n, final A arg) {
=======
public List<R> visit(final ModuleRequiresStmt n, final A arg) {
>>>>>>>
public List<R> visit(final ModuleRequiresDirective n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.GenericListVisitorAdapterGenerator")
public List<R> visit(final ModuleUsesDirective n, final A arg) {
=======
public List<R> visit(final ModuleUsesStmt n, final A arg) {
>>>>>>>
public List<R> visit(final ModuleUsesDirective n, final A arg) { |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.GenericVisitorGenerator")
R visit(ForEachStmt n, A arg);
=======
R visit(ForeachStmt n, A arg);
>>>>>>>
R visit(ForEachStmt n, A arg); |
<<<<<<<
=======
import com.github.javaparser.resolution.Resolvable;
import com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration;
import javax.annotation.Generated;
>>>>>>>
import com.github.javaparser.resolution.Resolvable;
import com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration;
import javax.annotation.Generated;
<<<<<<<
import com.github.javaparser.TokenRange;
import com.github.javaparser.resolution.Resolvable;
import com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration;
import java.util.function.Consumer;
import com.github.javaparser.ast.Generated;
=======
>>>>>>>
import com.github.javaparser.TokenRange;
import com.github.javaparser.resolution.Resolvable;
import com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration;
import java.util.function.Consumer;
import com.github.javaparser.ast.Generated; |
<<<<<<<
import static com.github.javaparser.utils.Utils.ensureNotNull;
=======
import java.util.HashMap;
>>>>>>>
import static com.github.javaparser.utils.Utils.ensureNotNull;
import java.util.HashMap; |
<<<<<<<
import static com.github.javaparser.utils.Utils.ensureNotNull;
import static java.util.Collections.*;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.stream.Collectors;
=======
>>>>>>>
import static com.github.javaparser.utils.Utils.ensureNotNull;
import static java.util.Collections.*;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.stream.Collectors;
<<<<<<<
@Override
public void setVariables(final List<VariableDeclarator> variables) {
this.variables = variables;
setAsParentNodeOf(this.variables);
}
public List<ArrayBracketPair> getArrayBracketPairsAfterElementType() {
arrayBracketPairsAfterType = ensureNotNull(arrayBracketPairsAfterType);
return arrayBracketPairsAfterType;
}
@Override
public VariableDeclarationExpr setArrayBracketPairsAfterElementType(List<ArrayBracketPair> arrayBracketPairsAfterType) {
this.arrayBracketPairsAfterType = arrayBracketPairsAfterType;
setAsParentNodeOf(arrayBracketPairsAfterType);
return this;
=======
public VariableDeclarationExpr setVars(final List<VariableDeclarator> vars) {
this.vars = vars;
setAsParentNodeOf(this.vars);
return this;
>>>>>>>
@Override
public void setVariables(final List<VariableDeclarator> variables) {
this.variables = variables;
setAsParentNodeOf(this.variables);
return this;
}
public List<ArrayBracketPair> getArrayBracketPairsAfterElementType() {
arrayBracketPairsAfterType = ensureNotNull(arrayBracketPairsAfterType);
return arrayBracketPairsAfterType;
}
@Override
public VariableDeclarationExpr setArrayBracketPairsAfterElementType(List<ArrayBracketPair> arrayBracketPairsAfterType) {
this.arrayBracketPairsAfterType = arrayBracketPairsAfterType;
setAsParentNodeOf(arrayBracketPairsAfterType);
return this; |
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ForEachStmt n, final A arg) {
=======
public Visitable visit(final ForeachStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ForEachStmt n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ModuleRequiresDirective n, final A arg) {
NodeList<Modifier> modifiers = modifyList(n.getModifiers(), arg);
=======
public Visitable visit(final ModuleRequiresStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ModuleRequiresDirective n, final A arg) {
NodeList<Modifier> modifiers = modifyList(n.getModifiers(), arg);
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ModuleExportsDirective n, final A arg) {
=======
public Visitable visit(final ModuleExportsStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ModuleExportsDirective n, final A arg) {
<<<<<<<
@Generated("com.github.javaparser.generator.core.visitor.ModifierVisitorGenerator")
public Visitable visit(final ModuleProvidesDirective n, final A arg) {
=======
public Visitable visit(final ModuleProvidesStmt n, final A arg) {
>>>>>>>
public Visitable visit(final ModuleProvidesDirective n, final A arg) { |
<<<<<<<
=======
import static com.github.javaparser.StaticJavaParser.parse;
import static com.github.javaparser.StaticJavaParser.parseResource;
import static com.github.javaparser.utils.TestUtils.assertEqualToTextResource;
>>>>>>>
import static com.github.javaparser.StaticJavaParser.parse;
import static com.github.javaparser.StaticJavaParser.parseResource;
import static com.github.javaparser.utils.TestUtils.assertEqualToTextResource; |
<<<<<<<
@Override
public Boolean visit(final TextBlockLiteralExpr n, final Visitable arg) {
return n == arg;
}
=======
@Override
public Boolean visit(final YieldStmt n, final Visitable arg) {
return n == arg;
}
>>>>>>>
@Override
public Boolean visit(final YieldStmt n, final Visitable arg) {
return n == arg;
}
@Override
public Boolean visit(final TextBlockLiteralExpr n, final Visitable arg) {
return n == arg;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.