Skip to content

Commit

Permalink
mimepull 1.10.0, build plugins,
Browse files Browse the repository at this point in the history
code cleanup

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed May 9, 2022
1 parent 955d8f8 commit 5956e6a
Show file tree
Hide file tree
Showing 35 changed files with 196 additions and 161 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<xml.soap-api.version>3.0.0</xml.soap-api.version>

<fastinfoset.version>2.1.0</fastinfoset.version>
<mimepull.version>1.9.15</mimepull.version>
<mimepull.version>1.10.0</mimepull.version>
<stax-ex.version>2.1.0</stax-ex.version>
<junit.version>4.13.2</junit.version>
</properties>
Expand Down Expand Up @@ -146,12 +146,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M6</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.4</version>
<version>5.1.5</version>
<configuration>
<niceManifest>true</niceManifest>
<instructions>
Expand All @@ -172,7 +172,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -187,7 +187,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion saaj-ri/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<version>0.8.8</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ else if (c == '"') {
// Check for SPECIAL or CTL
if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) {
currentPos++; // re-position currentPos
char ch[] = new char[1];
char[] ch = new char[1];
ch[0] = c;
return new Token(c, new String(ch));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ static int checkAscii(InputStream is, int max, boolean breakOnNonAscii) {
int linelen = 0;
boolean longLine = false, badEOL = false;
boolean checkEOL = encodeEolStrict && breakOnNonAscii;
byte buf[] = null;
byte[] buf = null;
if (max != 0) {
block = (max == ALL) ? 4096 : Math.min(max, 4096);
buf = new byte[block];
Expand Down Expand Up @@ -1446,12 +1446,12 @@ public void write(int b) throws IOException {
}

@Override
public void write(byte b[]) throws IOException {
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}

@Override
public void write(byte b[], int off, int len) throws IOException {
public void write(byte[] b, int off, int len) throws IOException {
len += off;
for (int i = off; i < len ; i++)
check(b[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public int available() throws IOException {
* This character array provides the character to value map
* based on RFC1521.
*/
private final static char pem_array[] = {
private final static char[] pem_array = {
'A','B','C','D','E','F','G','H', // 0
'I','J','K','L','M','N','O','P', // 1
'Q','R','S','T','U','V','W','X', // 2
Expand All @@ -131,7 +131,7 @@ public int available() throws IOException {
'4','5','6','7','8','9','+','/' // 7
};

private final static byte pem_convert_array[] = new byte[256];
private final static byte[] pem_convert_array = new byte[256];

static {
for (int i = 0; i < 255; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void close() throws IOException {
}

/** This array maps the characters to their 6 bit values */
private final static char pem_array[] = {
private final static char[] pem_array = {
'A','B','C','D','E','F','G','H', // 0
'I','J','K','L','M','N','O','P', // 1
'Q','R','S','T','U','V','W','X', // 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
*
* @author Kohsuke Kawaguchi
*/
public abstract class OutputUtil {
public final class OutputUtil {
private static byte[] newline = {'\r','\n'};

private OutputUtil() {}

public static void writeln(String s,OutputStream out) throws IOException {
writeAsAscii(s,out);
writeln(out);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void outputCRLF() throws IOException {
}

// The encoding table
private final static char hex[] = {
private final static char[] hex = {
'0','1', '2', '3', '4', '5', '6', '7',
'8','9', 'A', 'B', 'C', 'D', 'E', 'F'
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -41,7 +41,7 @@
* EnvelopeFactory creates SOAP Envelope objects using different
* underlying implementations.
*/
public class EnvelopeFactory {
public final class EnvelopeFactory {
private static final String SAX_PARSER_POOL_SIZE_PROP_NAME = "com.sun.xml.messaging.saaj.soap.saxParserPoolSize";
private static final int DEFAULT_SAX_PARSER_POOL_SIZE = 5;

Expand Down Expand Up @@ -70,6 +70,8 @@ public Integer run() {
}
};

private EnvelopeFactory() {}

public static Envelope createEnvelope(Source src, SOAPPartImpl soapPart)
throws SOAPException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -37,7 +37,7 @@ public FastInfosetDataContentHandler() {
*/
@Override
public ActivationDataFlavor[] getTransferDataFlavors() { // throws Exception;
ActivationDataFlavor flavors[] = new ActivationDataFlavor[1];
ActivationDataFlavor[] flavors = new ActivationDataFlavor[1];
flavors[0] = new ActivationDataFlavor(
FastInfosetReflection.getFastInfosetSource_class(),
"application/fastinfoset", "Fast Infoset");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class GifDataContentHandler extends Component implements DataContentHandl
"image/gif",
"GIF Image");

public GifDataContentHandler() {}

protected ActivationDataFlavor getDF() {
return myDF;
}
Expand Down Expand Up @@ -69,7 +71,7 @@ public Object getContent(DataSource ds) throws IOException {
InputStream is = ds.getInputStream();
int pos = 0;
int count;
byte buf[] = new byte[1024];
byte[] buf = new byte[1024];

while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
pos += count;
Expand All @@ -79,7 +81,7 @@ public Object getContent(DataSource ds) throws IOException {
size += size;
else
size += 256*1024;
byte tbuf[] = new byte[size];
byte[] tbuf = new byte[size];
System.arraycopy(buf, 0, tbuf, 0, pos);
buf = tbuf;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ public class JpegDataContentHandler

public static final String STR_SRC = "java.awt.Image";

public JpegDataContentHandler() {}

/**
* Return the DataFlavors for this <code>DataContentHandler</code>
* @return The DataFlavors.
*/
@Override
public ActivationDataFlavor[] getTransferDataFlavors() { // throws Exception;
ActivationDataFlavor flavors[] = new ActivationDataFlavor[1];
ActivationDataFlavor[] flavors = new ActivationDataFlavor[1];

try {
flavors[0] =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -22,6 +22,8 @@ public class MultipartDataContentHandler implements DataContentHandler {
"multipart/mixed",
"Multipart");

public MultipartDataContentHandler() {}

/**
* Return the DataFlavors for this <code>DataContentHandler</code>.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -32,6 +32,8 @@ public abstract class SOAPFactoryImpl extends SOAPFactory {
log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
"com.sun.xml.messaging.saaj.soap.LocalStrings");

protected SOAPFactoryImpl() {}

protected abstract SOAPDocumentImpl createDocument();

@Override
Expand Down
Loading

0 comments on commit 5956e6a

Please sign in to comment.