Skip to content

Commit

Permalink
8240499: Enforce whitespace checking for additional source files
Browse files Browse the repository at this point in the history
Reviewed-by: jvos, arapte
  • Loading branch information
kevinrushforth committed Sep 15, 2020
1 parent d6dee34 commit 976a763
Show file tree
Hide file tree
Showing 41 changed files with 132 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;
; Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
; Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
;
; This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -36,7 +36,7 @@ version=0
domain=openjdk.org

[checks "whitespace"]
files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$
files=.*\.java$|.*\.c$|.*\.h$|.*\.cpp$|.*\.hpp$|.*\.cc$|.*\.jsl$|.*\.fxml$|.*\.css$|.*\.m$|.*\.mm$|.*\.frag$|.*\.vert$|.*\.hlsl$|.*\.metal$|.*\.gradle$|.*\.groovy$|.*\.g4$|.*\.stg$

[checks "reviewers"]
minimum=1
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3793,7 +3793,7 @@ project(":systemTests") {
exclude("test/robot/**");
}
if (!IS_UNSTABLE_TEST) {
// JDK-8196607 Don't run monocle test cases
// JDK-8196607 Don't run monocle test cases
exclude("test/robot/com/sun/glass/ui/monocle/**");
}
if (!IS_AWT_TEST) {
Expand Down Expand Up @@ -4711,8 +4711,8 @@ compileTargets { t ->
def publicationDirName = "${platformPrefix}publications"
def publicationDir = "${rootProject.buildDir}/${publicationDirName}"

moduleProjList.each { project ->
// Create publications to be uploaded
moduleProjList.each { project ->
// Create publications to be uploaded

def moduleName = project.ext.moduleName
def buildDir = project.buildDir
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/android.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ if (compileNativeText) {
"-I$freetypeDir/include", "-I$freetypeDir/include/freetype2"].flatten()

ANDROID.fontNativeFreetype.linkFlags =
IS_STATIC_BUILD ? [linkFlags].flatten() :
IS_STATIC_BUILD ? [linkFlags].flatten() :
[linkFlags, "-llog",
"-L$freetypeDir/lib", "$freetypeDir/lib/libfreetype.a"].flatten()
}
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/win.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ if (file(vs2017DllPath).exists()) {
}
else {
ext.WIN.VS2017DLLNames = [
];
];
ext.WIN.VS2017DLLs = [
];
];
}

def WinSDKDLLsPath = cygpath("${winSdkDllDir}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ INTCONSTANT : ('0' | '1'..'9' DIGIT*) ;
FLOATCONSTANT
: DIGIT+ '.' DIGIT*
| '.' DIGIT+
;
;

fragment
DIGIT : '0'..'9' ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class PPS$peerName$Peer extends $superClass$$genericsDecl$ $interfaceDecl
}

$usercode$

@Override
protected boolean isSamplerLinear(int i) {
switch (i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class JSW$peerName$Peer extends JSWEffectPeer$genericsDecl$ $interfaceDec
setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
int dstscan = dst.getScanlineStride();
int[] dstPixels = dst.getPixelArray();

int dyi;
float color_x, color_y, color_z, color_w;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class ME$peerName$Peer extends MEEffectPeer$genericsDecl$ $interfaceDecl$
setDestNativeBounds(dst.getWidth(), dst.getHeight());
int dstscan = dst.getWidth();
int[] dstPixels = ((DataBufferInt)dst.getRaster().getDataBuffer()).getData();

$constants$

filter(dstPixels, dstx, dsty, dstw, dsth, dstscan$params$);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class SSE$peerName$Peer extends SSEEffectPeer$genericsDecl$ $interfaceDec
setDestNativeBounds(dst.getPhysicalWidth(), dst.getPhysicalHeight());
int dstscan = dst.getScanlineStride();
int[] dstPixels = dst.getPixelArray();

$constants$

filter(dstPixels, dstx, dsty, dstw, dsth, dstscan$params$);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ - (void)sendJavaMouseEvent:(NSEvent *)theEvent
rotationX = (jdouble)[theEvent deltaX];
rotationY = (jdouble)[theEvent deltaY];
}

//XXX: check for equality for doubles???
if (rotationX == 0.0 && rotationY == 0.0)
{
Expand Down Expand Up @@ -1133,7 +1133,7 @@ - (void)notifyInputMethod:(id) aString attr:(int)attr length:(int)length cursor:
if ([NSThread isMainThread] == YES)
{
GET_MAIN_JENV;

jstring jStr = convertNSStringToJString(aString, length);
if (jStr != NULL) {
(*env)->CallVoidMethod(env, self->jView, jViewNotifyInputMethodMac, jStr, attr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ varying vec2 oTexCoords;

vec4 apply_diffuse() {
vec4 dTexColor = texture2D(diffuseTexture, oTexCoords);
return dTexColor * diffuseColor;
return dTexColor * diffuseColor;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ vec3 getLocalVector(vec3 global, vec3 tangentFrame[3]) {

void main()
{
vec3 tangentFrame[3];
vec3 tangentFrame[3];

vec4 worldPos = worldMatrix * vec4(pos, 1.0);

// Note: The breaking of a vector and scale computation statement into
// 2 separate statements is intentional to workaround a shader
// compiler bug on the Freescale iMX6 platform. See RT-37789 for details.
// compiler bug on the Freescale iMX6 platform. See RT-37789 for details.
vec3 t1 = tangent.xyz * tangent.yzx;
t1 *= 2.0;
vec3 t2 = tangent.zxy * tangent.www;
Expand All @@ -72,20 +72,20 @@ void main()
tangentFrame[1] = vec3(r2.x, t4.z, r1.y);
tangentFrame[2] = vec3(r1.z, r2.y, t4.x);
tangentFrame[2] *= (tangent.w>=0.0) ? 1.0 : -1.0;
mat3 sWorldMatrix = mat3(worldMatrix[0].xyz,
worldMatrix[1].xyz,

mat3 sWorldMatrix = mat3(worldMatrix[0].xyz,
worldMatrix[1].xyz,
worldMatrix[2].xyz);

//Translate the tangent frame to world space.
tangentFrame[0] = sWorldMatrix * tangentFrame[0];
tangentFrame[1] = sWorldMatrix * tangentFrame[1];
tangentFrame[2] = sWorldMatrix * tangentFrame[2];

vec3 Eye = camPos - worldPos.xyz;

eyePos = getLocalVector(Eye, tangentFrame);

vec3 L = lights[0].pos.xyz - worldPos.xyz;
lightTangentSpacePositions[0] = vec4( getLocalVector(L,tangentFrame)*lights[0].pos.w, 1.0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "config.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "config.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSErro
String createTemporaryZipArchive(const String& path)
{
String temporaryFile;

RetainPtr<NSFileCoordinator> coordinator = adoptNS([[NSFileCoordinator alloc] initWithFilePresenter:nil]);
[coordinator coordinateReadingItemAtURL:[NSURL fileURLWithPath:path] options:NSFileCoordinatorReadingWithoutChanges error:nullptr byAccessor:[&](NSURL *newURL) mutable {
CString archivePath([NSTemporaryDirectory() stringByAppendingPathComponent:@"WebKitGeneratedFileXXXXXX"].fileSystemRepresentation);
if (mkstemp(archivePath.mutableData()) == -1)
return;

NSDictionary *options = @{
(__bridge id)kBOMCopierOptionCreatePKZipKey : @YES,
(__bridge id)kBOMCopierOptionSequesterResourcesKey : @YES,
(__bridge id)kBOMCopierOptionKeepParentKey : @YES,
(__bridge id)kBOMCopierOptionCopyResourcesKey : @YES,
};

BOMCopier copier = BOMCopierNew();
if (!BOMCopierCopyWithOptions(copier, newURL.path.fileSystemRepresentation, archivePath.data(), (__bridge CFDictionaryRef)options))
temporaryFile = String::fromUTF8(archivePath);
BOMCopierFree(copier);
}];

return temporaryFile;
}

Expand Down Expand Up @@ -199,7 +199,7 @@ void makeSafeToUseMemoryMapForPath(const String& path)
{
if (isSafeToUseMemoryMapForPath(path))
return;

NSError *error = nil;
BOOL success = [[NSFileManager defaultManager] setAttributes:@{ NSFileProtectionKey: NSFileProtectionCompleteUnlessOpen } ofItemAtPath:path error:&error];
ASSERT(!error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

// Disable memory event reception for a minimum of s_minimumHoldOffTime
// seconds after receiving an event. Don't let events fire any sooner than
// s_holdOffMultiplier times the last cleanup processing time. Effectively
// s_holdOffMultiplier times the last cleanup processing time. Effectively
// this is 1 / s_holdOffMultiplier percent of the time.
// These value seems reasonable and testing verifies that it throttles frequent
// low memory events, greatly reducing CPU usage.
Expand Down
Loading

0 comments on commit 976a763

Please sign in to comment.