Skip to content

Commit

Permalink
Refactored static imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrodyne committed Feb 13, 2024
1 parent 6719ac9 commit ebc6e7f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions jaxb-ri/xjc/src/test/java/com/sun/tools/xjc/CodeGenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
import com.sun.tools.xjc.api.S2JJAXBModel;
import com.sun.tools.xjc.api.SchemaCompiler;
import com.sun.tools.xjc.api.XJC;

import static com.sun.tools.xjc.util.Util.getSystemProperty;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertNotEquals;
import com.sun.tools.xjc.util.Util;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand All @@ -36,9 +33,11 @@
import java.io.StringWriter;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;

import junit.framework.TestCase;
import org.junit.Assert;
import org.xml.sax.InputSource;

/**
Expand Down Expand Up @@ -169,7 +168,7 @@ public void testIssue1785() throws FileNotFoundException, URISyntaxException, IO
assertNotNull(suidFieldName + " value", dc.fields().get(suidFieldName));

// Generate the Document classes to a directory, for review.
if ( getSystemProperty(XML_API_TEST) != null ) {
if ( Util.getSystemProperty(XML_API_TEST) != null ) {
File codeModelDestPath = new File(codeModelDestPathName);
if ( !codeModelDestPath.exists() )
codeModelDestPath.mkdirs();
Expand All @@ -179,7 +178,7 @@ public void testIssue1785() throws FileNotFoundException, URISyntaxException, IO
// Generate the Document classes to single String, for assertions.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
cm.build(new SingleStreamCodeWriter(baos));
String cmString = baos.toString(UTF_8);
String cmString = baos.toString(StandardCharsets.UTF_8);

// Assert non-empty javadoc blocks.
assertNonEmptyJavadocBlocks(cmString);
Expand Down Expand Up @@ -211,7 +210,7 @@ private void assertNonEmptyJavadocBlocks(String cmString) throws IOException {
int javadocLen = javadocBlock.toString().trim().length();

// Assert current javadoc block length is not zero!
assertNotEquals("Empty javadoc at " + lineNo, 0, javadocLen);
Assert.assertNotEquals("Empty javadoc at " + lineNo, 0, javadocLen);
javadocBlock = null;
}
else
Expand Down

0 comments on commit ebc6e7f

Please sign in to comment.