"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSName.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

TestCOSName.java  (pdfbox-2.0.23-src):TestCOSName.java  (pdfbox-2.0.24-src)
skipping to change at line 19 skipping to change at line 19
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.pdfbox.cos; package org.apache.pdfbox.cos;
import static org.junit.Assert.assertNull;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.pdmodel.PDPage;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
public class TestCOSName public class TestCOSName
{ {
/** /**
skipping to change at line 50 skipping to change at line 52
document.getDocumentCatalog().getCOSObject().setString(COSName.getPDFNam e(special), special); document.getDocumentCatalog().getCOSObject().setString(COSName.getPDFNam e(special), special);
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
document.save(baos); document.save(baos);
document.close(); document.close();
document = PDDocument.load(baos.toByteArray()); document = PDDocument.load(baos.toByteArray());
COSDictionary catalogDict = document.getDocumentCatalog().getCOSObject() ; COSDictionary catalogDict = document.getDocumentCatalog().getCOSObject() ;
Assert.assertTrue(catalogDict.containsKey(special)); Assert.assertTrue(catalogDict.containsKey(special));
Assert.assertEquals(special, catalogDict.getString(special)); Assert.assertEquals(special, catalogDict.getString(special));
document.close(); document.close();
} }
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added

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