Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E921200BB7 for ; Wed, 9 Nov 2016 08:53:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3D167160AFD; Wed, 9 Nov 2016 07:53:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 81813160AEE for ; Wed, 9 Nov 2016 08:53:30 +0100 (CET) Received: (qmail 40013 invoked by uid 500); 9 Nov 2016 07:53:29 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 40004 invoked by uid 99); 9 Nov 2016 07:53:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2016 07:53:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EA75E181360 for ; Wed, 9 Nov 2016 07:53:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id YyX79KBbB53L for ; Wed, 9 Nov 2016 07:53:28 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C90485FC6E for ; Wed, 9 Nov 2016 07:53:27 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D536DE0E0F for ; Wed, 9 Nov 2016 07:53:24 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 99E7F3A0230 for ; Wed, 9 Nov 2016 07:53:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1768860 - /pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java Date: Wed, 09 Nov 2016 07:53:24 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161109075324.99E7F3A0230@svn01-us-west.apache.org> archived-at: Wed, 09 Nov 2016 07:53:31 -0000 Author: tilman Date: Wed Nov 9 07:53:23 2016 New Revision: 1768860 URL: http://svn.apache.org/viewvc?rev=1768860&view=rev Log: PDFBOX-2852: add missing type arguments + remove unneeded code Modified: pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java Modified: pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java?rev=1768860&r1=1768859&r2=1768860&view=diff ============================================================================== --- pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java (original) +++ pdfbox/branches/2.0/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java Wed Nov 9 07:53:23 2016 @@ -222,7 +222,7 @@ public abstract class PreflightStreamEng * @throws ContentStreamException * ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY if the operand is invalid */ - protected void validateRenderingIntent(Operator operator, List arguments) throws ContentStreamException + protected void validateRenderingIntent(Operator operator, List arguments) throws ContentStreamException { if ("ri".equals(operator.getName())) { @@ -231,10 +231,6 @@ public abstract class PreflightStreamEng { riArgument0 = ((COSName) arguments.get(0)).getName(); } - else if (arguments.get(0) instanceof String) - { - riArgument0 = (String) arguments.get(0); - } if (!RenderingIntents.contains(riArgument0)) { @@ -518,7 +514,7 @@ public abstract class PreflightStreamEng * @param arguments * @throws IOException */ - protected void checkSetColorSpaceOperators(Operator operator, List arguments) throws IOException + protected void checkSetColorSpaceOperators(Operator operator, List arguments) throws IOException { if (!("CS".equals(operator.getName()) || "cs".equals(operator.getName()))) { @@ -526,11 +522,7 @@ public abstract class PreflightStreamEng } String colorSpaceName; - if (arguments.get(0) instanceof String) - { - colorSpaceName = (String) arguments.get(0); - } - else if (arguments.get(0) instanceof COSString) + if (arguments.get(0) instanceof COSString) { colorSpaceName = (arguments.get(0)).toString(); }