Loading CHANGELOG.md +3 −0 Original line number Diff line number Diff line # Changes in version 2.1?.? - 2020-0?-?? * Minor changes - Avoid invoking overridable methods from constructors. # Changes in version 2.10.0 - 2020-01-15 Loading src/main/java/org/torproject/descriptor/impl/BridgeNetworkStatusImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ public class BridgeNetworkStatusImpl extends NetworkStatusImpl protected BridgeNetworkStatusImpl(byte[] rawDescriptorBytes, int[] offsetAndLength, File descriptorFile, String fileName) throws DescriptorParseException { super(rawDescriptorBytes, offsetAndLength, descriptorFile, false, false); super(rawDescriptorBytes, offsetAndLength, descriptorFile, false); this.splitAndParseParts(false); this.setPublishedMillisFromFileName(fileName); } Loading src/main/java/org/torproject/descriptor/impl/NetworkStatusImpl.java +3 −4 Original line number Diff line number Diff line Loading @@ -26,14 +26,13 @@ public abstract class NetworkStatusImpl extends DescriptorImpl { protected Map<Integer, String> flagStrings = new HashMap<>(); protected NetworkStatusImpl(byte[] rawDescriptorBytes, int[] offsetAndLength, File descriptorFile, boolean containsDirSourceEntries, boolean blankLinesAllowed) throws DescriptorParseException { File descriptorFile, boolean blankLinesAllowed) throws DescriptorParseException { super(rawDescriptorBytes, offsetAndLength, descriptorFile, blankLinesAllowed); this.splitAndParseParts(containsDirSourceEntries); } private void splitAndParseParts(boolean containsDirSourceEntries) protected final void splitAndParseParts(boolean containsDirSourceEntries) throws DescriptorParseException { int firstRIndex = this.findFirstIndexOfKey(Key.R); int firstDirectorySignatureIndex = this.findFirstIndexOfKey( Loading src/main/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,8 @@ public class RelayNetworkStatusConsensusImpl extends NetworkStatusImpl protected RelayNetworkStatusConsensusImpl(byte[] consensusBytes, int[] offsetAndLimit, File descriptorFile) throws DescriptorParseException { super(consensusBytes, offsetAndLimit, descriptorFile, true, false); super(consensusBytes, offsetAndLimit, descriptorFile, false); this.splitAndParseParts(true); Set<Key> exactlyOnceKeys = EnumSet.of( Key.VOTE_STATUS, Key.CONSENSUS_METHOD, Key.VALID_AFTER, Key.FRESH_UNTIL, Key.VALID_UNTIL, Key.VOTING_DELAY, Key.KNOWN_FLAGS); Loading src/main/java/org/torproject/descriptor/impl/RelayNetworkStatusImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ public class RelayNetworkStatusImpl extends NetworkStatusImpl protected RelayNetworkStatusImpl(byte[] statusBytes, int[] offsetAndLength, File descriptorFile) throws DescriptorParseException { super(statusBytes, offsetAndLength, descriptorFile, false, true); super(statusBytes, offsetAndLength, descriptorFile, true); this.splitAndParseParts(false); Set<Key> exactlyOnceKeys = EnumSet.of( Key.NETWORK_STATUS_VERSION, Key.DIR_SOURCE, Key.FINGERPRINT, Key.CONTACT, Key.DIR_SIGNING_KEY, Key.PUBLISHED); Loading Loading
CHANGELOG.md +3 −0 Original line number Diff line number Diff line # Changes in version 2.1?.? - 2020-0?-?? * Minor changes - Avoid invoking overridable methods from constructors. # Changes in version 2.10.0 - 2020-01-15 Loading
src/main/java/org/torproject/descriptor/impl/BridgeNetworkStatusImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ public class BridgeNetworkStatusImpl extends NetworkStatusImpl protected BridgeNetworkStatusImpl(byte[] rawDescriptorBytes, int[] offsetAndLength, File descriptorFile, String fileName) throws DescriptorParseException { super(rawDescriptorBytes, offsetAndLength, descriptorFile, false, false); super(rawDescriptorBytes, offsetAndLength, descriptorFile, false); this.splitAndParseParts(false); this.setPublishedMillisFromFileName(fileName); } Loading
src/main/java/org/torproject/descriptor/impl/NetworkStatusImpl.java +3 −4 Original line number Diff line number Diff line Loading @@ -26,14 +26,13 @@ public abstract class NetworkStatusImpl extends DescriptorImpl { protected Map<Integer, String> flagStrings = new HashMap<>(); protected NetworkStatusImpl(byte[] rawDescriptorBytes, int[] offsetAndLength, File descriptorFile, boolean containsDirSourceEntries, boolean blankLinesAllowed) throws DescriptorParseException { File descriptorFile, boolean blankLinesAllowed) throws DescriptorParseException { super(rawDescriptorBytes, offsetAndLength, descriptorFile, blankLinesAllowed); this.splitAndParseParts(containsDirSourceEntries); } private void splitAndParseParts(boolean containsDirSourceEntries) protected final void splitAndParseParts(boolean containsDirSourceEntries) throws DescriptorParseException { int firstRIndex = this.findFirstIndexOfKey(Key.R); int firstDirectorySignatureIndex = this.findFirstIndexOfKey( Loading
src/main/java/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,8 @@ public class RelayNetworkStatusConsensusImpl extends NetworkStatusImpl protected RelayNetworkStatusConsensusImpl(byte[] consensusBytes, int[] offsetAndLimit, File descriptorFile) throws DescriptorParseException { super(consensusBytes, offsetAndLimit, descriptorFile, true, false); super(consensusBytes, offsetAndLimit, descriptorFile, false); this.splitAndParseParts(true); Set<Key> exactlyOnceKeys = EnumSet.of( Key.VOTE_STATUS, Key.CONSENSUS_METHOD, Key.VALID_AFTER, Key.FRESH_UNTIL, Key.VALID_UNTIL, Key.VOTING_DELAY, Key.KNOWN_FLAGS); Loading
src/main/java/org/torproject/descriptor/impl/RelayNetworkStatusImpl.java +2 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ public class RelayNetworkStatusImpl extends NetworkStatusImpl protected RelayNetworkStatusImpl(byte[] statusBytes, int[] offsetAndLength, File descriptorFile) throws DescriptorParseException { super(statusBytes, offsetAndLength, descriptorFile, false, true); super(statusBytes, offsetAndLength, descriptorFile, true); this.splitAndParseParts(false); Set<Key> exactlyOnceKeys = EnumSet.of( Key.NETWORK_STATUS_VERSION, Key.DIR_SOURCE, Key.FINGERPRINT, Key.CONTACT, Key.DIR_SIGNING_KEY, Key.PUBLISHED); Loading