"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/buck_project_builder/src/main/java/com/facebook/buck_project_builder/DebugOutput.java" between
pyre-check-0.0.54.tar.gz and pyre-check-0.0.55.tar.gz

About: Pyre is a performant type checker for Python (ships with Pysa, a security focused static analysis tool).

DebugOutput.java  (pyre-check-0.0.54):DebugOutput.java  (pyre-check-0.0.55)
skipping to change at line 14 skipping to change at line 14
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
package com.facebook.buck_project_builder; package com.facebook.buck_project_builder;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.HashSet; import java.util.HashSet;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.HashSet;
import java.util.ArrayList;
import java.util.List;
public final class DebugOutput { public final class DebugOutput {
private final Set<String> conflictingFiles; private final Set<String> conflictingFiles;
private final Set<String> unsupportedFiles; private final Set<String> unsupportedFiles;
private final int MAXIMUM_FILES = 100;
/** Used for gson serialization. */ /** Used for gson serialization. */
private DebugOutput() { private DebugOutput() {
this(new HashSet<>(), new HashSet<>()); this(new HashSet<>(), new HashSet<>());
} }
public DebugOutput(Set<String> conflictingFiles, Set<String> unsupportedFiles) { public DebugOutput(Set<String> conflictingFiles, Set<String> unsupportedFiles) {
this.conflictingFiles = conflictingFiles; this.conflictingFiles = truncateSet(conflictingFiles);
this.unsupportedFiles = unsupportedFiles; this.unsupportedFiles = truncateSet(unsupportedFiles);
}
/** We don't want to send too much data to the parent process. */
private Set<String> truncateSet(Set<String> set) {
List<String> temporaryList = new ArrayList<String>();
temporaryList.addAll(set);
Set<String> temporarySet = new HashSet<String>();
temporarySet.addAll(temporaryList.subList(0, Math.min(set.size(), MAXIMUM_FI
LES)));
return temporarySet;
} }
@Override @Override
public boolean equals(@Nullable Object other) { public boolean equals(@Nullable Object other) {
if (this == other) { if (this == other) {
return true; return true;
} }
if (other == null || getClass() != other.getClass()) { if (other == null || getClass() != other.getClass()) {
return false; return false;
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)