conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
import com.sun.source.tree.LambdaExpressionTree;
import com.sun.source.util.SimpleTreeVisitor;
>>>>>>>
import com.sun.source.tree.LambdaExpressionTree; |
<<<<<<<
@Nullable Module testSysModule,
@Nullable Module testAuditModule)
=======
@Nullable Module testSysModule,
@Nullable Module testSshModule)
>>>>>>>
@Nullable Module testSysModule,
@Nullable Module testAuditModule,
@Nullable Module testSshModule)
<<<<<<<
return start(desc, baseConfig, site, testSysModule, testAuditModule, null);
=======
return start(desc, baseConfig, site, testSysModule, testSshModule, null);
>>>>>>>
return start(desc, baseConfig, site, testSysModule, testAuditModule, testSshModule, null);
<<<<<<<
@Nullable Module testAuditModule,
=======
@Nullable Module testSshModule,
>>>>>>>
@Nullable Module testAuditModule,
@Nullable Module testSshModule,
<<<<<<<
return start(server.desc, cfg, site, null, null, inMemoryRepoManager);
=======
return start(server.desc, cfg, site, null, null, inMemoryRepoManager);
}
public static GerritServer restart(
GerritServer server, @Nullable Module testSysModule, @Nullable Module testSshModule)
throws Exception {
checkState(server.desc.sandboxed(), "restarting as slave requires @Sandboxed");
Config cfg = server.testInjector.getInstance(Key.get(Config.class, GerritServerConfig.class));
Path site = server.testInjector.getInstance(Key.get(Path.class, SitePath.class));
InMemoryRepositoryManager inMemoryRepoManager = null;
if (hasBinding(server.testInjector, InMemoryRepositoryManager.class)) {
inMemoryRepoManager = server.testInjector.getInstance(InMemoryRepositoryManager.class);
}
server.close();
server.daemon.stop();
return start(server.desc, cfg, site, testSysModule, testSshModule, inMemoryRepoManager);
>>>>>>>
return start(server.desc, cfg, site, null, null, null, inMemoryRepoManager);
}
public static GerritServer restart(
GerritServer server, @Nullable Module testSysModule, @Nullable Module testSshModule)
throws Exception {
checkState(server.desc.sandboxed(), "restarting as slave requires @Sandboxed");
Config cfg = server.testInjector.getInstance(Key.get(Config.class, GerritServerConfig.class));
Path site = server.testInjector.getInstance(Key.get(Path.class, SitePath.class));
InMemoryRepositoryManager inMemoryRepoManager = null;
if (hasBinding(server.testInjector, InMemoryRepositoryManager.class)) {
inMemoryRepoManager = server.testInjector.getInstance(InMemoryRepositoryManager.class);
}
server.close();
server.daemon.stop();
return start(server.desc, cfg, site, testSysModule, null, testSshModule, inMemoryRepoManager); |
<<<<<<<
* Any method written using @PolyNull conceptually has two versions: one
* in which every instance of @PolyNull has been replaced by @NonNull, and
* one in which every instance of @PolyNull has been replaced by @Nullable.
*
* @checker.framework.manual #nullness-checker Nullness Checker
=======
* Any method written using {@link PolyNull} conceptually has two versions: one
* in which every instance of {@link PolyNull} has been replaced by
* {@link NonNull}, and one in which every instance of {@link PolyNull} has been
* replaced by {@link Nullable}.
>>>>>>>
* Any method written using {@link PolyNull} conceptually has two versions: one
* in which every instance of {@link PolyNull} has been replaced by
* {@link NonNull}, and one in which every instance of {@link PolyNull} has been
* replaced by {@link Nullable}.
*
* @checker.framework.manual #nullness-checker Nullness Checker |
<<<<<<<
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
=======
import static com.google.common.base.Preconditions.checkState;
import static com.google.gerrit.server.config.ConfigUtil.loadSection;
import static com.google.gerrit.server.config.ConfigUtil.skipField;
import static com.google.gerrit.server.config.ConfigUtil.storeSection;
import static com.google.gerrit.server.git.UserConfigSections.CHANGE_TABLE;
import static com.google.gerrit.server.git.UserConfigSections.CHANGE_TABLE_COLUMN;
import static com.google.gerrit.server.git.UserConfigSections.KEY_ID;
import static com.google.gerrit.server.git.UserConfigSections.KEY_TARGET;
import static com.google.gerrit.server.git.UserConfigSections.KEY_URL;
import static java.util.Objects.requireNonNull;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.flogger.FluentLogger;
>>>>>>>
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
<<<<<<<
import com.google.gerrit.extensions.client.Theme;
=======
import com.google.gerrit.extensions.restapi.BadRequestException;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.RefNames;
import com.google.gerrit.server.config.AllUsersName;
import com.google.gerrit.server.git.UserConfigSections;
import com.google.gerrit.server.git.ValidationError;
import com.google.gerrit.server.git.meta.MetaDataUpdate;
import com.google.gerrit.server.git.meta.VersionedMetaData;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
>>>>>>>
import com.google.gerrit.extensions.client.Theme;
<<<<<<<
public abstract Optional<TimeFormat> timeFormat();
=======
public Config saveGeneralPreferences(
Optional<GeneralPreferencesInfo> generalPreferencesInput,
Optional<DiffPreferencesInfo> diffPreferencesInput,
Optional<EditPreferencesInfo> editPreferencesInput)
throws ConfigInvalidException {
if (generalPreferencesInput.isPresent()) {
GeneralPreferencesInfo mergedGeneralPreferencesInput =
parseGeneralPreferences(generalPreferencesInput.get());
storeSection(
cfg,
UserConfigSections.GENERAL,
null,
mergedGeneralPreferencesInput,
parseDefaultGeneralPreferences(defaultCfg, null));
setChangeTable(cfg, mergedGeneralPreferencesInput.changeTable);
setMy(cfg, mergedGeneralPreferencesInput.my);
// evict the cached general preferences
this.generalPreferences = null;
}
>>>>>>>
public abstract Optional<TimeFormat> timeFormat();
<<<<<<<
public abstract Optional<DefaultBase> defaultBaseForMerges();
=======
private static GeneralPreferencesInfo parseGeneralPreferences(
Config cfg, @Nullable Config defaultCfg, @Nullable GeneralPreferencesInfo input)
throws ConfigInvalidException {
GeneralPreferencesInfo r =
loadSection(
cfg,
UserConfigSections.GENERAL,
null,
new GeneralPreferencesInfo(),
defaultCfg != null
? parseDefaultGeneralPreferences(defaultCfg, input)
: GeneralPreferencesInfo.defaults(),
input);
if (input != null) {
r.changeTable = input.changeTable;
r.my = input.my;
} else {
r.changeTable = parseChangeTableColumns(cfg, defaultCfg);
r.my = parseMyMenus(cfg, defaultCfg);
}
return r;
}
>>>>>>>
public abstract Optional<DefaultBase> defaultBaseForMerges();
<<<<<<<
abstract Builder expandInlineDiffs(@Nullable Boolean val);
abstract Builder highlightAssigneeInChangeTable(@Nullable Boolean val);
=======
public static GeneralPreferencesInfo readDefaultGeneralPreferences(
AllUsersName allUsersName, Repository allUsersRepo)
throws IOException, ConfigInvalidException {
return parseGeneralPreferences(readDefaultConfig(allUsersName, allUsersRepo), null, null);
}
>>>>>>>
abstract Builder expandInlineDiffs(@Nullable Boolean val);
abstract Builder highlightAssigneeInChangeTable(@Nullable Boolean val);
<<<<<<<
abstract Builder legacycidInChangeTable(@Nullable Boolean val);
=======
public static GeneralPreferencesInfo updateDefaultGeneralPreferences(
MetaDataUpdate md, GeneralPreferencesInfo input) throws IOException, ConfigInvalidException {
VersionedDefaultPreferences defaultPrefs = new VersionedDefaultPreferences();
defaultPrefs.load(md);
storeSection(
defaultPrefs.getConfig(),
UserConfigSections.GENERAL,
null,
input,
GeneralPreferencesInfo.defaults());
setMy(defaultPrefs.getConfig(), input.my);
setChangeTable(defaultPrefs.getConfig(), input.changeTable);
defaultPrefs.commit(md);
return parseGeneralPreferences(defaultPrefs.getConfig(), null, null);
}
>>>>>>>
abstract Builder legacycidInChangeTable(@Nullable Boolean val);
<<<<<<<
public abstract Optional<Boolean> autoCloseBrackets();
public abstract Optional<Boolean> showBase();
public abstract Optional<Theme> theme();
public abstract Optional<KeyMapType> keyMapType();
@AutoValue.Builder
public abstract static class Builder {
abstract Builder tabSize(@Nullable Integer val);
abstract Builder lineLength(@Nullable Integer val);
abstract Builder indentUnit(@Nullable Integer val);
abstract Builder cursorBlinkRate(@Nullable Integer val);
abstract Builder hideTopMenu(@Nullable Boolean val);
abstract Builder showTabs(@Nullable Boolean val);
abstract Builder showWhitespaceErrors(@Nullable Boolean val);
abstract Builder syntaxHighlighting(@Nullable Boolean val);
abstract Builder hideLineNumbers(@Nullable Boolean val);
abstract Builder matchBrackets(@Nullable Boolean val);
abstract Builder lineWrapping(@Nullable Boolean val);
abstract Builder indentWithTabs(@Nullable Boolean val);
abstract Builder autoCloseBrackets(@Nullable Boolean val);
abstract Builder showBase(@Nullable Boolean val);
abstract Builder theme(@Nullable Theme val);
abstract Builder keyMapType(@Nullable KeyMapType val);
abstract Edit build();
}
public static Edit fromInfo(EditPreferencesInfo info) {
return (new AutoValue_Preferences_Edit.Builder())
.tabSize(info.tabSize)
.lineLength(info.lineLength)
.indentUnit(info.indentUnit)
.cursorBlinkRate(info.cursorBlinkRate)
.hideTopMenu(info.hideTopMenu)
.showTabs(info.showTabs)
.showWhitespaceErrors(info.showWhitespaceErrors)
.syntaxHighlighting(info.syntaxHighlighting)
.hideLineNumbers(info.hideLineNumbers)
.matchBrackets(info.matchBrackets)
.lineWrapping(info.lineWrapping)
.indentWithTabs(info.indentWithTabs)
.autoCloseBrackets(info.autoCloseBrackets)
.showBase(info.showBase)
.theme(info.theme)
.keyMapType(info.keyMapType)
.build();
}
public EditPreferencesInfo toInfo() {
EditPreferencesInfo info = new EditPreferencesInfo();
info.tabSize = tabSize().orElse(null);
info.lineLength = lineLength().orElse(null);
info.indentUnit = indentUnit().orElse(null);
info.cursorBlinkRate = cursorBlinkRate().orElse(null);
info.hideTopMenu = hideTopMenu().orElse(null);
info.showTabs = showTabs().orElse(null);
info.showWhitespaceErrors = showWhitespaceErrors().orElse(null);
info.syntaxHighlighting = syntaxHighlighting().orElse(null);
info.hideLineNumbers = hideLineNumbers().orElse(null);
info.matchBrackets = matchBrackets().orElse(null);
info.lineWrapping = lineWrapping().orElse(null);
info.indentWithTabs = indentWithTabs().orElse(null);
info.autoCloseBrackets = autoCloseBrackets().orElse(null);
info.showBase = showBase().orElse(null);
info.theme = theme().orElse(null);
info.keyMapType = keyMapType().orElse(null);
return info;
=======
private static void unsetSection(Config cfg, String section) {
cfg.unsetSection(section, null);
for (String subsection : cfg.getSubsections(section)) {
cfg.unsetSection(section, subsection);
>>>>>>>
public abstract Optional<Boolean> autoCloseBrackets();
public abstract Optional<Boolean> showBase();
public abstract Optional<Theme> theme();
public abstract Optional<KeyMapType> keyMapType();
@AutoValue.Builder
public abstract static class Builder {
abstract Builder tabSize(@Nullable Integer val);
abstract Builder lineLength(@Nullable Integer val);
abstract Builder indentUnit(@Nullable Integer val);
abstract Builder cursorBlinkRate(@Nullable Integer val);
abstract Builder hideTopMenu(@Nullable Boolean val);
abstract Builder showTabs(@Nullable Boolean val);
abstract Builder showWhitespaceErrors(@Nullable Boolean val);
abstract Builder syntaxHighlighting(@Nullable Boolean val);
abstract Builder hideLineNumbers(@Nullable Boolean val);
abstract Builder matchBrackets(@Nullable Boolean val);
abstract Builder lineWrapping(@Nullable Boolean val);
abstract Builder indentWithTabs(@Nullable Boolean val);
abstract Builder autoCloseBrackets(@Nullable Boolean val);
abstract Builder showBase(@Nullable Boolean val);
abstract Builder theme(@Nullable Theme val);
abstract Builder keyMapType(@Nullable KeyMapType val);
abstract Edit build();
}
public static Edit fromInfo(EditPreferencesInfo info) {
return (new AutoValue_Preferences_Edit.Builder())
.tabSize(info.tabSize)
.lineLength(info.lineLength)
.indentUnit(info.indentUnit)
.cursorBlinkRate(info.cursorBlinkRate)
.hideTopMenu(info.hideTopMenu)
.showTabs(info.showTabs)
.showWhitespaceErrors(info.showWhitespaceErrors)
.syntaxHighlighting(info.syntaxHighlighting)
.hideLineNumbers(info.hideLineNumbers)
.matchBrackets(info.matchBrackets)
.lineWrapping(info.lineWrapping)
.indentWithTabs(info.indentWithTabs)
.autoCloseBrackets(info.autoCloseBrackets)
.showBase(info.showBase)
.theme(info.theme)
.keyMapType(info.keyMapType)
.build();
}
public EditPreferencesInfo toInfo() {
EditPreferencesInfo info = new EditPreferencesInfo();
info.tabSize = tabSize().orElse(null);
info.lineLength = lineLength().orElse(null);
info.indentUnit = indentUnit().orElse(null);
info.cursorBlinkRate = cursorBlinkRate().orElse(null);
info.hideTopMenu = hideTopMenu().orElse(null);
info.showTabs = showTabs().orElse(null);
info.showWhitespaceErrors = showWhitespaceErrors().orElse(null);
info.syntaxHighlighting = syntaxHighlighting().orElse(null);
info.hideLineNumbers = hideLineNumbers().orElse(null);
info.matchBrackets = matchBrackets().orElse(null);
info.lineWrapping = lineWrapping().orElse(null);
info.indentWithTabs = indentWithTabs().orElse(null);
info.autoCloseBrackets = autoCloseBrackets().orElse(null);
info.showBase = showBase().orElse(null);
info.theme = theme().orElse(null);
info.keyMapType = keyMapType().orElse(null);
return info; |
<<<<<<<
import com.sun.source.tree.AssignmentTree;
import com.sun.source.tree.LambdaExpressionTree;
import com.sun.source.tree.MemberReferenceTree;
import com.sun.source.tree.TypeCastTree;
import com.sun.tools.javac.code.Symbol.MethodSymbol;
import com.sun.tools.javac.code.Symbol.TypeSymbol;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Type.MethodType;
import com.sun.tools.javac.processing.JavacProcessingEnvironment;
import com.sun.tools.javac.util.Context;
=======
>>>>>>>
import com.sun.source.tree.AssignmentTree;
import com.sun.source.tree.LambdaExpressionTree;
import com.sun.source.tree.MemberReferenceTree;
import com.sun.source.tree.TypeCastTree;
import com.sun.tools.javac.code.Symbol.MethodSymbol;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.processing.JavacProcessingEnvironment;
import com.sun.tools.javac.util.Context; |
<<<<<<<
REGEX = annotations.fromClass(Regex.class);
}
@Override
protected RegexAnalysis createFlowAnalysis(RegexChecker checker,
List<Pair<VariableElement, CFValue>> fieldValues) {
return new RegexAnalysis(this, getEnv(), checker, fieldValues);
=======
asRegexes = new ArrayList<ExecutableElement>();
for (String clazz : asRegexClasses) {
try {
asRegexes.add(TreeUtils.getMethod(clazz, "asRegex", 2, env));
} catch (Exception e) {
// The class couldn't be loaded so it must not be on the
// classpath, just skip it.
continue;
}
}
this.postInit();
>>>>>>>
REGEX = annotations.fromClass(Regex.class);
this.postInit();
}
@Override
protected RegexAnalysis createFlowAnalysis(RegexChecker checker,
List<Pair<VariableElement, CFValue>> fieldValues) {
return new RegexAnalysis(this, getEnv(), checker, fieldValues); |
<<<<<<<
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.util.Elements;
=======
>>>>>>>
import javax.lang.model.util.Elements;
<<<<<<<
protected AnnotationMirror REGEX, REGEXBOTTOM, PARTIALREGEX;
protected ExecutableElement regexValueElement;
=======
protected AnnotationMirror REGEX, PARTIALREGEX;
>>>>>>>
protected AnnotationMirror REGEX, REGEXBOTTOM, PARTIALREGEX;
<<<<<<<
Elements elements = processingEnv.getElementUtils();
REGEX = AnnotationUtils.fromClass(elements, Regex.class);
REGEXBOTTOM = AnnotationUtils.fromClass(elements, RegexBottom.class);
PARTIALREGEX = AnnotationUtils.fromClass(elements, PartialRegex.class);
regexValueElement = TreeUtils.getMethod("checkers.regex.quals.Regex", "value", 0, processingEnv);
=======
AnnotationUtils annoFactory = AnnotationUtils.getInstance(processingEnv);
REGEX = annoFactory.fromClass(Regex.class);
PARTIALREGEX = annoFactory.fromClass(PartialRegex.class);
>>>>>>>
Elements elements = processingEnv.getElementUtils();
REGEX = AnnotationUtils.fromClass(elements, Regex.class);
REGEXBOTTOM = AnnotationUtils.fromClass(elements, RegexBottom.class);
PARTIALREGEX = AnnotationUtils.fromClass(elements, PartialRegex.class); |
<<<<<<<
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
=======
>>>>>>>
<<<<<<<
import checkers.flow.Flow;
import checkers.nullness.quals.Pure;
=======
import checkers.flow.analysis.checkers.CFStore;
import checkers.flow.analysis.checkers.CFValue;
>>>>>>>
import checkers.flow.analysis.checkers.CFStore;
import checkers.flow.analysis.checkers.CFValue;
<<<<<<<
@Override
public Flow createFlow(RegexChecker checker, CompilationUnitTree tree,
Set<AnnotationMirror> flowQuals) {
return new RegexFlow(checker, tree, flowQuals, this);
}
@Override
public TreeAnnotator createTreeAnnotator(RegexChecker checker) {
return new RegexTreeAnnotator(checker);
}
/** This method is a copy of RegexUtil.isRegex.
* We cannot directly use RegexUtil, because it uses type annotations
* which cannot be used in IDEs (yet).
*/
@Pure
private static boolean isRegex(String s) {
try {
Pattern.compile(s);
} catch (PatternSyntaxException e) {
return false;
}
return true;
}
=======
>>>>>>>
/** This method is a copy of RegexUtil.isRegex.
* We cannot directly use RegexUtil, because it uses type annotations
* which cannot be used in IDEs (yet).
*/
@Pure
private static boolean isRegex(String s) {
try {
Pattern.compile(s);
} catch (PatternSyntaxException e) {
return false;
}
return true;
} |
<<<<<<<
import checkers.util.AnnotationUtils;
import checkers.util.ElementUtils;
import checkers.util.TreeUtils;
=======
>>>>>>>
<<<<<<<
SourceChecker.errorAbort("AnnotatedTypeMirror.createType: unidentified type " +
type + " (" + type.getKind() + ")");
=======
ErrorReporter.errorAbort("AnnotatedTypeMirror.createType: unidentified type " + type);
>>>>>>>
ErrorReporter.errorAbort("AnnotatedTypeMirror.createType: unidentified type " +
type + " (" + type.getKind() + ")"); |
<<<<<<<
public class BaseTypeVisitor<Checker extends BaseTypeChecker> extends
SourceVisitor<Void, Void> {
=======
/*
* Note how the handling of VisitorState is duplicated in AbstractFlow.
* In particular, the handling of the assignment context has to be done correctly in both classes.
* This is a pain and we should see how to handle this in the DFF version.
* TODO: missing assignment context:
* - array initializer expressions should have the component type as context
*/
public class BaseTypeVisitor<Checker extends BaseTypeChecker> extends SourceVisitor<Void, Void> {
>>>>>>>
/*
* Note how the handling of VisitorState is duplicated in AbstractFlow.
* In particular, the handling of the assignment context has to be done correctly in both classes.
* This is a pain and we should see how to handle this in the DFF version.
* TODO: missing assignment context:
* - array initializer expressions should have the component type as context
*/
public class BaseTypeVisitor<Checker extends BaseTypeChecker> extends
SourceVisitor<Void, Void> {
<<<<<<<
=======
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
>>>>>>>
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
<<<<<<<
=======
visitorState.setAssignmentContext(null);
>>>>>>>
visitorState.setAssignmentContext(null);
<<<<<<<
=======
this.visitorState.setAssignmentContext(preAssCtxt);
>>>>>>>
this.visitorState.setAssignmentContext(preAssCtxt);
<<<<<<<
validateTypeOf(node);
// If there's no assignment in this variable declaration, skip it.
if (node.getInitializer() != null) {
commonAssignmentCheck(node, node.getInitializer(),
"assignment.type.incompatible");
=======
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
visitorState.setAssignmentContext(atypeFactory.getAnnotatedType(node));
try {
boolean valid = validateTypeOf(node);
// If there's no assignment in this variable declaration, skip it.
if (valid && node.getInitializer() != null) {
commonAssignmentCheck(node, node.getInitializer(), "assignment.type.incompatible");
}
return super.visitVariable(node, p);
} finally {
visitorState.setAssignmentContext(preAssCtxt);
>>>>>>>
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
visitorState.setAssignmentContext(atypeFactory.getAnnotatedType(node));
try {
boolean valid = validateTypeOf(node);
// If there's no assignment in this variable declaration, skip it.
if (valid && node.getInitializer() != null) {
commonAssignmentCheck(node, node.getInitializer(),
"assignment.type.incompatible");
}
return super.visitVariable(node, p);
} finally {
visitorState.setAssignmentContext(preAssCtxt);
<<<<<<<
commonAssignmentCheck(node.getVariable(), node.getExpression(),
"assignment.type.incompatible");
return super.visitAssignment(node, p);
=======
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
visitorState.setAssignmentContext(atypeFactory.getAnnotatedType(node.getVariable()));
try {
commonAssignmentCheck(node.getVariable(), node.getExpression(),
"assignment.type.incompatible");
return super.visitAssignment(node, p);
} finally {
visitorState.setAssignmentContext(preAssCtxt);
}
>>>>>>>
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
visitorState.setAssignmentContext(atypeFactory.getAnnotatedType(node.getVariable()));
try {
commonAssignmentCheck(node.getVariable(), node.getExpression(),
"assignment.type.incompatible");
return super.visitAssignment(node, p);
} finally {
visitorState.setAssignmentContext(preAssCtxt);
}
<<<<<<<
ExecutableElement invokedMethodElement = invokedMethod.getElement();
if (!ElementUtils.isStatic(invokedMethodElement)
&& !TreeUtils.isSuperCall(node))
=======
if (!ElementUtils.isStatic(invokedMethod.getElement())
&& !TreeUtils.isSuperCall(node)) {
>>>>>>>
ExecutableElement invokedMethodElement = invokedMethod.getElement();
if (!ElementUtils.isStatic(invokedMethodElement)
&& !TreeUtils.isSuperCall(node)) {
<<<<<<<
// check precondition annotations
checkPreconditions(node, invokedMethodElement);
return super.visitMethodInvocation(node, p);
=======
// Do not call super, as that would observe the arguments without
// a set assignment context.
scan(node.getMethodSelect(), p);
return null; // super.visitMethodInvocation(node, p);
>>>>>>>
// check precondition annotations
checkPreconditions(node, invokedMethodElement);
// Do not call super, as that would observe the arguments without
// a set assignment context.
scan(node.getMethodSelect(), p);
return null; // super.visitMethodInvocation(node, p);
<<<<<<<
AnnotatedTypeMirror actual = atypeFactory.getAnnotatedType(at.getExpression());
if (expected.getKind() != TypeKind.ARRAY) {
// Expected is not an array -> direct comparison.
commonAssignmentCheck(expected, actual, at.getExpression(),
"annotation.type.incompatible");
} else {
if (actual.getKind() == TypeKind.ARRAY) {
// Both actual and expected are arrays.
=======
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
{
// Determine and set the new assignment context.
ExpressionTree var = at.getVariable();
assert var instanceof IdentifierTree : "Expected IdentifierTree as context. Found: " + var;
AnnotatedTypeMirror meth = atypeFactory.getAnnotatedType(var);
assert meth instanceof AnnotatedExecutableType : "Expected AnnotatedExecutableType as context. Found: " + meth;
AnnotatedTypeMirror newctx = ((AnnotatedExecutableType)meth).getReturnType();
visitorState.setAssignmentContext(newctx);
}
try {
AnnotatedTypeMirror actual = atypeFactory.getAnnotatedType(at.getExpression());
if (expected.getKind()!=TypeKind.ARRAY) {
// Expected is not an array -> direct comparison.
>>>>>>>
AnnotatedTypeMirror preAssCtxt = visitorState.getAssignmentContext();
{
// Determine and set the new assignment context.
ExpressionTree var = at.getVariable();
assert var instanceof IdentifierTree : "Expected IdentifierTree as context. Found: " + var;
AnnotatedTypeMirror meth = atypeFactory.getAnnotatedType(var);
assert meth instanceof AnnotatedExecutableType : "Expected AnnotatedExecutableType as context. Found: " + meth;
AnnotatedTypeMirror newctx = ((AnnotatedExecutableType)meth).getReturnType();
visitorState.setAssignmentContext(newctx);
}
try {
AnnotatedTypeMirror actual = atypeFactory.getAnnotatedType(at.getExpression());
if (expected.getKind() != TypeKind.ARRAY) {
// Expected is not an array -> direct comparison.
commonAssignmentCheck(expected, actual, at.getExpression(),
"annotation.type.incompatible");
} else {
if (actual.getKind() == TypeKind.ARRAY) {
// Both actual and expected are arrays.
<<<<<<<
// TODO: Test type arguments and array components types
// The following
// isSubtype = checker.isSubtype(exprType, castType);
// would be too restrictive, as we only want to ensure the relation
// between annotations, not the whole type.
isSubtype = checker.getQualifierHierarchy().isSubtype(
exprType.getEffectiveAnnotations(),
castType.getEffectiveAnnotations());
=======
if (checker.getLintOption("cast:strict", false)) {
AnnotatedTypeMirror newCastType;
if (castType.getKind() == TypeKind.TYPEVAR) {
newCastType = ((AnnotatedTypeVariable)castType).getEffectiveUpperBound();
} else {
newCastType = castType;
}
AnnotatedTypeMirror newExprType;
if (exprType.getKind() == TypeKind.TYPEVAR) {
newExprType = ((AnnotatedTypeVariable)exprType).getEffectiveUpperBound();
} else {
newExprType = exprType;
}
isSubtype = checker.getTypeHierarchy().isSubtype(newExprType, newCastType);
if (isSubtype) {
if (newCastType.getKind() == TypeKind.ARRAY &&
newExprType.getKind() != TypeKind.ARRAY) {
// Always warn if the cast contains an array, but the expression
// doesn't, as in "(Object[]) o" where o is of type Object
isSubtype = false;
} else if (newCastType.getKind() == TypeKind.DECLARED &&
newExprType.getKind() == TypeKind.DECLARED) {
int castSize = ((AnnotatedDeclaredType) newCastType).getTypeArguments().size();
int exprSize = ((AnnotatedDeclaredType) newExprType).getTypeArguments().size();
if (castSize != exprSize) {
// Always warn if the cast and expression contain a different number of
// type arguments, e.g. to catch a cast from "Object" to "List<@NonNull Object>".
// TODO: the same number of arguments actually doesn't guarantee anything.
isSubtype = false;
}
}
}
} else {
// Only check the main qualifiers, ignoring array components and type arguments.
isSubtype = checker.getQualifierHierarchy().isSubtype(exprType.getEffectiveAnnotations(),
castType.getEffectiveAnnotations());
}
>>>>>>>
if (checker.getLintOption("cast:strict", false)) {
AnnotatedTypeMirror newCastType;
if (castType.getKind() == TypeKind.TYPEVAR) {
newCastType = ((AnnotatedTypeVariable)castType).getEffectiveUpperBound();
} else {
newCastType = castType;
}
AnnotatedTypeMirror newExprType;
if (exprType.getKind() == TypeKind.TYPEVAR) {
newExprType = ((AnnotatedTypeVariable)exprType).getEffectiveUpperBound();
} else {
newExprType = exprType;
}
isSubtype = checker.getTypeHierarchy().isSubtype(newExprType, newCastType);
if (isSubtype) {
if (newCastType.getKind() == TypeKind.ARRAY &&
newExprType.getKind() != TypeKind.ARRAY) {
// Always warn if the cast contains an array, but the expression
// doesn't, as in "(Object[]) o" where o is of type Object
isSubtype = false;
} else if (newCastType.getKind() == TypeKind.DECLARED &&
newExprType.getKind() == TypeKind.DECLARED) {
int castSize = ((AnnotatedDeclaredType) newCastType).getTypeArguments().size();
int exprSize = ((AnnotatedDeclaredType) newExprType).getTypeArguments().size();
if (castSize != exprSize) {
// Always warn if the cast and expression contain a different number of
// type arguments, e.g. to catch a cast from "Object" to "List<@NonNull Object>".
// TODO: the same number of arguments actually doesn't guarantee anything.
isSubtype = false;
}
}
}
} else {
// Only check the main qualifiers, ignoring array components and type arguments.
isSubtype = checker.getQualifierHierarchy().isSubtype(exprType.getEffectiveAnnotations(),
castType.getEffectiveAnnotations());
}
<<<<<<<
boolean success = checker.isSubtype(valueType, varType);
if (success) {
for (Class<? extends Annotation> mono : checker.getSupportedMonotonicTypeQualifiers()) {
if (valueType.hasAnnotation(mono) && varType.hasAnnotation(mono)) {
checker.report(Result.failure("monotonic.type.incompatible",
mono.getCanonicalName(), mono.getCanonicalName(), valueType.toString()), valueTree);
return;
}
}
}
=======
boolean success = checker.getTypeHierarchy().isSubtype(valueType, varType);
>>>>>>>
boolean success = checker.getTypeHierarchy().isSubtype(valueType, varType);
if (success) {
for (Class<? extends Annotation> mono : checker.getSupportedMonotonicTypeQualifiers()) {
if (valueType.hasAnnotation(mono) && varType.hasAnnotation(mono)) {
checker.report(Result.failure("monotonic.type.incompatible",
mono.getCanonicalName(), mono.getCanonicalName(), valueType.toString()), valueTree);
return;
}
}
}
<<<<<<<
boolean b = checker.isSubtype(dt, receiver)
|| checker.isSubtype(receiver, dt);
=======
boolean b = checker.getTypeHierarchy().isSubtype(dt, receiver) ||
checker.getTypeHierarchy().isSubtype(receiver, dt);
>>>>>>>
boolean b = checker.getTypeHierarchy().isSubtype(dt, receiver) ||
checker.getTypeHierarchy().isSubtype(receiver, dt);
<<<<<<<
boolean success = checker.isSubtype(overrider.getReturnType(),
overridden.getReturnType());
=======
boolean success = checker.getTypeHierarchy().isSubtype(overrider.getReturnType(),
overridden.getReturnType());
>>>>>>>
boolean success = checker.getTypeHierarchy().isSubtype(overrider.getReturnType(),
overridden.getReturnType());
<<<<<<<
* @param node the method invocation to check
* @return true if this is a super call to the {@link Enum} constructor
*/
private static boolean isEnumSuper(MethodInvocationTree node) {
ExecutableElement ex = TreeUtils.elementFromUse(node);
Name name = ElementUtils.getQualifiedClassName(ex);
return "java.lang.Enum".contentEquals(name);
}
/**
=======
>>>>>>>
* @param node the method invocation to check
* @return true if this is a super call to the {@link Enum} constructor
*/
private static boolean isEnumSuper(MethodInvocationTree node) {
ExecutableElement ex = TreeUtils.elementFromUse(node);
Name name = ElementUtils.getQualifiedClassName(ex);
return "java.lang.Enum".contentEquals(name);
}
/** |
<<<<<<<
import checkers.util.MultiGraphQualifierHierarchy.MultiGraphFactory;
=======
>>>>>>>
import checkers.util.MultiGraphQualifierHierarchy.MultiGraphFactory;
<<<<<<<
private boolean substituteUnused(Tree tree, AnnotatedTypeMirror type) {
if (tree.getKind() != Tree.Kind.MEMBER_SELECT
&& tree.getKind() != Tree.Kind.IDENTIFIER)
return false;
Element field = InternalUtils.symbol(tree);
if (field == null || field.getKind() != ElementKind.FIELD)
return false;
AnnotationMirror unused = getDeclAnnotation(field, Unused.class);
if (unused == null) {
return false;
}
Name whenName = AnnotationUtils.getElementValueClassName(unused, "when", false);
MethodTree method = TreeUtils.enclosingMethod(this.getPath(tree));
if (TreeUtils.isConstructor(method)) {
/* TODO: this is messy and should be cleaned up.
* The problem is that "receiver" means something different in
* constructors and methods. Should we adapt .getReceiverType to do something
* different in constructors vs. methods?
* Or should we change this annotation into a declaration annotation?
*/
com.sun.tools.javac.code.Symbol meth =
(com.sun.tools.javac.code.Symbol)TreeUtils.elementFromDeclaration(method);
com.sun.tools.javac.util.List<TypeCompound> retannos = meth.getRawTypeAttributes();
if (retannos == null) {
return false;
}
boolean matched = false;
for (TypeCompound anno : retannos) {
if (anno.getAnnotationType().toString().equals(whenName.toString())) {
matched = true;
break;
}
}
if (!matched) {
return false;
}
} else {
AnnotatedTypeMirror receiver = generalFactory.getReceiverType((ExpressionTree)tree);
Elements elements = processingEnv.getElementUtils();
if (receiver == null || !receiver.hasAnnotation(elements.getName(whenName))) {
return false;
}
}
type.replaceAnnotation(NULLABLE);
return true;
}
// Cache for the nullness annotations
protected Set<Class<? extends Annotation>> nullnessAnnos;
/**
* @return The list of annotations of the non-null type system.
*/
public Set<Class<? extends Annotation>> getNullnessAnnotations() {
if (nullnessAnnos == null) {
Set<Class<? extends Annotation>> result = new HashSet<>();
result.add(NonNull.class);
result.add(MonotonicNonNull.class);
result.add(Nullable.class);
result.add(PolyNull.class);
result.add(PolyAll.class);
nullnessAnnos = Collections.unmodifiableSet(result);
}
return nullnessAnnos;
}
@Override
public Set<Class<? extends Annotation>> getInvalidConstructorReturnTypeAnnotations() {
Set<Class<? extends Annotation>> l = new HashSet<>(
super.getInvalidConstructorReturnTypeAnnotations());
l.addAll(getNullnessAnnotations());
return l;
}
@Override
public AnnotationMirror getFieldInvariantAnnotation() {
Elements elements = processingEnv.getElementUtils();
return AnnotationUtils.fromClass(elements, NonNull.class);
}
@Override
public QualifierHierarchy createQualifierHierarchy(MultiGraphFactory factory) {
return new NullnessQualifierHierarchy(factory, (Object[]) null);
}
protected class NullnessQualifierHierarchy extends InitializationQualifierHierarchy {
public NullnessQualifierHierarchy(MultiGraphFactory f, Object[] arg) {
super(f, arg);
}
@Override
public boolean isSubtype(AnnotationMirror rhs, AnnotationMirror lhs) {
if (isInitializationAnnotation(rhs) ||
isInitializationAnnotation(lhs)) {
return this.isSubtypeInitialization(rhs, lhs);
}
return super.isSubtype(rhs, lhs);
}
@Override
public AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2) {
if (isInitializationAnnotation(a1) ||
isInitializationAnnotation(a2)) {
return this.leastUpperBoundInitialization(a1, a2);
}
return super.leastUpperBound(a1, a2);
}
}
=======
>>>>>>>
// Cache for the nullness annotations
protected Set<Class<? extends Annotation>> nullnessAnnos;
/**
* @return The list of annotations of the non-null type system.
*/
public Set<Class<? extends Annotation>> getNullnessAnnotations() {
if (nullnessAnnos == null) {
Set<Class<? extends Annotation>> result = new HashSet<>();
result.add(NonNull.class);
result.add(MonotonicNonNull.class);
result.add(Nullable.class);
result.add(PolyNull.class);
result.add(PolyAll.class);
nullnessAnnos = Collections.unmodifiableSet(result);
}
return nullnessAnnos;
}
@Override
public Set<Class<? extends Annotation>> getInvalidConstructorReturnTypeAnnotations() {
Set<Class<? extends Annotation>> l = new HashSet<>(
super.getInvalidConstructorReturnTypeAnnotations());
l.addAll(getNullnessAnnotations());
return l;
}
@Override
public AnnotationMirror getFieldInvariantAnnotation() {
Elements elements = processingEnv.getElementUtils();
return AnnotationUtils.fromClass(elements, NonNull.class);
}
@Override
public QualifierHierarchy createQualifierHierarchy(MultiGraphFactory factory) {
return new NullnessQualifierHierarchy(factory, (Object[]) null);
}
protected class NullnessQualifierHierarchy extends InitializationQualifierHierarchy {
public NullnessQualifierHierarchy(MultiGraphFactory f, Object[] arg) {
super(f, arg);
}
@Override
public boolean isSubtype(AnnotationMirror rhs, AnnotationMirror lhs) {
if (isInitializationAnnotation(rhs) ||
isInitializationAnnotation(lhs)) {
return this.isSubtypeInitialization(rhs, lhs);
}
return super.isSubtype(rhs, lhs);
}
@Override
public AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2) {
if (isInitializationAnnotation(a1) ||
isInitializationAnnotation(a2)) {
return this.leastUpperBoundInitialization(a1, a2);
}
return super.leastUpperBound(a1, a2);
}
} |
<<<<<<<
public <T extends @Nullable java.lang.annotation.Annotation> @Nullable T getAnnotation(Class<@NonNull T> a1) { throw new RuntimeException("skeleton method"); }
=======
public <T extends java.lang.annotation. @Nullable Annotation> T getAnnotation(@NonNull Class<@NonNull T> a1) { throw new RuntimeException("skeleton method"); }
>>>>>>>
public <T extends java.lang.annotation. @Nullable Annotation> @Nullable T getAnnotation(Class<@NonNull T> a1) { throw new RuntimeException("skeleton method"); } |
<<<<<<<
import org.checkerframework.framework.type.*;
import org.checkerframework.framework.type.treeannotator.ListTreeAnnotator;
import org.checkerframework.framework.type.treeannotator.TreeAnnotator;
=======
import org.checkerframework.framework.type.AnnotatedTypeMirror;
import org.checkerframework.framework.type.ListTreeAnnotator;
import org.checkerframework.framework.type.QualifierHierarchy;
import org.checkerframework.framework.type.TreeAnnotator;
>>>>>>>
import org.checkerframework.framework.type.AnnotatedTypeMirror;
import org.checkerframework.framework.type.QualifierHierarchy;
import org.checkerframework.framework.type.treeannotator.ListTreeAnnotator;
import org.checkerframework.framework.type.treeannotator.TreeAnnotator; |
<<<<<<<
=======
import org.checkerframework.qualframework.base.dataflow.QualAnalysis;
import org.checkerframework.qualframework.base.dataflow.QualTransferAdapter;
import org.checkerframework.qualframework.util.WrappedAnnotatedTypeMirror;
>>>>>>>
import org.checkerframework.qualframework.base.dataflow.QualAnalysis;
import org.checkerframework.qualframework.base.dataflow.QualTransferAdapter;
import org.checkerframework.qualframework.util.WrappedAnnotatedTypeMirror; |
<<<<<<<
@AssertNonNullAfter("b")
void init_b() @Raw {
=======
void init_b(@Raw RawMethodInvocation this) {
>>>>>>>
@AssertNonNullAfter("b")
void init_b(@Raw RawMethodInvocation this) {
<<<<<<<
@AssertNonNullAfter({"a", "b"})
void init_ab() @Raw {
=======
void init_ab(@Raw RawMethodInvocation this) {
>>>>>>>
@AssertNonNullAfter({"a", "b"})
void init_ab(@Raw RawMethodInvocation this) { |
<<<<<<<
import org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedWildcardType;
=======
import org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedUnionType;
>>>>>>>
import org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedUnionType;
import org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedWildcardType; |
<<<<<<<
import static com.google.common.base.Preconditions.checkArgument;
import com.google.gerrit.index.IndexConfig;
import com.google.gerrit.lifecycle.LifecycleModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.index.IndexModule;
import com.google.gerrit.server.index.OnlineUpgrader;
import com.google.gerrit.server.index.SingleVersionModule;
import com.google.gerrit.server.index.VersionManager;
=======
import com.google.gerrit.server.index.AbstractIndexModule;
import com.google.gerrit.server.index.AbstractVersionManager;
>>>>>>>
import com.google.gerrit.server.index.AbstractIndexModule;
import com.google.gerrit.server.index.VersionManager;
<<<<<<<
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.google.inject.assistedinject.FactoryModuleBuilder;
=======
>>>>>>>
<<<<<<<
public class ElasticIndexModule extends AbstractModule {
=======
public class ElasticIndexModule extends AbstractIndexModule {
>>>>>>>
public class ElasticIndexModule extends AbstractIndexModule {
<<<<<<<
private final Map<String, Integer> singleVersions;
private final int threads;
private final boolean onlineUpgrade;
private ElasticIndexModule(
Map<String, Integer> singleVersions, int threads, boolean onlineUpgrade) {
if (singleVersions != null) {
checkArgument(!onlineUpgrade, "online upgrade is incompatible with single version map");
}
this.singleVersions = singleVersions;
this.threads = threads;
this.onlineUpgrade = onlineUpgrade;
=======
private ElasticIndexModule(Map<String, Integer> singleVersions, int threads) {
super(singleVersions, threads);
>>>>>>>
private ElasticIndexModule(
Map<String, Integer> singleVersions, int threads, boolean onlineUpgrade) {
super(singleVersions, threads, onlineUpgrade); |
<<<<<<<
import checkers.util.ElementUtils;
=======
>>>>>>>
<<<<<<<
SourceChecker.errorAbort("TypeFromElement.annotateTypeParam(class): " +
"invalid type parameter index " + typeAnno.position.parameter_index + " for annotation: " + typeAnno + " in class: " + clsElt);
=======
ErrorReporter.errorAbort("TypeFromElement.annotateTypeParam(class): " +
"invalid type paramter index " + typeAnno.position.parameter_index + " for annotation: " + typeAnno + " in class: " + clsElt);
>>>>>>>
ErrorReporter.errorAbort("TypeFromElement.annotateTypeParam(class): " +
"invalid type parameter index " + typeAnno.position.parameter_index + " for annotation: " + typeAnno + " in class: " + clsElt);
<<<<<<<
// SourceChecker.errorAbort("TypeFromElement.getLocationTypeADT: " +
=======
// TODO: annotations on enclosing classes (e.g. @A Map.Entry<K, V>) not handled yet
// ErrorReporter.errorAbort("TypeFromElement.getLocationTypeADT: " +
>>>>>>>
// ErrorReporter.errorAbort("TypeFromElement.getLocationTypeADT: " +
<<<<<<<
private static AnnotatedTypeMirror getLocationTypeAAT(AnnotatedArrayType type, List<TypePathEntry> location) {
if (debug) {
System.out.println("getLocationTypeAAT type: " + type + " location: " + location);
}
if (location.size() >= 1 &&
location.get(0).tag.equals(TypePathEntryKind.ARRAY)) {
AnnotatedTypeMirror comptype = type.getComponentType();
return getLocationTypeATM(comptype, tail(location));
=======
private static AnnotatedTypeMirror getLocationTypeAAT(AnnotatedArrayType type, List<Integer> location) {
if (location.size() >= 1) {
int arrayIndex = location.get(0);
List<AnnotatedTypeMirror> arrays = createArraysList(type);
if (arrayIndex < arrays.size()) {
return getLocationTypeATM(arrays.get(arrayIndex), tail(location));
} else {
ErrorReporter.errorAbort("TypeFromElement.annotateAAT: " +
"invalid location " + location + " for type: " + type);
return null; // dead code
}
>>>>>>>
private static AnnotatedTypeMirror getLocationTypeAAT(AnnotatedArrayType type, List<TypePathEntry> location) {
if (debug) {
System.out.println("getLocationTypeAAT type: " + type + " location: " + location);
}
if (location.size() >= 1 &&
location.get(0).tag.equals(TypePathEntryKind.ARRAY)) {
AnnotatedTypeMirror comptype = type.getComponentType();
return getLocationTypeATM(comptype, tail(location));
<<<<<<<
=======
private static List<AnnotatedTypeMirror> createArraysList(AnnotatedArrayType array) {
LinkedList<AnnotatedTypeMirror> arrays = new LinkedList<AnnotatedTypeMirror>();
// I think that type can never be null
AnnotatedTypeMirror type = array;
while (type != null && type.getKind() == TypeKind.ARRAY) {
arrays.addLast(type);
type = ((AnnotatedArrayType)type).getComponentType();
}
// The annotation on the first array component is added by the non-array annotation,
// e.g. FIELD.
arrays.removeFirst();
// adding the component type at the end
if (type != null) {
arrays.addLast(type);
} else if (strict) {
ErrorReporter.errorAbort("TypeFromElement.createArraysList: " +
"null component type for array: " + array);
}
return arrays;
}
>>>>>>> |
<<<<<<<
// Captured types can have a generic element (owner) that is
// not an element at all, namely Symtab.noSymbol.
if (InternalUtils.isCaptured(typeVar)) {
return type;
} else {
throw new CheckerError("TypeFromTree.forTypeVariable: not a supported element: " + elt);
}
=======
SourceChecker.errorAbort("TypeFromTree.forTypeVariable: not a supported element: " + elt);
return null; // dead code
>>>>>>>
SourceChecker.errorAbort("TypeFromTree.forTypeVariable: not a supported element: " + elt);
return null; // dead code
} |
<<<<<<<
=======
import org.checkerframework.javacutil.AnnotationUtils;
import org.checkerframework.qualframework.base.AnnotationConverter;
>>>>>>>
import org.checkerframework.javacutil.AnnotationUtils;
import org.checkerframework.qualframework.base.AnnotationConverter;
<<<<<<<
String name = "Main";
String annoName = getAnnotationTypeName(anno);
Wildcard<Tainting> value = lookup.get(annoName);
Wildcard<Tainting> oldValue = params.get(name);
if (oldValue != null) {
value = value.combineWith(oldValue, lubOp, lubOp);
=======
Tainting result = fromAnnotation(anno);
if (result != null) {
return result;
>>>>>>>
String name = "Main";
Wildcard<Tainting> value = fromAnnotation(anno);
if (value == null) {
continue;
}
Wildcard<Tainting> oldValue = params.get(name);
if (oldValue != null) {
value = value.combineWith(oldValue, lubOp, lubOp);
<<<<<<<
String name = getAnnotationTypeName(anno);
return lookup.containsKey(name);
}
@Override
public Set<String> getDeclaredParameters(Element elt) {
Set<String> result = new HashSet<>();
for (Annotation a : elt.getAnnotationsByType(TaintingParam.class)) {
result.add(((TaintingParam)a).value());
}
return result;
=======
return fromAnnotation(anno) != null;
>>>>>>>
String name = AnnotationUtils.annotationName(anno);
return lookup.containsKey(name);
}
@Override
public Set<String> getDeclaredParameters(Element elt) {
Set<String> result = new HashSet<>();
for (Annotation a : elt.getAnnotationsByType(TaintingParam.class)) {
result.add(((TaintingParam)a).value());
}
return result; |
<<<<<<<
=======
import static com.google.gerrit.acceptance.GitUtil.cloneProject;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
>>>>>>>
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
<<<<<<<
=======
import org.eclipse.jgit.transport.PushResult;
import org.joda.time.DateTime;
import org.joda.time.DateTimeUtils;
import org.joda.time.DateTimeUtils.MillisProvider;
import org.junit.AfterClass;
>>>>>>>
import org.joda.time.DateTime;
import org.joda.time.DateTimeUtils;
import org.joda.time.DateTimeUtils.MillisProvider;
import org.junit.AfterClass;
<<<<<<<
assertThat(cr.all.get(0).value).isEqualTo(1);
=======
assertThat(cr.all.get(0).value.intValue()).is(1);
assertThat(Iterables.getLast(ci.messages).message).isEqualTo(
"Uploaded patch set 1: Code-Review+1.");
>>>>>>>
assertThat(cr.all.get(0).value).isEqualTo(1);
assertThat(Iterables.getLast(ci.messages).message).isEqualTo(
"Uploaded patch set 1: Code-Review+1.");
<<<<<<<
assertThat(cr.all.get(0).value).isEqualTo(2);
=======
assertThat(cr.all.get(0).value.intValue()).is(2);
push =
pushFactory.create(db, admin.getIdent(), PushOneCommit.SUBJECT,
"c.txt", "moreContent", r.getChangeId());
r = push.to(git, "refs/for/master/%l=Code-Review+2");
ci = get(r.getChangeId());
assertThat(Iterables.getLast(ci.messages).message).isEqualTo(
"Uploaded patch set 3.");
>>>>>>>
assertThat(cr.all.get(0).value).isEqualTo(2);
push =
pushFactory.create(db, admin.getIdent(), testRepo, PushOneCommit.SUBJECT,
"c.txt", "moreContent", r.getChangeId());
r = push.to("refs/for/master/%l=Code-Review+2");
ci = get(r.getChangeId());
assertThat(Iterables.getLast(ci.messages).message).isEqualTo(
"Uploaded patch set 3."); |
<<<<<<<
import org.checkerframework.framework.type.treeannotator.ListTreeAnnotator;
import org.checkerframework.framework.type.treeannotator.TreeAnnotator;
import org.checkerframework.framework.type.typeannotator.TypeAnnotator;
import org.checkerframework.framework.util.MultiGraphQualifierHierarchy;
=======
import org.checkerframework.framework.util.GraphQualifierHierarchy;
>>>>>>>
import org.checkerframework.framework.type.treeannotator.ListTreeAnnotator;
import org.checkerframework.framework.type.treeannotator.TreeAnnotator;
import org.checkerframework.framework.util.GraphQualifierHierarchy; |
<<<<<<<
Receiver method = FlowExpressions.internalReprOf(analysis.getTypeFactory(),
n);
=======
Receiver method = FlowExpressions.internalReprOf(analysis.getFactory(),
n, true);
>>>>>>>
Receiver method = FlowExpressions.internalReprOf(analysis.getTypeFactory(),
n, true); |
<<<<<<<
=======
import com.google.gerrit.jgit.diff.ReplaceEdit;
import com.google.gerrit.testing.GerritBaseTests;
>>>>>>>
import com.google.gerrit.jgit.diff.ReplaceEdit; |
<<<<<<<
private void sendPresenceExtension(ExtensionElement extension)
=======
@Override
void onJvbConferenceWillStop(JvbConference jvbConference, int reasonCode,
String reason)
{}
private void sendPresenceExtension(PacketExtension extension)
>>>>>>>
@Override
void onJvbConferenceWillStop(JvbConference jvbConference, int reasonCode,
String reason)
{}
private void sendPresenceExtension(ExtensionElement extension) |
<<<<<<<
import com.google.common.base.Strings;
=======
import com.google.common.collect.Lists;
>>>>>>>
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
<<<<<<<
if (!updatedSubscribers.add(s.getSuperProject())) {
log.error("Possible circular subscription involving "
+ s.toString());
} else {
Map<Branch.NameKey, ObjectId> modules = new HashMap<>(1);
modules.put(updatedBranch, mergedCommit);
Map<Branch.NameKey, String> paths = new HashMap<>(1);
paths.put(updatedBranch, s.getPath());
try {
=======
try {
if (!updatedSubscribers.add(s.getSuperProject())) {
log.error("Possible circular subscription involving " + s);
} else {
Map<Branch.NameKey, ObjectId> modules =
new HashMap<Branch.NameKey, ObjectId>(1);
modules.put(updatedBranch, mergedCommit);
Map<Branch.NameKey, String> paths =
new HashMap<Branch.NameKey, String>(1);
paths.put(updatedBranch, s.getPath());
>>>>>>>
try {
if (!updatedSubscribers.add(s.getSuperProject())) {
log.error("Possible circular subscription involving " + s);
} else {
Map<Branch.NameKey, ObjectId> modules = new HashMap<>(1);
modules.put(updatedBranch, mergedCommit);
Map<Branch.NameKey, String> paths = new HashMap<>(1);
paths.put(updatedBranch, s.getPath()); |
<<<<<<<
private boolean addFavourite() {
AlertDialog.Builder builder = new AlertDialog.Builder(this, AlertDialog.THEME_DEVICE_DEFAULT_DARK);
=======
private boolean showDialogWithApps(int position) {
AlertDialog.Builder builder = null;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
builder = new AlertDialog.Builder(this, AlertDialog.THEME_DEVICE_DEFAULT_DARK);
}
>>>>>>>
private boolean addFavourite() {
AlertDialog.Builder builder = null;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
builder = new AlertDialog.Builder(this, AlertDialog.THEME_DEVICE_DEFAULT_DARK);
} |
<<<<<<<
=======
private AccountIndexedCounter accountIndexedCounter;
private RegistrationHandle accountIndexEventCounterHandle;
private RefUpdateCounter refUpdateCounter;
private RegistrationHandle refUpdateCounterHandle;
private BasicCookieStore httpCookieStore;
private CloseableHttpClient httpclient;
@Before
public void addAccountIndexEventCounter() {
accountIndexedCounter = new AccountIndexedCounter();
accountIndexEventCounterHandle = accountIndexedListeners.add("gerrit", accountIndexedCounter);
}
@After
public void removeAccountIndexEventCounter() {
if (accountIndexEventCounterHandle != null) {
accountIndexEventCounterHandle.remove();
}
}
@Before
public void addRefUpdateCounter() {
refUpdateCounter = new RefUpdateCounter();
refUpdateCounterHandle = refUpdateListeners.add("gerrit", refUpdateCounter);
}
@After
public void removeRefUpdateCounter() {
if (refUpdateCounterHandle != null) {
refUpdateCounterHandle.remove();
}
}
>>>>>>>
private BasicCookieStore httpCookieStore;
private CloseableHttpClient httpclient;
<<<<<<<
=======
private Config getAccountConfig(TestRepository<?> allUsersRepo) throws Exception {
Config ac = new Config();
try (TreeWalk tw =
TreeWalk.forPath(
allUsersRepo.getRepository(),
AccountProperties.ACCOUNT_CONFIG,
getHead(allUsersRepo.getRepository(), "HEAD").getTree())) {
assertThat(tw).isNotNull();
ac.fromText(
new String(
allUsersRepo
.getRevWalk()
.getObjectReader()
.open(tw.getObjectId(0), OBJ_BLOB)
.getBytes(),
UTF_8));
}
return ac;
}
private AccountApi accountIdApi() throws RestApiException {
return gApi.accounts().id(user.id().get());
}
private Set<String> getCookiesNames() {
Set<String> cookieNames =
httpCookieStore.getCookies().stream()
.map(cookie -> cookie.getName())
.collect(Collectors.toSet());
return cookieNames;
}
private void webLogin(Integer accountId) throws IOException, ClientProtocolException {
httpGetAndAssertStatus(
"login?account_id=" + accountId, HttpServletResponse.SC_MOVED_TEMPORARILY);
}
private void httpGetAndAssertStatus(String urlPath, int expectedHttpStatus)
throws ClientProtocolException, IOException {
HttpGet httpGet = new HttpGet(canonicalWebUrl.get() + urlPath);
HttpResponse loginResponse = httpclient.execute(httpGet);
assertThat(loginResponse.getStatusLine().getStatusCode()).isEqualTo(expectedHttpStatus);
}
/** Checks if an account is indexed the correct number of times. */
private static class AccountIndexedCounter implements AccountIndexedListener {
private final AtomicLongMap<Integer> countsByAccount = AtomicLongMap.create();
@Override
public void onAccountIndexed(int id) {
countsByAccount.incrementAndGet(id);
}
void clear() {
countsByAccount.clear();
}
long getCount(Account.Id accountId) {
return countsByAccount.get(accountId.get());
}
void assertReindexOf(TestAccount testAccount) {
assertReindexOf(testAccount, 1);
}
void assertReindexOf(AccountInfo accountInfo) {
assertReindexOf(new Account.Id(accountInfo._accountId), 1);
}
void assertReindexOf(TestAccount testAccount, int expectedCount) {
assertThat(getCount(testAccount.id())).isEqualTo(expectedCount);
assertThat(countsByAccount).hasSize(1);
clear();
}
void assertReindexOf(Account.Id accountId, int expectedCount) {
assertThat(getCount(accountId)).isEqualTo(expectedCount);
countsByAccount.remove(accountId.get());
}
void assertNoReindex() {
assertThat(countsByAccount).isEmpty();
}
}
>>>>>>>
private AccountApi accountIdApi() throws RestApiException {
return gApi.accounts().id(user.id().get());
}
private Set<String> getCookiesNames() {
Set<String> cookieNames =
httpCookieStore.getCookies().stream()
.map(cookie -> cookie.getName())
.collect(Collectors.toSet());
return cookieNames;
}
private void webLogin(Integer accountId) throws IOException, ClientProtocolException {
httpGetAndAssertStatus(
"login?account_id=" + accountId, HttpServletResponse.SC_MOVED_TEMPORARILY);
}
private void httpGetAndAssertStatus(String urlPath, int expectedHttpStatus)
throws ClientProtocolException, IOException {
HttpGet httpGet = new HttpGet(canonicalWebUrl.get() + urlPath);
HttpResponse loginResponse = httpclient.execute(httpGet);
assertThat(loginResponse.getStatusLine().getStatusCode()).isEqualTo(expectedHttpStatus);
} |
<<<<<<<
public Builder(String metric, List<String> fields, Map<String, String> tags) {
this.query.setMetric(metric);
this.query.setTags(tags);
this.query.setFields(fields);
}
=======
public Builder(String metric) {
this.query.setMetric(metric);
}
>>>>>>>
public Builder(String metric, List<String> fields, Map<String, String> tags) {
this.query.setMetric(metric);
this.query.setTags(tags);
this.query.setFields(fields); |
<<<<<<<
import techreborn.tiles.generator.advanced.TileSemiFluidGenerator;
=======
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.TRBuilder;
import techreborn.tiles.generator.TileSemiFluidGenerator;
>>>>>>>
import techreborn.tiles.generator.advanced.TileSemiFluidGenerator;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.TRBuilder; |
<<<<<<<
import techreborn.client.gui.widget.GuiButtonHologram;
import techreborn.init.TRContent;
import techreborn.proxies.ClientProxy;
import techreborn.tiles.machine.multiblock.TileImplosionCompressor;
=======
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.init.ModBlocks;
import techreborn.tiles.multiblock.TileImplosionCompressor;
>>>>>>>
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileImplosionCompressor;
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
<<<<<<<
this.addComponent(x, y, z, TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState(), multiblock);
=======
addComponent(x, y, z, ModBlocks.MACHINE_CASINGS.getDefaultState().withProperty(BlockMachineCasing.TYPE, "reinforced"), multiblock);
>>>>>>>
this.addComponent(x, y, z, TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState(), multiblock); |
<<<<<<<
builder.drawSlotTab(this, guiLeft, guiTop, p_146976_2_, p_146976_3_, upgrades, new ItemStack(TRContent.WRENCH));
this.mc.getTextureManager().bindTexture(GuiIronFurnace.texture);
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
=======
builder.drawSlotTab(this, guiLeft - 24, guiTop + 6, new ItemStack(ModItems.WRENCH));
mc.getTextureManager().bindTexture(GuiIronFurnace.texture);
final int k = (this.width - xSize) / 2;
final int l = (this.height - ySize) / 2;
drawTexturedModalRect(k, l, 0, 0, xSize, ySize);
>>>>>>>
builder.drawSlotTab(this, guiLeft - 24, guiTop + 6, new ItemStack(TRContent.WRENCH));
mc.getTextureManager().bindTexture(GuiIronFurnace.texture);
final int k = (this.width - xSize) / 2;
final int l = (this.height - ySize) / 2;
drawTexturedModalRect(k, l, 0, 0, xSize, ySize); |
<<<<<<<
import techreborn.TechReborn;
import techreborn.client.container.IContainerProvider;
import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.container.builder.ContainerBuilder;
=======
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
import techreborn.lib.ModInfo;
>>>>>>>
import techreborn.TechReborn;
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder; |
<<<<<<<
LogHelper.info("PreInitialization Complete");
=======
LogHelper.info("PreInitialization Complete");
ProgressManager.pop(bar);
>>>>>>>
LogHelper.info("PreInitialization Complete");
ProgressManager.pop(bar);
<<<<<<<
// Register Fluids
ModFluids.init();
=======
bar.step("Loading Items");
>>>>>>>
bar.step("Loading Fluids");
// Register Fluids
ModFluids.init();
bar.step("Loading Items");
<<<<<<<
//Client only init, needs to be done before parts system
proxy.init();
=======
bar.step("Loading Compat");
>>>>>>>
bar.step("Loading Client things");
//Client only init, needs to be done before parts system
proxy.init();
bar.step("Loading Compat");
<<<<<<<
//RecipeHanderer.addOreDicRecipes();
LogHelper.info(RecipeHanderer.recipeList.size() + " recipes loaded");
}
@Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event){
event.registerServerCommand(new TechRebornDevCommand());
}
@SubscribeEvent
public void onConfigChanged(
ConfigChangedEvent.OnConfigChangedEvent cfgChange)
{
if (cfgChange.modID.equals("TechReborn")) {
ConfigTechReborn.Configs();
}
=======
ProgressManager.pop(bar);
>>>>>>>
//RecipeHanderer.addOreDicRecipes();
LogHelper.info(RecipeHanderer.recipeList.size() + " recipes loaded");
ProgressManager.pop(bar);
}
@Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event){
event.registerServerCommand(new TechRebornDevCommand());
}
@SubscribeEvent
public void onConfigChanged(
ConfigChangedEvent.OnConfigChangedEvent cfgChange) {
if (cfgChange.modID.equals("TechReborn")) {
ConfigTechReborn.Configs();
} |
<<<<<<<
=======
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.client.renderer.RenderBlocks;
>>>>>>>
<<<<<<<
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if (connectedSides.containsValue(dir))
vecs3dCubesList.add(boundingBoxes[Functions.getIntDirFromDirection(dir)]);
=======
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{
if (connectedSides.containsKey(dir))
vecs3dCubesList.add(boundingBoxes[Functions
.getIntDirFromDirection(dir)]);
>>>>>>>
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
{
if (connectedSides.containsKey(dir))
vecs3dCubesList.add(boundingBoxes[Functions
.getIntDirFromDirection(dir)]);
<<<<<<<
public boolean renderStatic(Vecs3d translation, RenderHelper renderer, int pass) {
renderer.setOverrideTexture(Blocks.coal_block.getIcon(0, 0));
renderer.renderBox(ModLib2QLib.convert(boundingBoxes[6]));
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if (connectedSides.containsKey(dir))
renderer.renderBox(ModLib2QLib.convert(boundingBoxes[Functions.getIntDirFromDirection(dir)]));
}
return true;
=======
public boolean renderStatic(Vecs3d translation, RenderBlocks renderBlocks,
int pass)
{
return false;
>>>>>>>
public boolean renderStatic(Vecs3d translation, RenderHelper renderer, int pass) {
renderer.setOverrideTexture(Blocks.coal_block.getIcon(0, 0));
renderer.renderBox(ModLib2QLib.convert(boundingBoxes[6]));
if(connectedSides != null){
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if (connectedSides.containsKey(dir))
renderer.renderBox(ModLib2QLib.convert(boundingBoxes[Functions.getIntDirFromDirection(dir)]));
}
}
return true; |
<<<<<<<
=======
import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper;
import techreborn.util.OreUtil;
import techreborn.util.RecipeRemover;
>>>>>>> |
<<<<<<<
import techreborn.tiles.generator.advanced.TileGasTurbine;
=======
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.TRBuilder;
import techreborn.tiles.generator.TileGasTurbine;
>>>>>>>
import techreborn.tiles.generator.advanced.TileGasTurbine;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.TRBuilder; |
<<<<<<<
import reborncore.client.gui.builder.TRBuilder;
import techreborn.tiles.machine.tier1.TileAlloySmelter;
=======
import reborncore.client.guibuilder.GuiBuilder;
import techreborn.tiles.tier1.TileAlloySmelter;
>>>>>>>
import techreborn.tiles.machine.tier1.TileAlloySmelter; |
<<<<<<<
import com.google.gerrit.testutil.ConfigSuite;
=======
import com.google.gerrit.server.project.ListBranches.BranchInfo;
import com.google.gerrit.server.project.PutConfig;
>>>>>>>
<<<<<<<
import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.lib.Config;
=======
>>>>>>>
import org.eclipse.jgit.junit.TestRepository; |
<<<<<<<
import techreborn.tiles.machine.tier1.TileCompressor;
=======
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.TRBuilder;
import techreborn.tiles.tier1.TileCompressor;
>>>>>>>
import techreborn.tiles.machine.tier1.TileCompressor;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.TRBuilder; |
<<<<<<<
import techreborn.TechReborn;
=======
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.StringUtils;
import techreborn.Core;
>>>>>>>
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
import reborncore.common.util.StringUtils;
import techreborn.TechReborn;
<<<<<<<
if (item instanceof IListInfoProvider) {
((IListInfoProvider) item).addInfo(event.getToolTip(), false, false);
} else if (event.getItemStack().getItem() instanceof IEnergyItemInfo) {
IEnergyStorage capEnergy = event.getItemStack().getCapability(CapabilityEnergy.ENERGY, null);
event.getToolTip().add(1,
=======
List<String> tooltip = event.getToolTip();
if (item instanceof IEnergyItemInfo) {
IEnergyStorage capEnergy = new ForgePowerItemManager(event.getItemStack());
tooltip.add(1,
>>>>>>>
if (item instanceof IListInfoProvider) {
((IListInfoProvider) item).addInfo(event.getToolTip(), false, false);
} else if (event.getItemStack().getItem() instanceof IEnergyItemInfo) {
IEnergyStorage capEnergy = new ForgePowerItemManager(event.getItemStack());
event.getToolTip().add(1, |
<<<<<<<
=======
import ic2.core.item.tool.ItemTreetap;
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
>>>>>>>
import ic2.core.item.tool.ItemTreetap;
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
<<<<<<<
=======
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornCore;
>>>>>>>
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.RebornCore;
<<<<<<<
import techreborn.items.ItemTRNoDestroy;
=======
import techreborn.compat.CompatManager;
import techreborn.lib.ModInfo;
>>>>>>>
import techreborn.items.ItemTRNoDestroy;
import techreborn.compat.CompatManager;
import techreborn.lib.ModInfo; |
<<<<<<<
=======
import reborncore.api.tile.IUpgrade;
import reborncore.common.registration.RebornRegistry;
import reborncore.common.registration.impl.ConfigRegistry;
import reborncore.common.util.Inventory;
>>>>>>>
import reborncore.api.tile.IUpgrade;
<<<<<<<
import reborncore.common.registration.RebornRegister;
import reborncore.common.registration.config.ConfigRegistry;
import reborncore.common.util.Inventory;
import techreborn.TechReborn;
import techreborn.init.TRContent;
import techreborn.init.TRTileEntities;
=======
import techreborn.init.ModBlocks;
import techreborn.items.ItemUpgrades;
import techreborn.lib.ModInfo;
>>>>>>>
import reborncore.common.registration.RebornRegister;
import reborncore.common.registration.config.ConfigRegistry;
import reborncore.common.util.Inventory;
import techreborn.TechReborn;
import techreborn.init.TRContent;
import techreborn.init.TRTileEntities; |
<<<<<<<
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
=======
import java.util.List;
import net.minecraft.client.renderer.RenderBlocks;
>>>>>>>
import cpw.mods.fml.relauncher.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.client.renderer.RenderBlocks;
<<<<<<<
import uk.co.qmunity.lib.client.render.RenderHelper;
import java.util.List;
=======
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
>>>>>>>
import uk.co.qmunity.lib.client.render.RenderHelper;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
<<<<<<<
public boolean renderStatic(Vecs3d translation, RenderHelper renderHelper, int pass);
=======
public boolean renderStatic(Vecs3d translation, RenderBlocks renderBlocks,
int pass);
>>>>>>>
public boolean renderStatic(Vecs3d translation, RenderHelper renderHelper, int pass); |
<<<<<<<
import net.minecraft.util.collection.DefaultedList;
=======
import net.minecraft.util.DefaultedList;
import net.minecraft.util.Identifier;
>>>>>>>
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.Identifier; |
<<<<<<<
import techreborn.client.container.IContainerProvider;
import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.container.builder.ContainerBuilder;
import techreborn.init.TRContent;
=======
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
import techreborn.init.ModBlocks;
import techreborn.lib.ModInfo;
>>>>>>>
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
import techreborn.init.TRContent; |
<<<<<<<
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileFluidReplicator;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
=======
import techreborn.blocks.BlockMachineCasing;
import techreborn.init.ModBlocks;
import techreborn.tiles.multiblock.TileFluidReplicator;
>>>>>>>
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileFluidReplicator;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.blocks.BlockMachineCasing; |
<<<<<<<
import reborncore.common.util.StringUtils;
import techreborn.init.TRContent.Dusts;
import techreborn.init.TRContent.Ores;
=======
import techreborn.api.TechRebornAPI;
import techreborn.blocks.BlockMachineFrames;
import techreborn.blocks.cable.BlockCable;
import techreborn.items.ingredients.ItemDusts;
import techreborn.items.ingredients.ItemDustsSmall;
import techreborn.items.ingredients.ItemGems;
import techreborn.items.ingredients.ItemIngots;
import techreborn.items.ingredients.ItemNuggets;
import techreborn.items.ingredients.ItemParts;
import techreborn.items.ingredients.ItemPlates;
>>>>>>>
import reborncore.common.util.StringUtils;
import techreborn.api.TechRebornAPI;
import techreborn.init.TRContent.Dusts;
import techreborn.init.TRContent.Ores;
<<<<<<<
// Blocks
OreUtil.registerOre("fenceIron", TRContent.REFINED_IRON_FENCE);
OreUtil.registerOre("woodRubber", TRContent.RUBBER_LOG);
OreUtil.registerOre("logWood", TRContent.RUBBER_LOG);
OreUtil.registerOre("logRubber", TRContent.RUBBER_LOG);
OreUtil.registerOre("plankWood", TRContent.RUBBER_PLANKS);
OreUtil.registerOre("plankRubber", TRContent.RUBBER_PLANKS);
OreUtil.registerOre("glassReinforced", TRContent.REINFORCED_GLASS);
OreUtil.registerOre("treeSapling", TRContent.RUBBER_SAPLING);
OreUtil.registerOre("saplingRubber", TRContent.RUBBER_SAPLING);
OreUtil.registerOre("slabWood", TRContent.RUBBER_LOG_SLAB_HALF);
OreUtil.registerOre("stairWood", TRContent.RUBBER_LOG_STAIR);
OreUtil.registerOre("treeLeaves", TRContent.RUBBER_LEAVES);
OreUtil.registerOre("leavesRubber", TRContent.RUBBER_LEAVES);
// Parts
OreUtil.registerOre("circuitBasic", TRContent.Parts.ELECTRONIC_CIRCUIT.getStack());
OreUtil.registerOre("circuitAdvanced", TRContent.Parts.ADVANCED_CIRCUIT.getStack());
OreUtil.registerOre("circuitElite", TRContent.Parts.INDUSTRIAL_CIRCUIT.getStack());
OreUtil.registerOre("circuitStorage", TRContent.Parts.DATA_STORAGE_CHIP.getStack());
OreUtil.registerOre("circuitMaster", TRContent.Parts.ENERGY_FLOW_CHIP.getStack());
OreUtil.registerOre("craftingDiamondGrinder", TRContent.Parts.DIAMOND_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingTungstenGrinder", TRContent.Parts.TUNGSTEN_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingSuperconductor", TRContent.Parts.SUPERCONDUCTOR.getStack());
OreUtil.registerOre("materialResin", TRContent.Parts.SAP.getStack());
OreUtil.registerOre("materialRubber", TRContent.Parts.RUBBER.getStack());
OreUtil.registerOre("itemRubber", TRContent.Parts.RUBBER.getStack());
// Frames
OreUtil.registerOre("machineBasic", new ItemStack(TRContent.MachineBlocks.BASIC.getFrame()));
OreUtil.registerOre("machineBlockBasic", new ItemStack(TRContent.MachineBlocks.BASIC.getFrame()));
OreUtil.registerOre("machineBlockAdvanced", new ItemStack(TRContent.MachineBlocks.ADVANCED.getFrame()));
OreUtil.registerOre("machineBlockElite", new ItemStack(TRContent.MachineBlocks.INDUSTRIAL.getFrame()));
// Tools&Armor
OreUtil.registerOre("reBattery", TRContent.RED_CELL_BATTERY);
OreUtil.registerOre("lapotronCrystal", TRContent.LAPOTRON_CRYSTAL);
OreUtil.registerOre("energyCrystal", TRContent.ENERGY_CRYSTAL);
OreUtil.registerOre("drillBasic", TRContent.BASIC_DRILL);
OreUtil.registerOre("drillDiamond", TRContent.ADVANCED_DRILL);
// Misc
=======
if(TechRebornAPI.ic2Helper != null){
TechRebornAPI.ic2Helper.initDuplicates();
}
OreUtil.registerOre("reBattery", ModItems.RE_BATTERY);
OreUtil.registerOre("circuitBasic", ItemParts.getPartByName("electronicCircuit"));
OreUtil.registerOre("circuitAdvanced", ItemParts.getPartByName("advancedCircuit"));
OreUtil.registerOre("circuitStorage", ItemParts.getPartByName("dataStorageCircuit"));
OreUtil.registerOre("circuitElite", ItemParts.getPartByName("dataControlCircuit"));
OreUtil.registerOre("circuitMaster", ItemParts.getPartByName("energyFlowCircuit"));
OreUtil.registerOre("reflectorBasic", ItemParts.getPartByName("neutron_reflector"));
OreUtil.registerOre("reflectorThick", ItemParts.getPartByName("thick_neutron_reflector"));
OreUtil.registerOre("reflectorIridium", ItemParts.getPartByName("iridium_neutron_reflector"));
OreUtil.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("machine", 1));
OreUtil.registerOre("machineBlockAdvanced", BlockMachineFrames.getFrameByName("advancedMachine", 1));
OreUtil.registerOre("machineBlockElite", BlockMachineFrames.getFrameByName("highlyAdvancedMachine", 1));
OreUtil.registerOre("lapotronCrystal", ModItems.LAPOTRONIC_CRYSTAL);
OreUtil.registerOre("energyCrystal", ModItems.ENERGY_CRYSTAL);
OreUtil.registerOre("drillBasic", ModItems.STEEL_DRILL);
OreUtil.registerOre("drillDiamond", ModItems.DIAMOND_DRILL);
>>>>>>>
if(TechRebornAPI.ic2Helper != null){
TechRebornAPI.ic2Helper.initDuplicates();
}
// Blocks
OreUtil.registerOre("fenceIron", TRContent.REFINED_IRON_FENCE);
OreUtil.registerOre("woodRubber", TRContent.RUBBER_LOG);
OreUtil.registerOre("logWood", TRContent.RUBBER_LOG);
OreUtil.registerOre("logRubber", TRContent.RUBBER_LOG);
OreUtil.registerOre("plankWood", TRContent.RUBBER_PLANKS);
OreUtil.registerOre("plankRubber", TRContent.RUBBER_PLANKS);
OreUtil.registerOre("glassReinforced", TRContent.REINFORCED_GLASS);
OreUtil.registerOre("treeSapling", TRContent.RUBBER_SAPLING);
OreUtil.registerOre("saplingRubber", TRContent.RUBBER_SAPLING);
OreUtil.registerOre("slabWood", TRContent.RUBBER_LOG_SLAB_HALF);
OreUtil.registerOre("stairWood", TRContent.RUBBER_LOG_STAIR);
OreUtil.registerOre("treeLeaves", TRContent.RUBBER_LEAVES);
OreUtil.registerOre("leavesRubber", TRContent.RUBBER_LEAVES);
// Parts
OreUtil.registerOre("circuitBasic", TRContent.Parts.ELECTRONIC_CIRCUIT.getStack());
OreUtil.registerOre("circuitAdvanced", TRContent.Parts.ADVANCED_CIRCUIT.getStack());
OreUtil.registerOre("circuitElite", TRContent.Parts.INDUSTRIAL_CIRCUIT.getStack());
OreUtil.registerOre("circuitStorage", TRContent.Parts.DATA_STORAGE_CHIP.getStack());
OreUtil.registerOre("circuitMaster", TRContent.Parts.ENERGY_FLOW_CHIP.getStack());
OreUtil.registerOre("craftingDiamondGrinder", TRContent.Parts.DIAMOND_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingTungstenGrinder", TRContent.Parts.TUNGSTEN_GRINDING_HEAD.getStack());
OreUtil.registerOre("craftingSuperconductor", TRContent.Parts.SUPERCONDUCTOR.getStack());
OreUtil.registerOre("materialResin", TRContent.Parts.SAP.getStack());
OreUtil.registerOre("materialRubber", TRContent.Parts.RUBBER.getStack());
OreUtil.registerOre("itemRubber", TRContent.Parts.RUBBER.getStack());
// Frames
OreUtil.registerOre("machineBasic", new ItemStack(TRContent.MachineBlocks.BASIC.getFrame()));
OreUtil.registerOre("machineBlockBasic", new ItemStack(TRContent.MachineBlocks.BASIC.getFrame()));
OreUtil.registerOre("machineBlockAdvanced", new ItemStack(TRContent.MachineBlocks.ADVANCED.getFrame()));
OreUtil.registerOre("machineBlockElite", new ItemStack(TRContent.MachineBlocks.INDUSTRIAL.getFrame()));
// Tools&Armor
OreUtil.registerOre("reBattery", TRContent.RED_CELL_BATTERY);
OreUtil.registerOre("lapotronCrystal", TRContent.LAPOTRON_CRYSTAL);
OreUtil.registerOre("energyCrystal", TRContent.ENERGY_CRYSTAL);
OreUtil.registerOre("drillBasic", TRContent.BASIC_DRILL);
OreUtil.registerOre("drillDiamond", TRContent.ADVANCED_DRILL);
// Misc |
<<<<<<<
=======
import com.google.gerrit.server.config.AllProjectsName;
import com.google.gerrit.server.config.CanonicalWebUrl;
>>>>>>>
import com.google.gerrit.server.config.AllProjectsName; |
<<<<<<<
=======
import techreborn.items.ingredients.ItemDusts;
import techreborn.items.ingredients.ItemIngots;
>>>>>>>
<<<<<<<
// if (OreUtil.doesOreExistAndValid("ingotBrass")) {
// ItemStack brassStack = getOre("ingotBrass");
// brassStack.setCount(4);
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemIngots.getIngotByName("copper", 3), ItemIngots.getIngotByName("zinc", 1),
// brassStack, 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemIngots.getIngotByName("copper", 3), ItemDusts.getDustByName("zinc", 1),
// brassStack, 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("copper", 3), ItemIngots.getIngotByName("zinc", 1),
// brassStack, 200, 16));
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
// new AlloySmelterRecipe(ItemDusts.getDustByName("copper", 3), ItemDusts.getDustByName("zinc", 1),
// brassStack, 200, 16));
// }
=======
if (OreUtil.doesOreExistAndValid("ingotBrass")) {
ItemStack brassStack = getOre("ingotBrass");
brassStack.setCount(4);
RecipeHandler.addRecipe(
new AlloySmelterRecipe(ingotCopper3, "ingotZinc",
brassStack, 200, 16));
RecipeHandler.addRecipe(
new AlloySmelterRecipe(ingotCopper3, "dustZinc",
brassStack, 200, 16));
RecipeHandler.addRecipe(
new AlloySmelterRecipe(dustCopper3, "ingotZinc",
brassStack, 200, 16));
RecipeHandler.addRecipe(
new AlloySmelterRecipe(dustCopper3, "dustZinc",
brassStack, 200, 16));
}
>>>>>>>
// if (OreUtil.doesOreExistAndValid("ingotBrass")) {
// ItemStack brassStack = getOre("ingotBrass");
// brassStack.setCount(4);
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(ingotCopper3, "ingotZinc",
// brassStack, 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(ingotCopper3, "dustZinc",
// brassStack, 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(dustCopper3, "ingotZinc",
// brassStack, 200, 16));
// RecipeHandler.addRecipe(
// new AlloySmelterRecipe(dustCopper3, "dustZinc",
// brassStack, 200, 16));
// } |
<<<<<<<
import techreborn.client.gui.widget.GuiButtonHologram;
import techreborn.client.gui.widget.GuiButtonUpDown;
import techreborn.init.TRContent;
=======
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
import techreborn.init.ModBlocks;
>>>>>>>
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
import techreborn.init.TRContent; |
<<<<<<<
=======
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.renderer.RenderBlocks;
>>>>>>>
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.renderer.RenderBlocks;
<<<<<<<
public boolean renderStatic(Vecs3d translation, RenderHelper renderBlocks, int pass) {
=======
public boolean renderStatic(Vecs3d translation, RenderBlocks renderBlocks,
int pass)
{
>>>>>>>
public boolean renderStatic(Vecs3d translation, RenderHelper renderBlocks, int pass) { |
<<<<<<<
import techreborn.client.gui.widget.GuiButtonHologram;
import techreborn.init.TRContent;
import techreborn.proxies.ClientProxy;
import techreborn.tiles.machine.multiblock.TileIndustrialGrinder;
=======
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.init.ModBlocks;
import techreborn.tiles.multiblock.TileIndustrialGrinder;
>>>>>>>
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileIndustrialGrinder;
<<<<<<<
this.tile.getPos().getX()
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2);
=======
tile.getPos().getX() - EnumFacing.getFront(tile.getFacingInt()).getFrontOffsetX() * 2,
tile.getPos().getY() - 1,
tile.getPos().getZ() - EnumFacing.getFront(tile.getFacingInt()).getFrontOffsetZ() * 2);
>>>>>>>
this.tile.getPos().getX()
- EnumFacing.byIndex(this.tile.getFacingInt()).getXOffset() * 2,
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
- EnumFacing.byIndex(this.tile.getFacingInt()).getZOffset() * 2); |
<<<<<<<
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
=======
block.setUnlocalizedName(ModInfo.MOD_ID + "." + name);
>>>>>>>
block.setTranslationKey(ModInfo.MOD_ID + "." + name);
<<<<<<<
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
=======
block.setUnlocalizedName(ModInfo.MOD_ID + "." + name);
>>>>>>>
block.setTranslationKey(ModInfo.MOD_ID + "." + name);
<<<<<<<
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
=======
block.setUnlocalizedName(ModInfo.MOD_ID + "." + name);
>>>>>>>
block.setTranslationKey(ModInfo.MOD_ID + "." + name);
<<<<<<<
block.setTranslationKey(ModInfo.MOD_ID + ":" + name);
=======
block.setUnlocalizedName(ModInfo.MOD_ID + "." + name);
>>>>>>>
block.setTranslationKey(ModInfo.MOD_ID + "." + name); |
<<<<<<<
import techreborn.TechReborn;
import techreborn.client.container.IContainerProvider;
import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.container.builder.ContainerBuilder;
import techreborn.init.TRContent;
=======
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
import techreborn.init.ModBlocks;
import techreborn.lib.ModInfo;
>>>>>>>
import techreborn.TechReborn;
import techreborn.init.TRContent;
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
import techreborn.lib.ModInfo;
<<<<<<<
=======
} else if (ExternalPowerSystems.isPoweredItem(stack)) {
ExternalPowerSystems.chargeItem(this, stack);
>>>>>>>
} else if (ExternalPowerSystems.isPoweredItem(stack)) {
ExternalPowerSystems.chargeItem(this, stack); |
<<<<<<<
import org.atmosphere.cpr.AtmosphereFramework;
import org.atmosphere.nettosphere.extra.FlashPolicyServerPipelineFactory;
import org.atmosphere.nettosphere.util.Version;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.ChannelGroupFuture;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;
=======
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.MultithreadEventLoopGroup;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.ChannelGroupFuture;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.util.concurrent.ImmediateEventExecutor;
import org.atmosphere.cpr.AtmosphereFramework;
import org.atmosphere.nettosphere.extra.FlashPolicyServerChannelInitializer;
import org.atmosphere.nettosphere.util.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.concurrent.atomic.AtomicBoolean;
>>>>>>>
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.MultithreadEventLoopGroup;
import io.netty.channel.epoll.EpollEventLoopGroup;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.ChannelGroupFuture;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.util.concurrent.ImmediateEventExecutor;
import org.atmosphere.cpr.AtmosphereFramework;
import org.atmosphere.nettosphere.extra.FlashPolicyServerChannelInitializer;
import org.atmosphere.nettosphere.util.Version;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.concurrent.atomic.AtomicBoolean;
<<<<<<<
private final RuntimeEngine runtimeEngine;
=======
private MultithreadEventLoopGroup parentGroup;
private MultithreadEventLoopGroup childGroup;
>>>>>>>
private final RuntimeEngine runtimeEngine;
private MultithreadEventLoopGroup parentGroup;
private MultithreadEventLoopGroup childGroup; |
<<<<<<<
import org.jboss.netty.channel.ChannelUpstreamHandler;
import org.jboss.netty.handler.ssl.SslContext;
=======
import io.netty.channel.ChannelInboundHandler;
>>>>>>>
<<<<<<<
public String subProtocols() {
return b.subProtocols;
}
public boolean noInternalAlloc() {
return b.noInternalAlloc;
}
public boolean binaryWrite() {
return b.binaryWrite;
}
=======
public boolean epoll() {
return b.epoll;
}
>>>>>>>
public String subProtocols() {
return b.subProtocols;
}
public boolean noInternalAlloc() {
return b.noInternalAlloc;
}
public boolean binaryWrite() {
return b.binaryWrite;
}
public boolean epoll() {
return b.epoll;
}
<<<<<<<
private int maxWebSocketFrameSize = 65536;
private boolean textFrameAsBinary = false;
public String subProtocols = "";
private boolean noInternalAlloc = false;
private boolean binaryWrite = false;
=======
public boolean epoll = false;
>>>>>>>
private int maxWebSocketFrameSize = 65536;
private boolean textFrameAsBinary = false;
public String subProtocols = "";
private boolean noInternalAlloc = false;
private boolean binaryWrite = false;
public boolean epoll = false;
<<<<<<<
* The internal size of the underlying {@link org.atmosphere.nettosphere.util.ChannelBufferPool} size for
* I/O operation. Default is 50. If set to -1, a new {@link org.jboss.netty.buffer.ChannelBuffer} will be
* created and never pooled.
*
* @param writeBufferPoolSize the max size of the pool.
* @return this;
*/
public Builder writeBufferPoolSize(int writeBufferPoolSize) {
this.writeBufferPoolSize = writeBufferPoolSize;
return this;
}
/**
* The frequency the {@link org.atmosphere.nettosphere.util.ChannelBufferPool} is resized and garbaged. Default
* is 30000.
*
* @param writeBufferPoolCleanupFrequency the frequency
* @return this
*/
public Builder writeBufferPoolCleanupFrequency(long writeBufferPoolCleanupFrequency) {
this.writeBufferPoolCleanupFrequency = writeBufferPoolCleanupFrequency;
return this;
}
/**
* Do not decode {@link org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame} into a String and instead pass
* it to the {@link org.atmosphere.websocket.WebSocketProcessor} as binary.
*
* @param textFrameAsBinary
* @return this
*/
public Builder textFrameAsBinary(boolean textFrameAsBinary) {
this.textFrameAsBinary = textFrameAsBinary;
return this;
}
/**
* A coma delimited of allowed WebSocket Sub Protocol (Sec-WebSocket-Protocol)
*
* @param subProtocols A coma delimited of allowed WebSocket Sub Protocol
* @return this
*/
public Builder subProtocols(String subProtocols) {
this.subProtocols = subProtocols;
return this;
}
/**
* Proxy {@link org.atmosphere.cpr.AtmosphereRequest}, {@link AtmosphereResource} and {@link org.atmosphere.cpr.AtmosphereRequest}
* with no ops implementations.
* <p/>
* Set it to true only if you are using WebSocket with a your own implementation of {@link org.atmosphere.websocket.WebSocketProcessor}. The WebSocketProcessor MUST not invoked those objects and only use the {@link org.atmosphere.websocket.WebSocket} API.
* <p/>
* Default is false
*
* @param noInternalAlloc
* @return this
*/
public Builder noInternalAlloc(boolean noInternalAlloc) {
this.noInternalAlloc = noInternalAlloc;
return this;
}
/**
* Write binary frame when websocket transport is used.
*
* @param binaryWrite true or false
* @return this
*/
public Builder binaryWrite(boolean binaryWrite) {
this.binaryWrite = binaryWrite;
return this;
}
/**
=======
>>>>>>>
* Do not decode {@link org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame} into a String and instead pass
* it to the {@link org.atmosphere.websocket.WebSocketProcessor} as binary.
*
* @param textFrameAsBinary
* @return this
*/
public Builder textFrameAsBinary(boolean textFrameAsBinary) {
this.textFrameAsBinary = textFrameAsBinary;
return this;
}
/**
* A coma delimited of allowed WebSocket Sub Protocol (Sec-WebSocket-Protocol)
*
* @param subProtocols A coma delimited of allowed WebSocket Sub Protocol
* @return this
*/
public Builder subProtocols(String subProtocols) {
this.subProtocols = subProtocols;
return this;
}
/**
* Proxy {@link org.atmosphere.cpr.AtmosphereRequest}, {@link AtmosphereResource} and {@link org.atmosphere.cpr.AtmosphereRequest}
* with no ops implementations.
* <p/>
* Set it to true only if you are using WebSocket with a your own implementation of {@link org.atmosphere.websocket.WebSocketProcessor}. The WebSocketProcessor MUST not invoked those objects and only use the {@link org.atmosphere.websocket.WebSocket} API.
* <p/>
* Default is false
*
* @param noInternalAlloc
* @return this
*/
public Builder noInternalAlloc(boolean noInternalAlloc) {
this.noInternalAlloc = noInternalAlloc;
return this;
}
/**
* Write binary frame when websocket transport is used.
*
* @param binaryWrite true or false
* @return this
*/
public Builder binaryWrite(boolean binaryWrite) {
this.binaryWrite = binaryWrite;
return this;
}
/** |
<<<<<<<
import java.util.*;
import javax.naming.InvalidNameException;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
=======
>>>>>>> |
<<<<<<<
builder.setUrl(UriUtils.resolve(request.getLocalAddr(), 8080, application.getRcmlUrl()));
=======
builder.setUrl(UriUtils.resolve(application.getSmsUrl()));
builder.setMethod(application.getSmsMethod());
builder.setFallbackUrl(UriUtils.resolve(application.getSmsFallbackUrl()));
builder.setFallbackMethod(application.getSmsFallbackMethod());
>>>>>>>
builder.setUrl(UriUtils.resolve(application.getRcmlUrl()));
<<<<<<<
builder.setUrl(UriUtils.resolve(request.getLocalAddr(), 8080, appUri));
}
builder.setMethod(number.getSmsMethod());
URI appFallbackUrl = number.getSmsFallbackUrl();
if (appFallbackUrl != null) {
builder.setFallbackUrl(UriUtils.resolve(request.getLocalAddr(), 8080, number.getSmsFallbackUrl()));
builder.setFallbackMethod(number.getSmsFallbackMethod());
=======
builder.setUrl(UriUtils.resolve(appUri));
builder.setMethod(number.getSmsMethod());
URI appFallbackUrl = number.getSmsFallbackUrl();
if (appFallbackUrl != null) {
builder.setFallbackUrl(UriUtils.resolve(number.getSmsFallbackUrl()));
builder.setFallbackMethod(number.getSmsFallbackMethod());
}
>>>>>>>
builder.setUrl(UriUtils.resolve(appUri));
}
builder.setMethod(number.getSmsMethod());
URI appFallbackUrl = number.getSmsFallbackUrl();
if (appFallbackUrl != null) {
builder.setFallbackUrl(UriUtils.resolve(number.getSmsFallbackUrl()));
builder.setFallbackMethod(number.getSmsFallbackMethod()); |
<<<<<<<
import org.mobicents.servlet.restcomm.rvd.storage.FsProjectStorage;
import org.mobicents.servlet.restcomm.rvd.storage.FsPackagingStorage;
=======
import org.mobicents.servlet.restcomm.rvd.storage.PackagingStorage;
>>>>>>>
import org.mobicents.servlet.restcomm.rvd.storage.FsPackagingStorage;
<<<<<<<
@Path("ras")
public class RasRestService extends UploadRestService {
=======
@Path("/ras")
public class RasRestService extends RestService {
>>>>>>>
@Path("ras")
public class RasRestService extends RestService {
<<<<<<<
settings = RvdSettings.getInstance(servletContext);
storage = new FsProjectStorage(settings);
rasStorage = new FsRasStorage(storage);
packagingStorage = new FsPackagingStorage(storage);
=======
rvdContext = new RvdContext(request, servletContext);
settings = rvdContext.getSettings();
storage = rvdContext.getProjectStorage();
rasStorage = new RasStorage(storage);
packagingStorage = new PackagingStorage(storage);
>>>>>>>
rvdContext = new RvdContext(request, servletContext);
settings = rvdContext.getSettings();
projectStorage = rvdContext.getProjectStorage();
rasStorage = new FsRasStorage(rvdContext.getStorageBase());
packagingStorage = new FsPackagingStorage(rvdContext.getStorageBase()); |
<<<<<<<
import com.google.gerrit.exceptions.StorageException;
=======
import com.google.common.flogger.FluentLogger;
>>>>>>>
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.exceptions.StorageException;
<<<<<<<
} catch (StorageException e) {
throw new CmdLineException(owner, localizable("database is down"));
=======
} catch (OrmException e) {
String msg = "database is down";
logger.atSevere().withCause(e).log(msg);
throw new CmdLineException(owner, localizable(msg));
>>>>>>>
} catch (StorageException e) {
String msg = "database is down";
logger.atSevere().withCause(e).log(msg);
throw new CmdLineException(owner, localizable(msg)); |
<<<<<<<
import org.restcomm.connect.dao.ClientsDao;
import org.restcomm.connect.dao.ConferenceDetailRecordsDao;
=======
import org.restcomm.connect.dao.ExtensionsConfigurationDao;
import org.restcomm.connect.dao.OutgoingCallerIdsDao;
import org.restcomm.connect.dao.UsageDao;
import org.restcomm.connect.dao.AnnouncementsDao;
>>>>>>>
import org.restcomm.connect.dao.ClientsDao;
import org.restcomm.connect.dao.ConferenceDetailRecordsDao;
<<<<<<<
private MediaServersDao mediaServersDao;
private MediaResourceBrokerDao mediaResourceBrokerDao;
=======
private ExtensionsConfigurationDao extensionsConfigurationDao;
>>>>>>>
private MediaServersDao mediaServersDao;
private MediaResourceBrokerDao mediaResourceBrokerDao;
private ExtensionsConfigurationDao extensionsConfigurationDao;
<<<<<<<
public MediaServersDao getMediaServersDao() {
return mediaServersDao;
}
@Override
public MediaResourceBrokerDao getMediaResourceBrokerDao() {
return mediaResourceBrokerDao;
}
@Override
=======
public ExtensionsConfigurationDao getExtensionsConfigurationDao() {
return extensionsConfigurationDao;
}
@Override
>>>>>>>
public MediaServersDao getMediaServersDao() {
return mediaServersDao;
}
@Override
public MediaResourceBrokerDao getMediaResourceBrokerDao() {
return mediaResourceBrokerDao;
}
@Override
public ExtensionsConfigurationDao getExtensionsConfigurationDao() {
return extensionsConfigurationDao;
}
@Override
<<<<<<<
mediaServersDao = new MybatisMediaServerDao(sessions);
mediaResourceBrokerDao = new MybatisMediaResourceBrokerDao(sessions);
=======
extensionsConfigurationDao = new MybatisExtensionsConfigurationDao(sessions);
>>>>>>>
mediaServersDao = new MybatisMediaServerDao(sessions);
mediaResourceBrokerDao = new MybatisMediaResourceBrokerDao(sessions);
extensionsConfigurationDao = new MybatisExtensionsConfigurationDao(sessions); |
<<<<<<<
final InetAddress address;
try {
address = DNSUtils.getByName(origin.getAddress());
final String ip = address.getHostAddress();
if (!IPUtils.isRoutableAddress(ip)) {
origin.setAddress(externalIp);
}
} catch (UnknownHostException e) {
// TODO do nothing cause domain name is unknown
// origin.setAddress(externalIp); to remove
}
=======
origin.setAddress(externalIp);
// final InetAddress address;
// try {
// address = InetAddress.getByName(origin.getAddress());
// final String ip = address.getHostAddress();
// if (!IPUtils.isRoutableAddress(ip)) {
// origin.setAddress(externalIp);
// }
// } catch (UnknownHostException e) {
// // TODO do nothing cause domain name is unknown
// // origin.setAddress(externalIp); to remove
// }
>>>>>>>
origin.setAddress(externalIp);
// final InetAddress address;
// try {
// address = DNSUtils.getByName(origin.getAddress());
// final String ip = address.getHostAddress();
// if (!IPUtils.isRoutableAddress(ip)) {
// origin.setAddress(externalIp);
// }
// } catch (UnknownHostException e) {
// // TODO do nothing cause domain name is unknown
// // origin.setAddress(externalIp); to remove
// }
<<<<<<<
final InetAddress address = DNSUtils.getByName(connection.getAddress());
final String ip = address.getHostAddress();
if (!IPUtils.isRoutableAddress(ip)) {
connection.setAddress(externalIp);
}
=======
connection.setAddress(externalIp);
// final InetAddress address = InetAddress.getByName(connection.getAddress());
// final String ip = address.getHostAddress();
// if (!IPUtils.isRoutableAddress(ip)) {
// connection.setAddress(externalIp);
// }
>>>>>>>
connection.setAddress(externalIp);
// final InetAddress address = DNSUtils.getByName(connection.getAddress());
// final String ip = address.getHostAddress();
// if (!IPUtils.isRoutableAddress(ip)) {
// connection.setAddress(externalIp);
// } |
<<<<<<<
private void onGetConferenceInfo(GetConferenceInfo message, ActorRef self, ActorRef sender) throws Exception {
sender.tell(new ConferenceResponse<ConferenceInfo>(createConferenceInfo()), self);
}
private ConferenceInfo createConferenceInfo(){
=======
private void onGetConferenceInfo(ActorRef self, ActorRef sender) throws Exception {
>>>>>>>
private void onGetConferenceInfo(ActorRef self, ActorRef sender) throws Exception {
sender.tell(new ConferenceResponse<ConferenceInfo>(createConferenceInfo()), self);
}
private ConferenceInfo createConferenceInfo(){
<<<<<<<
private void onJoinComplete(JoinComplete message, ActorRef self, ActorRef sender) {
this.mscontroller.tell(message, sender);
=======
private void onJoinComplete(JoinComplete message, ActorRef self, ActorRef sender) throws Exception {
>>>>>>>
private void onJoinComplete(JoinComplete message, ActorRef self, ActorRef sender) throws Exception {
this.mscontroller.tell(message, sender); |
<<<<<<<
public static final Pattern NEW_PATCHSET =
Pattern.compile("^" + REFS_CHANGES + "(?:[0-9][0-9]/)?([1-9][0-9]*)(?:/new)?$");
=======
public static final Pattern NEW_PATCHSET = Pattern.compile(
"^" + REFS_CHANGES + "(?:[0-9][0-9]/)?([1-9][0-9]*)(?:/[1-9][0-9]*)?$");
>>>>>>>
public static final Pattern NEW_PATCHSET =
Pattern.compile("^" + REFS_CHANGES + "(?:[0-9][0-9]/)?([1-9][0-9]*)(?:/[1-9][0-9]*)?$"); |
<<<<<<<
import java.io.IOException;
import java.io.PrintWriter;
=======
>>>>>>>
import java.io.IOException;
<<<<<<<
public SiteIndexer.Result indexAll(AccountIndex index) {
ProgressMonitor progress = new TextProgressMonitor(new PrintWriter(progressOut));
=======
public SiteIndexer.Result indexAll(final AccountIndex index) {
ProgressMonitor progress = new TextProgressMonitor(newPrintWriter(progressOut));
>>>>>>>
public SiteIndexer.Result indexAll(AccountIndex index) {
ProgressMonitor progress = new TextProgressMonitor(newPrintWriter(progressOut)); |
<<<<<<<
protected void secureLevelControl(AccountsDao accountsDao, String accountSid, String referenceAccountSid) {
String sidPrincipal = String.valueOf(SecurityUtils.getSubject().getPrincipal());
if (!sidPrincipal.equals(accountSid)) {
Account account = accountsDao.getAccount(new Sid(accountSid));
if (!sidPrincipal.equals(String.valueOf(account.getAccountSid()))) {
throw new AuthorizationException();
} else if (referenceAccountSid != null && !accountSid.equals(referenceAccountSid)) {
throw new AuthorizationException();
}
} else if (referenceAccountSid != null && !sidPrincipal.equals(referenceAccountSid)) {
throw new AuthorizationException();
}
}
=======
// A general purpose method to test incoming parameters for meaningful data
protected boolean isEmpty(Object value) {
if (value == null)
return true;
if ( value.equals("") )
return true;
return false;
}
>>>>>>>
protected void secureLevelControl(AccountsDao accountsDao, String accountSid, String referenceAccountSid) {
String sidPrincipal = String.valueOf(SecurityUtils.getSubject().getPrincipal());
if (!sidPrincipal.equals(accountSid)) {
Account account = accountsDao.getAccount(new Sid(accountSid));
if (!sidPrincipal.equals(String.valueOf(account.getAccountSid()))) {
throw new AuthorizationException();
} else if (referenceAccountSid != null && !accountSid.equals(referenceAccountSid)) {
throw new AuthorizationException();
}
} else if (referenceAccountSid != null && !sidPrincipal.equals(referenceAccountSid)) {
throw new AuthorizationException();
}
}
// A general purpose method to test incoming parameters for meaningful data
protected boolean isEmpty(Object value) {
if (value == null)
return true;
if ( value.equals("") )
return true;
return false;
} |
<<<<<<<
import org.restcomm.connect.dao.ProfilesDao;
=======
import org.restcomm.connect.dao.ProfileAssociationsDao;
>>>>>>>
import org.restcomm.connect.dao.ProfilesDao;
import org.restcomm.connect.dao.ProfileAssociationsDao; |
<<<<<<<
=======
import java.io.InputStream;
import java.security.Principal;
import java.util.ArrayList;
>>>>>>>
import java.io.InputStream;
import java.security.Principal;
import java.util.ArrayList;
<<<<<<<
=======
import org.mobicents.servlet.restcomm.rvd.model.project.RvdProject;
import org.mobicents.servlet.restcomm.rvd.security.RvdUser;
import org.mobicents.servlet.restcomm.rvd.security.annotations.RvdAuth;
import org.mobicents.servlet.restcomm.rvd.storage.FsPackagingStorage;
>>>>>>>
import org.mobicents.servlet.restcomm.rvd.model.project.RvdProject;
import org.mobicents.servlet.restcomm.rvd.security.RvdUser;
import org.mobicents.servlet.restcomm.rvd.security.annotations.RvdAuth;
import org.mobicents.servlet.restcomm.rvd.storage.FsPackagingStorage; |
<<<<<<<
MediaServersDao getMediaServersDao();
MediaResourceBrokerDao getMediaResourceBrokerDao();
=======
ExtensionsConfigurationDao getExtensionsConfigurationDao();
>>>>>>>
MediaServersDao getMediaServersDao();
MediaResourceBrokerDao getMediaResourceBrokerDao();
ExtensionsConfigurationDao getExtensionsConfigurationDao(); |
<<<<<<<
if (numberSelector.isFailedCall(result, sourceOrganizationSid, destOrg)) {
// We found the number but organization was not proper
sendNotFound(request, sourceOrganizationSid, phone, fromClientAccountSid);
isFoundHostedApp = true;
} else {
if (number != null) {
ExtensionController ec = ExtensionController.getInstance();
IExtensionFeatureAccessRequest far = new FeatureAccessRequest(FeatureAccessRequest.Feature.INBOUND_VOICE, number.getAccountSid());
ExtensionResponse er = ec.executePreInboundAction(far, extensions);
if (er.isAllowed()) {
=======
ExtensionController ec = ExtensionController.getInstance();
IExtensionFeatureAccessRequest far = new FeatureAccessRequest(FeatureAccessRequest.Feature.INBOUND_VOICE, number.getAccountSid());
ExtensionResponse er = ec.executePreInboundAction(far, extensions);
if (er == null || er.isAllowed()) {
if (numberSelector.isFailedCall(result, sourceOrganizationSid, destOrg)) {
// We found the number but organization was not proper
if (logger.isDebugEnabled()) {
String msg = String.format("Number found %s, but source org %s and destination org %s are not proper", number, sourceOrganizationSid.toString(), destOrg.toString());
logger.debug(msg);
}
sendNotFound(request, sourceOrganizationSid, phone, fromClientAccountSid);
isFoundHostedApp = true;
} else {
if (number != null) {
>>>>>>>
if (numberSelector.isFailedCall(result, sourceOrganizationSid, destOrg)) {
// We found the number but organization was not proper
if (logger.isDebugEnabled()) {
String msg = String.format("Number found %s, but source org %s and destination org %s are not proper", number, sourceOrganizationSid.toString(), destOrg.toString());
logger.debug(msg);
}
sendNotFound(request, sourceOrganizationSid, phone, fromClientAccountSid);
isFoundHostedApp = true;
} else {
if (number != null) {
ExtensionController ec = ExtensionController.getInstance();
IExtensionFeatureAccessRequest far = new FeatureAccessRequest(FeatureAccessRequest.Feature.INBOUND_VOICE, number.getAccountSid());
ExtensionResponse er = ec.executePreInboundAction(far, extensions);
if (er.isAllowed()) {
<<<<<<<
=======
} else {
//Extensions didn't allowed this call
String errMsg = "Inbound call to Number: " + number.getPhoneNumber()
+ " is not allowed";
if (logger.isDebugEnabled()) {
logger.debug(errMsg);
}
sendNotification(number.getAccountSid(), errMsg, 11001, "warning", true);
final SipServletResponse resp = request.createResponse(SC_FORBIDDEN, "Call not allowed");
resp.send();
ec.executePostOutboundAction(far, extensions);
return false;
>>>>>>> |
<<<<<<<
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_ABSENT, name);
=======
information = new ConferenceInfo(calls, ConferenceStateChanged.State.RUNNING_MODERATOR_ABSENT, name, moderatorPresent);
>>>>>>>
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_ABSENT, name, moderatorPresent);
<<<<<<<
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_PRESENT, name);
=======
information = new ConferenceInfo(calls, ConferenceStateChanged.State.RUNNING_MODERATOR_PRESENT, name, moderatorPresent);
>>>>>>>
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_PRESENT, name, moderatorPresent);
<<<<<<<
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.COMPLETED, name);
=======
information = new ConferenceInfo(calls, ConferenceStateChanged.State.COMPLETED, name, moderatorPresent);
>>>>>>>
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.COMPLETED, name, moderatorPresent); |
<<<<<<<
//Initialize Monitoring Service
ActorRef monitoring = monitoringService(xml, loader);
if (monitoring != null) {
context.setAttribute(MonitoringService.class.getName(), monitoring);
logger.info("Monitoring Service created and stored in the context");
} else {
logger.error("Monitoring Service is null");
}
//Initialize Extensions
Configuration extensionConfiguration = null;
try {
extensionConfiguration = new XMLConfiguration(extensionConfigurationPath);
} catch (final ConfigurationException exception) {
logger.error(exception);
}
ExtensionScanner extensionScanner = new ExtensionScanner(extensionConfiguration);
extensionScanner.start();
=======
>>>>>>>
//Initialize Monitoring Service
ActorRef monitoring = monitoringService(xml, loader);
if (monitoring != null) {
context.setAttribute(MonitoringService.class.getName(), monitoring);
logger.info("Monitoring Service created and stored in the context");
} else {
logger.error("Monitoring Service is null");
}
//Initialize Extensions
Configuration extensionConfiguration = null;
try {
extensionConfiguration = new XMLConfiguration(extensionConfigurationPath);
} catch (final ConfigurationException exception) {
logger.error(exception);
}
ExtensionScanner extensionScanner = new ExtensionScanner(extensionConfiguration);
extensionScanner.start(); |
<<<<<<<
=======
import javax.sdp.SdpParseException;
import javax.servlet.ServletContext;
import javax.servlet.sip.Address;
import javax.servlet.sip.AuthInfo;
import javax.servlet.sip.ServletParseException;
import javax.servlet.sip.SipApplicationSession;
import javax.servlet.sip.SipApplicationSessionEvent;
import javax.servlet.sip.SipFactory;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.SipServletResponse;
import javax.servlet.sip.SipSession;
import javax.servlet.sip.SipURI;
import javax.servlet.sip.TelURL;
import javax.sip.header.RouteHeader;
import javax.sip.message.Response;
import java.io.IOException;
import java.net.InetAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import static akka.pattern.Patterns.ask;
import static javax.servlet.sip.SipServlet.OUTBOUND_INTERFACES;
import static javax.servlet.sip.SipServletResponse.*;
>>>>>>> |
<<<<<<<
secure();
logger.debug("downloading raw archive for project " + applicationSid);
=======
if(logger.isDebugEnabled()) {
logger.debug("downloading raw archive for project " + applicationSid);
}
>>>>>>>
secure();
if(logger.isDebugEnabled()) {
logger.debug("downloading raw archive for project " + applicationSid);
}
<<<<<<<
secure();
logger.info("Importing project from raw archive");
=======
if(logger.isInfoEnabled()) {
logger.info("Importing project from raw archive");
}
>>>>>>>
secure();
if(logger.isInfoEnabled()) {
logger.info("Importing project from raw archive");
}
<<<<<<<
applicationsApi.updateApplication(applicationSid, effectiveProjectName, null, projectKind);
logger.info("Successfully imported project '" + applicationSid + "' from raw archive '" + item.getName() + "'");
=======
applicationsApi.updateApplication(ticket, applicationSid, effectiveProjectName, null, projectKind);
if(logger.isInfoEnabled()) {
logger.info("Successfully imported project '" + applicationSid + "' from raw archive '" + item.getName() + "'");
}
>>>>>>>
applicationsApi.updateApplication(applicationSid, effectiveProjectName, null, projectKind);
if(logger.isInfoEnabled()) {
logger.info("Successfully imported project '" + applicationSid + "' from raw archive '" + item.getName() + "'");
}
<<<<<<<
secure();
logger.info("running /uploadwav");
=======
if(logger.isInfoEnabled()) {
logger.info("running /uploadwav");
}
>>>>>>>
secure();
if(logger.isInfoEnabled()) {
logger.info("running /uploadwav");
}
<<<<<<<
secure();
logger.info("saving project settings for " + applicationSid);
=======
if(logger.isInfoEnabled()) {
logger.info("saving project settings for " + applicationSid);
}
>>>>>>>
secure();
if(logger.isInfoEnabled()) {
logger.info("saving project settings for " + applicationSid);
} |
<<<<<<<
@Test //Passes only when run individually. Doesn't pass when run with the rest of the tests. It not only fails, it messes up the metrics and cause all following tests to fail. so ignoring it unless we fix it
@Category(UnstableTests.class)
@Ignore
=======
@Test //Passes only when run individually. Doesn't pass when run with the rest of the tests
// @Category(UnstableTests.class)
@Category(FeatureAltTests.class)
>>>>>>>
@Test //Passes only when run individually. Doesn't pass when run with the rest of the tests
@Category(FeatureAltTests.class)
<<<<<<<
@Test //Passes only when run individually. Doesn't pass when run with the rest of the tests. It not only fails, it messes up the metrics and cause all following tests to fail. so ignoring it unless we fix it
@Category(UnstableTests.class)
@Ignore
=======
@Test //Passes only when run individually. Doesn't pass when run with the rest of the tests
// @Category(UnstableTests.class)
@Category(FeatureAltTests.class)
>>>>>>>
@Test //Passes only when run individually. Doesn't pass when run with the rest of the tests. It not only fails, it messes up the metrics and cause all following tests to fail. so ignoring it unless we fix it
@Ignore
@Category(FeatureAltTests.class) |
<<<<<<<
servletResponse = request.createResponse(SC_TEMPORARILY_UNAVAILABLE, "Set either incoming phone number Refer URL or Refer application");
=======
SipServletResponse servletResponse = request.createResponse(SC_NOT_FOUND, "Set either incoming phone number Refer URL or Refer application");
>>>>>>>
servletResponse = request.createResponse(SC_NOT_FOUND, "Set either incoming phone number Refer URL or Refer application"); |
<<<<<<<
@Override
public List<CallDetailRecord> getCallDetailRecordsByMsId(String msId) {
return getCallDetailRecords(namespace + "getCallDetailRecordsByMsId", msId);
}
=======
@Override
public Double getAverageCallDurationLast24Hours(Sid instanceId) throws ParseException {
SimpleDateFormat formatter= new SimpleDateFormat("YYYY-MM-dd");
Date today = formatter.parse(DateTime.now().toString());
Map<String, Object> params = new HashMap<String, Object>();
params.put("instanceid", instanceId.toString());
params.put("startTime", today);
final SqlSession session = sessions.openSession();
try {
final Double total = session.selectOne(namespace + "getAverageCallDurationLast24Hours", params);
return total;
} finally {
session.close();
}
}
@Override
public Double getAverageCallDurationLastHour(Sid instanceId) throws ParseException {
SimpleDateFormat formatter= new SimpleDateFormat("YYYY-MM-dd HH:00:00");
String hour = formatter.format(Calendar.getInstance().getTime());
Date lastHour = formatter.parse(hour);
Map<String, Object> params = new HashMap<String, Object>();
params.put("instanceid", instanceId.toString());
params.put("startTime", lastHour);
final SqlSession session = sessions.openSession();
try {
final Double total = session.selectOne(namespace + "getAverageCallDurationLastHour", params);
return total;
} finally {
session.close();
}
}
>>>>>>>
@Override
public List<CallDetailRecord> getCallDetailRecordsByMsId(String msId) {
return getCallDetailRecords(namespace + "getCallDetailRecordsByMsId", msId);
}
@Override
public Double getAverageCallDurationLast24Hours(Sid instanceId) throws ParseException {
SimpleDateFormat formatter= new SimpleDateFormat("YYYY-MM-dd");
Date today = formatter.parse(DateTime.now().toString());
Map<String, Object> params = new HashMap<String, Object>();
params.put("instanceid", instanceId.toString());
params.put("startTime", today);
final SqlSession session = sessions.openSession();
try {
final Double total = session.selectOne(namespace + "getAverageCallDurationLast24Hours", params);
return total;
} finally {
session.close();
}
}
@Override
public Double getAverageCallDurationLastHour(Sid instanceId) throws ParseException {
SimpleDateFormat formatter= new SimpleDateFormat("YYYY-MM-dd HH:00:00");
String hour = formatter.format(Calendar.getInstance().getTime());
Date lastHour = formatter.parse(hour);
Map<String, Object> params = new HashMap<String, Object>();
params.put("instanceid", instanceId.toString());
params.put("startTime", lastHour);
final SqlSession session = sessions.openSession();
try {
final Double total = session.selectOne(namespace + "getAverageCallDurationLastHour", params);
return total;
} finally {
session.close();
}
} |
<<<<<<<
this.organizationSid = organizationSid;
=======
this.tlvSet = new TlvSet();
if(!this.configuration.subset("outbound-sms").isEmpty()) {
//TODO: handle arbitrary keys instead of just TAG_DEST_NETWORK_ID
try {
String valStr = this.configuration.subset("outbound-sms").getString("destination_network_id");
this.tlvSet.addOptionalParameter(new Tlv(SmppConstants.TAG_DEST_NETWORK_ID,ByteArrayUtil.toByteArray(Integer.parseInt(valStr))));
} catch (Exception e) {
logger.error("Error while parsing tlv configuration " + e);
}
}
>>>>>>>
this.organizationSid = organizationSid;
this.tlvSet = new TlvSet();
if(!this.configuration.subset("outbound-sms").isEmpty()) {
//TODO: handle arbitrary keys instead of just TAG_DEST_NETWORK_ID
try {
String valStr = this.configuration.subset("outbound-sms").getString("destination_network_id");
this.tlvSet.addOptionalParameter(new Tlv(SmppConstants.TAG_DEST_NETWORK_ID,ByteArrayUtil.toByteArray(Integer.parseInt(valStr))));
} catch (Exception e) {
logger.error("Error while parsing tlv configuration " + e);
}
} |
<<<<<<<
import org.mobicents.servlet.restcomm.rvd.storage.FsProjectStorage;
import org.mobicents.servlet.restcomm.rvd.storage.FsStorageBase;
=======
>>>>>>>
<<<<<<<
rvdSettings = RvdSettings.getInstance(servletContext);
FsStorageBase storageBase = new FsStorageBase(rvdSettings.getWorkspaceBasePath());
projectStorage = new FsProjectStorage(storageBase);
projectService = new ProjectService(projectStorage, servletContext, rvdSettings);
=======
rvdContext = new RvdContext(request, servletContext);
rvdSettings = rvdContext.getSettings();
marshaler = rvdContext.getMarshaler();
projectStorage = rvdContext.getProjectStorage();
projectService = new ProjectService(rvdContext);
logger.debug("inside init()");
}
/**
* Make sure the specified project has been loaded and is available for use. Checks logged user too.
* Also the loaded project is placed in the activeProject variable
* @param projectName
* @return
* @throws StorageException, WebApplicationException/unauthorized
* @throws ProjectDoesNotExist
*/
void assertProjectAvailable(String projectName) throws StorageException, ProjectDoesNotExist {
if (! projectStorage.projectExists(projectName))
throw new ProjectDoesNotExist("Project " + projectName + " does not exist");
ProjectState project = projectStorage.loadProject(projectName);
if ( project.getHeader().getOwner() != null ) {
// needs further checking
if ( securityContext.getUserPrincipal() != null ) {
String loggedUser = securityContext.getUserPrincipal().getName();
if ( loggedUser.equals(project.getHeader().getOwner() ) ) {
this.activeProject = project;
return;
}
}
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
activeProject = project;
>>>>>>>
logger.debug("inside init()");
rvdContext = new RvdContext(request, servletContext);
rvdSettings = rvdContext.getSettings();
marshaler = rvdContext.getMarshaler();
projectStorage = rvdContext.getProjectStorage();
projectService = new ProjectService(rvdContext);
}
/**
* Make sure the specified project has been loaded and is available for use. Checks logged user too.
* Also the loaded project is placed in the activeProject variable
* @param projectName
* @return
* @throws StorageException, WebApplicationException/unauthorized
* @throws ProjectDoesNotExist
*/
void assertProjectAvailable(String projectName) throws StorageException, ProjectDoesNotExist {
if (! projectStorage.projectExists(projectName))
throw new ProjectDoesNotExist("Project " + projectName + " does not exist");
ProjectState project = projectStorage.loadProject(projectName);
if ( project.getHeader().getOwner() != null ) {
// needs further checking
if ( securityContext.getUserPrincipal() != null ) {
String loggedUser = securityContext.getUserPrincipal().getName();
if ( loggedUser.equals(project.getHeader().getOwner() ) ) {
this.activeProject = project;
return;
}
}
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
activeProject = project;
<<<<<<<
//@Path("/build")
public Response buildProject(@PathParam("name") String name) {
// !!! SANITIZE project name
// hmmm...why create a new storage object?
FsStorageBase storageBase = new FsStorageBase(rvdSettings.getWorkspaceBasePath());
ProjectStorage projectStorage = new FsProjectStorage(storageBase);
=======
public Response buildProject(@PathParam("name") String name) throws StorageException, ProjectDoesNotExist {
assertProjectAvailable(name);
>>>>>>>
public Response buildProject(@PathParam("name") String name) throws StorageException, ProjectDoesNotExist {
assertProjectAvailable(name); |
<<<<<<<
builder.setUrl(UriUtils.resolve(application.getVoiceUrl()));
builder.setMethod(application.getVoiceMethod());
URI uri = application.getVoiceFallbackUrl();
if (uri != null)
builder.setFallbackUrl(UriUtils.resolve(uri));
else
builder.setFallbackUrl(null);
builder.setFallbackMethod(application.getVoiceFallbackMethod());
builder.setStatusCallback(application.getStatusCallback());
builder.setStatusCallbackMethod(application.getStatusCallbackMethod());
=======
builder.setUrl(UriUtils.resolve(application.getRcmlUrl()));
>>>>>>>
builder.setUrl(UriUtils.resolve(application.getRcmlUrl()));
<<<<<<<
builder.setMethod(number.getVoiceMethod());
URI uri = number.getVoiceFallbackUrl();
if (uri != null)
builder.setFallbackUrl(UriUtils.resolve(uri));
else
builder.setFallbackUrl(null);
builder.setFallbackMethod(number.getVoiceFallbackMethod());
builder.setStatusCallback(number.getStatusCallback());
builder.setStatusCallbackMethod(number.getStatusCallbackMethod());
=======
>>>>>>>
<<<<<<<
builder.setUrl(UriUtils.resolve(application.getVoiceUrl()));
builder.setMethod(application.getVoiceMethod());
URI uri = application.getVoiceFallbackUrl();
if (uri != null)
builder.setFallbackUrl(UriUtils.resolve(uri));
else
builder.setFallbackUrl(null);
builder.setFallbackMethod(application.getVoiceFallbackMethod());
=======
builder.setUrl(UriUtils.resolve(application.getRcmlUrl()));
>>>>>>>
builder.setUrl(UriUtils.resolve(application.getRcmlUrl()));
<<<<<<<
builder.setMethod(client.getVoiceMethod());
URI uri = client.getVoiceFallbackUrl();
if (uri != null)
builder.setFallbackUrl(UriUtils.resolve(uri));
else
builder.setFallbackUrl(null);
builder.setFallbackMethod(client.getVoiceFallbackMethod());
=======
>>>>>>> |
<<<<<<<
import java.util.regex.Pattern;
=======
import java.util.UUID;
>>>>>>>
import java.util.regex.Pattern;
<<<<<<<
protected Response getAvailablePhoneNumbers(final String accountSid, final String isoCountryCode, ListFilters listFilters, String filterPattern, final MediaType responseType) {
String searchPattern = "";
if (filterPattern != null && !filterPattern.isEmpty()) {
for(int i = 0; i < filterPattern.length(); i ++) {
char c = filterPattern.charAt(i);
boolean isDigit = (c >= '0' && c <= '9');
boolean isStar = c == '*';
if(!isDigit && !isStar) {
searchPattern = searchPattern.concat(getNumber(c));
} else if (isStar) {
searchPattern = searchPattern.concat("\\d");
} else {
searchPattern = searchPattern.concat(Character.toString(c));
=======
private String header(final String login, final String password) {
final StringBuilder buffer = new StringBuilder();
buffer.append("<header><sender>");
buffer.append("<login>").append(login).append("</login>");
buffer.append("<password>").append(password).append("</password>");
buffer.append("</sender></header>");
return buffer.toString();
}
protected Response getAvailablePhoneNumbersByAreaCode(final String accountSid, final String areaCode,
final MediaType responseType) {
if (areaCode != null && !areaCode.isEmpty() && (areaCode.length() == 3)) {
final StringBuilder buffer = new StringBuilder();
buffer.append("<request id=\""+generateId()+"\">");
buffer.append(header);
buffer.append("<body>");
buffer.append("<requesttype>").append("getDIDs").append("</requesttype>");
buffer.append("<item>");
buffer.append("<npa>").append(areaCode).append("</npa>");
buffer.append("</item>");
buffer.append("</body>");
buffer.append("</request>");
final String body = buffer.toString();
final HttpPost post = new HttpPost(uri);
try {
List<NameValuePair> parameters = new ArrayList<NameValuePair>();
parameters.add(new BasicNameValuePair("apidata", body));
post.setEntity(new UrlEncodedFormEntity(parameters));
final DefaultHttpClient client = new DefaultHttpClient();
if(telestaxProxyEnabled) {
//This will work as a flag for LB that this request will need to be modified and proxied to VI
post.addHeader("TelestaxProxy", String.valueOf(telestaxProxyEnabled));
//This will tell LB that this request is a getAvailablePhoneNumberByAreaCode request
post.addHeader("RequestType", "GetAvailablePhoneNumbersByAreaCode");
}
final HttpResponse response = client.execute(post);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
final String content = StringUtils.toString(response.getEntity().getContent());
final VoipInnovationsResponse result = (VoipInnovationsResponse) xstream.fromXML(content);
final GetDIDListResponse dids = (GetDIDListResponse) result.body().content();
if (dids.code() == 100) {
final List<AvailablePhoneNumber> numbers = toAvailablePhoneNumbers(dids);
if (APPLICATION_XML_TYPE == responseType) {
return ok(xstream.toXML(new RestCommResponse(new AvailablePhoneNumberList(numbers))),
APPLICATION_XML).build();
} else if (APPLICATION_JSON_TYPE == responseType) {
return ok(gson.toJson(numbers), APPLICATION_JSON).build();
}
}
>>>>>>>
protected Response getAvailablePhoneNumbers(final String accountSid, final String isoCountryCode, ListFilters listFilters, String filterPattern, final MediaType responseType) {
String searchPattern = "";
if (filterPattern != null && !filterPattern.isEmpty()) {
for(int i = 0; i < filterPattern.length(); i ++) {
char c = filterPattern.charAt(i);
boolean isDigit = (c >= '0' && c <= '9');
boolean isStar = c == '*';
if(!isDigit && !isStar) {
searchPattern = searchPattern.concat(getNumber(c));
} else if (isStar) {
searchPattern = searchPattern.concat("\\d");
} else {
searchPattern = searchPattern.concat(Character.toString(c));
<<<<<<<
=======
private String generateId() {
return UUID.randomUUID().toString().replace("-", "");
}
>>>>>>> |
<<<<<<<
import org.restcomm.connect.dao.entities.Organization;
//import org.restcomm.connect.extension.api.ExtensionRequest;
//import org.restcomm.connect.extension.api.ExtensionResponse;
=======
>>>>>>>
import org.restcomm.connect.dao.entities.Organization;
//import org.restcomm.connect.extension.api.ExtensionRequest;
//import org.restcomm.connect.extension.api.ExtensionResponse;
<<<<<<<
interpreter = builder.build();
Sid organizationSid = storage.getOrganizationsDao().getOrganization(storage.getAccountsDao().getAccount(number.getAccountSid()).getOrganizationSid()).getSid();
if(logger.isDebugEnabled())
logger.debug("redirectToHostedSmsApp organizationSid = "+organizationSid);
=======
final Props props = SmppInterpreter.props(builder.build());
interpreter = getContext().actorOf(props);
>>>>>>>
final Props props = SmppInterpreter.props(builder.build());
interpreter = getContext().actorOf(props);
Sid organizationSid = storage.getOrganizationsDao().getOrganization(storage.getAccountsDao().getAccount(number.getAccountSid()).getOrganizationSid()).getSid();
if(logger.isDebugEnabled())
logger.debug("redirectToHostedSmsApp organizationSid = "+organizationSid); |
<<<<<<<
import java.util.ArrayList;
=======
import java.nio.charset.Charset;
>>>>>>>
import java.util.ArrayList;
import java.nio.charset.Charset; |
<<<<<<<
private final ActorSystem system;
private final String defaultOrganization;
=======
>>>>>>>
private final String defaultOrganization; |
<<<<<<<
import java.text.ParseException;
import java.util.ArrayList;
=======
import java.net.URL;
>>>>>>>
import java.net.URL;
import java.text.ParseException;
import java.util.ArrayList;
<<<<<<<
protected RecordingListConverter listConverter;
protected String instanceId;
=======
protected RecordingSecurityLevel securityLevel = RecordingSecurityLevel.SECURE;
>>>>>>>
protected RecordingSecurityLevel securityLevel = RecordingSecurityLevel.SECURE;
protected RecordingListConverter listConverter;
protected String instanceId; |
<<<<<<<
=======
// Format the destination to an E.164 phone number.
final PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
String formatedPhone = null;
//Don't format to E.164 if contains# or * as this is
//for a Regex or USSD call
if (phone.contains("*") || phone.contains("#")){
formatedPhone = phone;
}else{
try {
formatedPhone = phoneNumberUtil.format(phoneNumberUtil.parse(phone, "US"), PhoneNumberFormat.E164);
} catch (NumberParseException e) {
logger.error("Exception when try to format : " + e);
}
}
>>>>>>> |
<<<<<<<
import static com.google.gerrit.server.project.ProjectCache.illegalState;
=======
import static com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS;
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
>>>>>>>
import static com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS;
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
import static com.google.gerrit.server.project.ProjectCache.illegalState; |
<<<<<<<
patchForNatB2BUASessions = runtime.getBoolean("patch-for-nat-b2bua-sessions", true);
=======
>>>>>>>
patchForNatB2BUASessions = runtime.getBoolean("patch-for-nat-b2bua-sessions", true); |
<<<<<<<
private ConfigurationDao configurationDao;
=======
private InstanceIdDao instanceIdDao;
>>>>>>>
private ConfigurationDao configurationDao;
private InstanceIdDao instanceIdDao;
<<<<<<<
public ConfigurationDao getConfigurationDao() {
return configurationDao;
}
@Override
=======
public InstanceIdDao getInstanceIdDao() {
return instanceIdDao;
}
@Override
>>>>>>>
public ConfigurationDao getConfigurationDao() {
return configurationDao;
}
@Override
public InstanceIdDao getInstanceIdDao() {
return instanceIdDao;
}
@Override
<<<<<<<
configurationDao = new MyBatisConfigurationDao(sessions);
=======
instanceIdDao = new MybatisInstanceIdDao(sessions);
>>>>>>>
configurationDao = new MyBatisConfigurationDao(sessions);
instanceIdDao = new MybatisInstanceIdDao(sessions); |
<<<<<<<
import org.mobicents.servlet.restcomm.dao.AccountsDao;
import org.mobicents.servlet.restcomm.dao.ClientsDao;
import org.mobicents.servlet.restcomm.dao.DaoManager;
=======
>>>>>>>
<<<<<<<
dao = storage.getAccountsDao();
clientDao = storage.getClientsDao();
=======
>>>>>>>
<<<<<<<
dao.removeAccount(sidToBeRemoved);
// Remove its SIP client account
clientDao.removeClients(sidToBeRemoved);
=======
accountsDao.removeAccount(sidToBeRemoved);
>>>>>>>
accountsDao.removeAccount(sidToBeRemoved);
// Remove its SIP client account
clientDao.removeClients(sidToBeRemoved)
<<<<<<<
dao.addAccount(account);
// Create default SIP client data
MultivaluedMap<String, String> clientData = new MultivaluedMapImpl();
String username = data.getFirst("EmailAddress").split("@")[0];
clientData.add("Login", username);
clientData.add("Password", data.getFirst("Password"));
clientData.add("FriendlyName", account.getFriendlyName());
clientData.add("AccountSid", account.getSid().toString());
Client client = clientDao.getClient(clientData.getFirst("Login"));
if (client == null) {
client = createClientFrom(account.getSid(), clientData);
clientDao.addClient(client);
}
=======
accountsDao.addAccount(account);
>>>>>>>
accountsDao.addAccount(account);
// Create default SIP client data
MultivaluedMap<String, String> clientData = new MultivaluedMapImpl();
String username = data.getFirst("EmailAddress").split("@")[0];
clientData.add("Login", username);
clientData.add("Password", data.getFirst("Password"));
clientData.add("FriendlyName", account.getFriendlyName());
clientData.add("AccountSid", account.getSid().toString());
Client client = clientDao.getClient(clientData.getFirst("Login"));
if (client == null) {
client = createClientFrom(account.getSid(), clientData);
clientDao.addClient(client);
}
<<<<<<<
if ((subject.hasRole("Administrator") && secureLevelControlAccounts(account))
|| (subject.getPrincipal().equals(accountSid)
&& subject.isPermitted("RestComm:Modify:Accounts"))) {
dao.updateAccount(account);
// Update SIP client of the corresponding Account
String email = account.getEmailAddress();
if (email != null && !email.equals("")) {
String username = email.split("@")[0];
Client client = clientDao.getClient(username);
if (client != null) {
// TODO: need to encrypt this password because it's
// same with Account password.
// Don't implement now. Opened another issue for it.
if (data.containsKey("Password")) {
// Md5Hash(data.getFirst("Password")).toString();
String password = data.getFirst("Password");
client = client.setPassword(password);
}
if (data.containsKey("FriendlyName")) {
client = client.setFriendlyName(data.getFirst("FriendlyName"));
}
clientDao.updateClient(client);
}
}
} else {
return status(UNAUTHORIZED).build();
}
=======
secure(account, "RestComm:Modify:Accounts", SecuredType.SECURED_ACCOUNT );
accountsDao.updateAccount(account);
>>>>>>>
secure(account, "RestComm:Modify:Accounts", SecuredType.SECURED_ACCOUNT );
accountsDao.updateAccount(account);
// Update SIP client of the corresponding Account
String email = account.getEmailAddress();
if (email != null && !email.equals("")) {
String username = email.split("@")[0];
Client client = clientDao.getClient(username);
if (client != null) {
// TODO: need to encrypt this password because it's
// same with Account password.
// Don't implement now. Opened another issue for it.
if (data.containsKey("Password")) {
// Md5Hash(data.getFirst("Password")).toString();
String password = data.getFirst("Password");
client = client.setPassword(password);
}
if (data.containsKey("FriendlyName")) {
client = client.setFriendlyName(data.getFirst("FriendlyName"));
}
clientDao.updateClient(client);
}
}
} else {
return status(UNAUTHORIZED).build();
} |
<<<<<<<
public ReviewResult review(ReviewInput in) {
=======
public void review(ReviewInput in) throws RestApiException {
>>>>>>>
public ReviewResult review(ReviewInput in) throws RestApiException {
<<<<<<<
public CommitInfo commit(boolean addLinks) {
throw new NotImplementedException();
}
@Override
public Map<String, List<CommentInfo>> comments() {
=======
public Map<String, List<CommentInfo>> comments() throws RestApiException {
>>>>>>>
public CommitInfo commit(boolean addLinks) throws RestApiException {
throw new NotImplementedException();
}
@Override
public Map<String, List<CommentInfo>> comments() throws RestApiException {
<<<<<<<
public EditInfo applyFix(String fixId) {
throw new NotImplementedException();
}
@Override
public Map<String, List<CommentInfo>> drafts() {
=======
public Map<String, List<CommentInfo>> drafts() throws RestApiException {
>>>>>>>
public EditInfo applyFix(String fixId) throws RestApiException {
throw new NotImplementedException();
}
@Override
public Map<String, List<CommentInfo>> drafts() throws RestApiException { |
<<<<<<<
information = new ConferenceInfo(calls, ConferenceStateChanged.State.RUNNING_MODERATOR_ABSENT, name, moderatorPresent, mediaGateway);
=======
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_ABSENT, name, moderatorPresent);
>>>>>>>
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_ABSENT, name, moderatorPresent, mediaGateway);
<<<<<<<
information = new ConferenceInfo(calls, ConferenceStateChanged.State.RUNNING_MODERATOR_PRESENT, name, moderatorPresent, mediaGateway);
=======
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_PRESENT, name, moderatorPresent);
>>>>>>>
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.RUNNING_MODERATOR_PRESENT, name, moderatorPresent, mediaGateway);
<<<<<<<
information = new ConferenceInfo(calls, ConferenceStateChanged.State.COMPLETED, name, moderatorPresent, mediaGateway);
=======
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.COMPLETED, name, moderatorPresent);
>>>>>>>
information = new ConferenceInfo(sid, calls, ConferenceStateChanged.State.COMPLETED, name, moderatorPresent, mediaGateway); |
<<<<<<<
protected abstract void onRecording(Recording recording, ActorRef self, ActorRef sender);
=======
protected abstract void onUssdStreamEvent(UssdStreamEvent message, ActorRef self, ActorRef sender);
>>>>>>>
protected abstract void onUssdStreamEvent(UssdStreamEvent message, ActorRef self, ActorRef sender);
protected abstract void onRecording(Recording recording, ActorRef self, ActorRef sender); |
<<<<<<<
secure(account, "RestComm:Modify:Accounts", SecuredType.SECURED_ACCOUNT );
accountsDao.updateAccount(account);
=======
try {
secure(account, "RestComm:Modify:Accounts", SecuredType.SECURED_ACCOUNT );
accountsDao.updateAccount(account);
// Update SIP client of the corresponding Account
String email = account.getEmailAddress();
if (email != null && !email.equals("")) {
String username = email.split("@")[0];
Client client = clientDao.getClient(username);
if (client != null) {
// TODO: need to encrypt this password because it's
// same with Account password.
// Don't implement now. Opened another issue for it.
if (data.containsKey("Password")) {
// Md5Hash(data.getFirst("Password")).toString();
String password = data.getFirst("Password");
client = client.setPassword(password);
}
if (data.containsKey("FriendlyName")) {
client = client.setFriendlyName(data.getFirst("FriendlyName"));
}
clientDao.updateClient(client);
}
}
} catch (final AuthorizationException exception) {
return status(UNAUTHORIZED).build();
}
>>>>>>>
secure(account, "RestComm:Modify:Accounts", SecuredType.SECURED_ACCOUNT );
accountsDao.updateAccount(account);
// Update SIP client of the corresponding Account
String email = account.getEmailAddress();
if (email != null && !email.equals("")) {
String username = email.split("@")[0];
Client client = clientDao.getClient(username);
if (client != null) {
// TODO: need to encrypt this password because it's
// same with Account password.
// Don't implement now. Opened another issue for it.
if (data.containsKey("Password")) {
// Md5Hash(data.getFirst("Password")).toString();
String password = data.getFirst("Password");
client = client.setPassword(password);
}
if (data.containsKey("FriendlyName")) {
client = client.setFriendlyName(data.getFirst("FriendlyName"));
}
clientDao.updateClient(client);
}
} |
<<<<<<<
import org.restcomm.connect.dao.entities.MediaAttributes;
=======
import org.restcomm.connect.commons.amazonS3.S3AccessTool;
>>>>>>>
import org.restcomm.connect.dao.entities.MediaAttributes;
import org.restcomm.connect.commons.amazonS3.S3AccessTool; |
<<<<<<<
import org.restcomm.connect.dao.entities.Organization;
=======
import org.restcomm.connect.extension.api.ExtensionRequest;
import org.restcomm.connect.extension.api.ExtensionResponse;
import org.restcomm.connect.extension.api.ExtensionType;
import org.restcomm.connect.extension.api.RestcommExtensionException;
import org.restcomm.connect.extension.api.RestcommExtensionGeneric;
import org.restcomm.connect.extension.controller.ExtensionController;
>>>>>>>
import org.restcomm.connect.dao.entities.Organization;
import org.restcomm.connect.extension.api.ExtensionRequest;
import org.restcomm.connect.extension.api.ExtensionResponse;
import org.restcomm.connect.extension.api.ExtensionType;
import org.restcomm.connect.extension.api.RestcommExtensionException;
import org.restcomm.connect.extension.api.RestcommExtensionGeneric;
import org.restcomm.connect.extension.controller.ExtensionController;
<<<<<<<
defaultOrganization = (String) servletContext.getAttribute("defaultOrganization");
=======
//FIXME:Should new ExtensionType.SmppMessageHandler be defined?
extensions = ExtensionController.getInstance().getExtensions(ExtensionType.SmsService);
if (logger.isInfoEnabled()) {
logger.info("SmsService extensions: "+(extensions != null ? extensions.size() : "0"));
}
>>>>>>>
defaultOrganization = (String) servletContext.getAttribute("defaultOrganization");
//FIXME:Should new ExtensionType.SmppMessageHandler be defined?
extensions = ExtensionController.getInstance().getExtensions(ExtensionType.SmsService);
if (logger.isInfoEnabled()) {
logger.info("SmsService extensions: "+(extensions != null ? extensions.size() : "0"));
}
<<<<<<<
CreateSmsSession createSmsSession = (CreateSmsSession) message;
final ActorRef session = session(getOrganizationSidByAccountSid(new Sid(createSmsSession.getAccountSid())));
final SmsServiceResponse<ActorRef> response = new SmsServiceResponse<ActorRef>(session);
sender.tell(response, self);
=======
ExtensionRequest er = new ExtensionRequest();
er.setObject(message);
er.setConfiguration(this.configuration);
ExtensionResponse extensionResponse = ec.executePreOutboundAction(er, this.extensions);
if (extensionResponse.isAllowed()) {
Object obj = ec.handleExtensionResponse(extensionResponse, this.configuration);
final ActorRef session = session((Configuration)obj);
final SmsServiceResponse<ActorRef> response = new SmsServiceResponse<ActorRef>(session);
sender.tell(response, self);
} else {
final SmsServiceResponse<ActorRef> response = new SmsServiceResponse(new RestcommExtensionException("Now allowed to create SmsSession"));
sender.tell(response, self());
}
ec.executePostOutboundAction(message, this.extensions);
>>>>>>>
ExtensionRequest er = new ExtensionRequest();
er.setObject(message);
er.setConfiguration(this.configuration);
ExtensionResponse extensionResponse = ec.executePreOutboundAction(er, this.extensions);
if (extensionResponse.isAllowed()) {
Object obj = ec.handleExtensionResponse(extensionResponse, this.configuration);
CreateSmsSession createSmsSession = (CreateSmsSession) message;
final ActorRef session = session((Configuration)obj, getOrganizationSidByAccountSid(new Sid(createSmsSession.getAccountSid())));
final SmsServiceResponse<ActorRef> response = new SmsServiceResponse<ActorRef>(session);
sender.tell(response, self);
} else {
final SmsServiceResponse<ActorRef> response = new SmsServiceResponse(new RestcommExtensionException("Now allowed to create SmsSession"));
sender.tell(response, self());
}
ec.executePostOutboundAction(message, this.extensions);
<<<<<<<
Sid organizationSid = storage.getOrganizationsDao().getOrganization(storage.getAccountsDao().getAccount(number.getAccountSid()).getOrganizationSid()).getSid();
if(logger.isDebugEnabled())
logger.debug("redirectToHostedSmsApp organizationSid = "+organizationSid);
final ActorRef session = session(organizationSid);
=======
Configuration cfg = this.configuration;
//Extension
final ActorRef session = session(cfg);
>>>>>>>
Sid organizationSid = storage.getOrganizationsDao().getOrganization(storage.getAccountsDao().getAccount(number.getAccountSid()).getOrganizationSid()).getSid();
if(logger.isDebugEnabled())
logger.debug("redirectToHostedSmsApp organizationSid = "+organizationSid);
Configuration cfg = this.configuration;
//Extension
final ActorRef session = session(cfg, organizationSid);
<<<<<<<
private ActorRef session(final Sid organizationSid) {
=======
private ActorRef session(final Configuration p_configuration) {
>>>>>>>
private ActorRef session(final Configuration p_configuration, final Sid organizationSid) {
<<<<<<<
return new SmsSession(configuration, sipFactory, outboundInterface(), storage, monitoringService, servletContext, organizationSid);
=======
return new SmsSession(p_configuration, sipFactory, outboundInterface(), storage, monitoringService, servletContext);
>>>>>>>
return new SmsSession(p_configuration, sipFactory, outboundInterface(), storage, monitoringService, servletContext, organizationSid); |
<<<<<<<
=======
import org.mobicents.servlet.restcomm.dao.RecordingsDao;
import org.mobicents.servlet.restcomm.email.EmailResponse;
>>>>>>>
import org.mobicents.servlet.restcomm.email.EmailResponse;
<<<<<<<
=======
acquiringConferenceMediaGroup = new State("acquiring conference media group", new AcquiringConferenceMediaGroup(source), null);
initializingConferenceMediaGroup = new State("initializing conference media group", new InitializingConferenceMediaGroup(source), null);
>>>>>>>
<<<<<<<
=======
transitions.add(new Transition(acquiringCallMediaGroup, initializingCallMediaGroup));
transitions.add(new Transition(acquiringCallMediaGroup, hangingUp));
transitions.add(new Transition(acquiringCallMediaGroup, finished));
transitions.add(new Transition(initializingCallMediaGroup, faxing));
transitions.add(new Transition(initializingCallMediaGroup, sendingEmail));
transitions.add(new Transition(initializingCallMediaGroup, downloadingRcml));
transitions.add(new Transition(initializingCallMediaGroup, playingRejectionPrompt));
transitions.add(new Transition(initializingCallMediaGroup, pausing));
transitions.add(new Transition(initializingCallMediaGroup, checkingCache));
transitions.add(new Transition(initializingCallMediaGroup, caching));
transitions.add(new Transition(initializingCallMediaGroup, synthesizing));
transitions.add(new Transition(initializingCallMediaGroup, redirecting));
transitions.add(new Transition(initializingCallMediaGroup, processingGatherChildren));
transitions.add(new Transition(initializingCallMediaGroup, creatingRecording));
transitions.add(new Transition(initializingCallMediaGroup, creatingSmsSession));
transitions.add(new Transition(initializingCallMediaGroup, startDialing));
transitions.add(new Transition(initializingCallMediaGroup, hangingUp));
transitions.add(new Transition(initializingCallMediaGroup, finished));
>>>>>>>
<<<<<<<
=======
transitions.add(new Transition(acquiringConferenceMediaGroup, initializingConferenceMediaGroup));
transitions.add(new Transition(acquiringConferenceMediaGroup, faxing));
transitions.add(new Transition(acquiringConferenceMediaGroup, sendingEmail));
transitions.add(new Transition(acquiringConferenceMediaGroup, pausing));
transitions.add(new Transition(acquiringConferenceMediaGroup, checkingCache));
transitions.add(new Transition(acquiringConferenceMediaGroup, caching));
transitions.add(new Transition(acquiringConferenceMediaGroup, synthesizing));
transitions.add(new Transition(acquiringConferenceMediaGroup, redirecting));
transitions.add(new Transition(acquiringConferenceMediaGroup, processingGatherChildren));
transitions.add(new Transition(acquiringConferenceMediaGroup, creatingRecording));
transitions.add(new Transition(acquiringConferenceMediaGroup, creatingSmsSession));
transitions.add(new Transition(acquiringConferenceMediaGroup, startDialing));
transitions.add(new Transition(acquiringConferenceMediaGroup, hangingUp));
transitions.add(new Transition(acquiringConferenceMediaGroup, finished));
transitions.add(new Transition(initializingConferenceMediaGroup, joiningConference));
transitions.add(new Transition(initializingConferenceMediaGroup, hangingUp));
transitions.add(new Transition(initializingConferenceMediaGroup, finished));
>>>>>>>
<<<<<<<
=======
} else if (MediaGroupStateChanged.class.equals(klass)) {
final MediaGroupStateChanged event = (MediaGroupStateChanged) message;
if (MediaGroupStateChanged.State.ACTIVE == event.state()) {
if (initializingCallMediaGroup.equals(state)) {
final String direction = callInfo.direction();
if ("inbound".equals(direction) && verb != null) {
if (reject.equals(verb.name())) {
fsm.transition(message, playingRejectionPrompt);
} else if (dial.equals(verb.name())) {
dialRecordAttribute = verb.attribute("record");
fsm.transition(message, startDialing);
} else if (fax.equals(verb.name())) {
fsm.transition(message, caching);
} else if (email.equals(verb.name())) {
fsm.transition(verb, sendingEmail);
} else if (play.equals(verb.name())) {
fsm.transition(message, caching);
} else if (say.equals(verb.name())) {
// fsm.transition(message, synthesizing);
fsm.transition(message, checkingCache);
} else if (gather.equals(verb.name())) {
gatherVerb = verb;
fsm.transition(message, processingGatherChildren);
} else if (pause.equals(verb.name())) {
fsm.transition(message, pausing);
} else if (hangup.equals(verb.name())) {
fsm.transition(message, hangingUp);
} else if (redirect.equals(verb.name())) {
fsm.transition(message, redirecting);
} else if (record.equals(verb.name())) {
fsm.transition(message, creatingRecording);
} else if (sms.equals(verb.name())) {
fsm.transition(message, creatingSmsSession);
} else {
invalidVerb(verb);
}
} else {
fsm.transition(message, downloadingRcml);
}
} else if (initializingConferenceMediaGroup.equals(state)) {
fsm.transition(message, joiningConference);
}
} else if (MediaGroupStateChanged.State.INACTIVE == event.state()) {
if (!hangingUp.equals(state)) {
fsm.transition(message, hangingUp);
}
}
>>>>>>> |
<<<<<<<
import org.mobicents.servlet.restcomm.smpp.SmppService;
import org.mobicents.servlet.restcomm.smpp.SmppSessionOutbound;
=======
import org.mobicents.servlet.restcomm.telephony.TextMessage;
>>>>>>>
import org.mobicents.servlet.restcomm.smpp.SmppService;
import org.mobicents.servlet.restcomm.smpp.SmppSessionOutbound;
import org.mobicents.servlet.restcomm.telephony.TextMessage; |
<<<<<<<
addNameDescription(((SFSpatialSamplingFeatureDocument) feature).getSFSpatialSamplingFeature(),
sampFeat);
=======
addNameDescription(((SFSpatialSamplingFeatureDocument) feature).getSFSpatialSamplingFeature(), sampFeat);
setMetaDataProperty(((SFSpatialSamplingFeatureDocument) feature).getSFSpatialSamplingFeature(), sampFeat);
>>>>>>>
addNameDescription(((SFSpatialSamplingFeatureDocument) feature).getSFSpatialSamplingFeature(),
sampFeat);
setMetaDataProperty(((SFSpatialSamplingFeatureDocument) feature).getSFSpatialSamplingFeature(), sampFeat);
<<<<<<<
=======
private void setMetaDataProperty(SFSpatialSamplingFeatureType sfssft, SamplingFeature sampFeat) throws OwsExceptionReport {
if (sampFeat.isSetMetaDataProperty()) {
for (AbstractMetaData abstractMetaData : sampFeat.getMetaDataProperty()) {
XmlObject encodeObject = CodingHelper.encodeObjectToXml(GmlConstants.NS_GML_32, abstractMetaData);
XmlObject substituteElement = XmlHelper.substituteElement(
sfssft.addNewMetaDataProperty().addNewAbstractMetaData(), encodeObject);
substituteElement.set(encodeObject);
}
}
}
>>>>>>>
private void setMetaDataProperty(SFSpatialSamplingFeatureType sfssft, SamplingFeature sampFeat) throws OwsExceptionReport {
if (sampFeat.isSetMetaDataProperty()) {
for (AbstractMetaData abstractMetaData : sampFeat.getMetaDataProperty()) {
XmlObject encodeObject = CodingHelper.encodeObjectToXml(GmlConstants.NS_GML_32, abstractMetaData);
XmlObject substituteElement = XmlHelper.substituteElement(
sfssft.addNewMetaDataProperty().addNewAbstractMetaData(), encodeObject);
substituteElement.set(encodeObject);
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.