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 8B3A9200B9A for ; Fri, 7 Oct 2016 12:15:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8997B160AE8; Fri, 7 Oct 2016 10:15:44 +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 D0B97160AD6 for ; Fri, 7 Oct 2016 12:15:43 +0200 (CEST) Received: (qmail 18696 invoked by uid 500); 7 Oct 2016 10:15:43 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 18683 invoked by uid 99); 7 Oct 2016 10:15:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2016 10:15:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 881B1C0136 for ; Fri, 7 Oct 2016 10:15:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id esxKu-BYWPAg for ; Fri, 7 Oct 2016 10:15:41 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id EA6D25F233 for ; Fri, 7 Oct 2016 10:15:40 +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 B10B7E0099 for ; Fri, 7 Oct 2016 10:15:39 +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 35BD33A039C for ; Fri, 7 Oct 2016 10:15:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1763723 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/ScanExpediter.java Date: Fri, 07 Oct 2016 10:15:38 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161007101539.35BD33A039C@svn01-us-west.apache.org> archived-at: Fri, 07 Oct 2016 10:15:44 -0000 Author: sebb Date: Fri Oct 7 10:15:38 2016 New Revision: 1763723 URL: http://svn.apache.org/viewvc?rev=1763723&view=rev Log: no point having protected objects in a package-protected class Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/ScanExpediter.java Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/ScanExpediter.java URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/ScanExpediter.java?rev=1763723&r1=1763722&r2=1763723&view=diff ============================================================================== --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/ScanExpediter.java (original) +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/ScanExpediter.java Fri Oct 7 10:15:38 2016 @@ -33,17 +33,17 @@ import org.apache.commons.imaging.format import static org.apache.commons.imaging.common.BinaryFunctions.*; abstract class ScanExpediter { - protected final int width; - protected final int height; - protected final InputStream is; - protected final BufferedImage bi; - protected final PngColorType pngColorType; - protected final int bitDepth; - protected final int bytesPerPixel; - protected final int bitsPerPixel; - protected final PngChunkPlte pngChunkPLTE; - protected final GammaCorrection gammaCorrection; - protected final TransparencyFilter transparencyFilter; + final int width; + final int height; + final InputStream is; + final BufferedImage bi; + final PngColorType pngColorType; + final int bitDepth; + final int bytesPerPixel; + final int bitsPerPixel; + final PngChunkPlte pngChunkPLTE; + final GammaCorrection gammaCorrection; + final TransparencyFilter transparencyFilter; public ScanExpediter(final int width, final int height, final InputStream is, final BufferedImage bi, final PngColorType pngColorType, final int bitDepth, final int bitsPerPixel, @@ -64,24 +64,24 @@ abstract class ScanExpediter { this.transparencyFilter = transparencyFilter; } - protected final int getBitsToBytesRoundingUp(final int bits) { + final int getBitsToBytesRoundingUp(final int bits) { return (bits + 7) / 8; } - protected final int getPixelARGB(final int alpha, final int red, final int green, final int blue) { + final int getPixelARGB(final int alpha, final int red, final int green, final int blue) { return ((0xff & alpha) << 24) | ((0xff & red) << 16) | ((0xff & green) << 8) | ((0xff & blue) << 0); } - protected final int getPixelRGB(final int red, final int green, final int blue) { + final int getPixelRGB(final int red, final int green, final int blue) { return getPixelARGB(0xff, red, green, blue); } public abstract void drive() throws ImageReadException, IOException; - protected int getRGB(final BitParser bitParser, final int pixelIndexInScanline) + int getRGB(final BitParser bitParser, final int pixelIndexInScanline) throws ImageReadException, IOException { switch (pngColorType) { @@ -171,7 +171,7 @@ abstract class ScanExpediter { } } - protected ScanlineFilter getScanlineFilter(FilterType filterType, int bytesPerPixel) throws ImageReadException { + ScanlineFilter getScanlineFilter(FilterType filterType, int bytesPerPixel) throws ImageReadException { switch (filterType) { case NONE: return new ScanlineFilterNone(); @@ -188,7 +188,7 @@ abstract class ScanExpediter { return null; } - protected byte[] unfilterScanline(final FilterType filterType, final byte[] src, final byte[] prev, + byte[] unfilterScanline(final FilterType filterType, final byte[] src, final byte[] prev, final int bytesPerPixel) throws ImageReadException, IOException { final ScanlineFilter filter = getScanlineFilter(filterType, bytesPerPixel); @@ -197,7 +197,7 @@ abstract class ScanExpediter { return dst; } - protected byte[] getNextScanline(final InputStream is, final int length, final byte[] prev, + byte[] getNextScanline(final InputStream is, final int length, final byte[] prev, final int bytesPerPixel) throws ImageReadException, IOException { final int filterType = is.read(); if (filterType < 0) {