mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-29 08:13:53 +00:00
remove exceptions not thrown
This commit is contained in:
parent
c9137be051
commit
1885f4b21c
@ -37,8 +37,6 @@ package net.sourceforge.plantuml.dedication;
|
|||||||
|
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public final class TinyHashableString {
|
public final class TinyHashableString {
|
||||||
|
|
||||||
private final String sentence;
|
private final String sentence;
|
||||||
@ -48,11 +46,11 @@ public final class TinyHashableString {
|
|||||||
this.sentence = sentence;
|
this.sentence = sentence;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final String getSentence() {
|
public String getSentence() {
|
||||||
return sentence;
|
return sentence;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final synchronized int tinyHash() throws UnsupportedEncodingException {
|
public synchronized int tinyHash() {
|
||||||
if (cachedTinyHash == -1) {
|
if (cachedTinyHash == -1) {
|
||||||
cachedTinyHash = Noise.shortHash(sentence.getBytes(UTF_8), Dedication.N.toByteArray());
|
cachedTinyHash = Noise.shortHash(sentence.getBytes(UTF_8), Dedication.N.toByteArray());
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class PSystemWelcome extends PlainDiagram {
|
|||||||
return getGraphicStrings();
|
return getGraphicStrings();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextBlockBackcolored getGraphicStrings() throws IOException {
|
public TextBlockBackcolored getGraphicStrings() {
|
||||||
if (position != null) {
|
if (position != null) {
|
||||||
return GraphicStrings.createBlackOnWhite(strings, PSystemVersion.getPlantumlImage(), position);
|
return GraphicStrings.createBlackOnWhite(strings, PSystemVersion.getPlantumlImage(), position);
|
||||||
}
|
}
|
||||||
|
@ -37,13 +37,11 @@ package net.sourceforge.plantuml.eggs;
|
|||||||
|
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
public class SentenceProducer {
|
public class SentenceProducer {
|
||||||
|
|
||||||
private final String secret;
|
private final String secret;
|
||||||
|
|
||||||
public SentenceProducer(String sentence1, String sentence2) throws UnsupportedEncodingException {
|
public SentenceProducer(String sentence1, String sentence2) {
|
||||||
final byte[] key = EggUtils.fromSecretSentence(sentence1).toByteArray();
|
final byte[] key = EggUtils.fromSecretSentence(sentence1).toByteArray();
|
||||||
final byte[] sen2 = sentence2.getBytes(UTF_8);
|
final byte[] sen2 = sentence2.getBytes(UTF_8);
|
||||||
final byte[] crypted = EggUtils.xor(sen2, key);
|
final byte[] crypted = EggUtils.xor(sen2, key);
|
||||||
|
Loading…
Reference in New Issue
Block a user