Skip to content

Commit 1b52108

Browse files
committed
Fix typos and modernize code in OLAP packages
- Rename AggregateChildrenFunbDef - Fix "denided" -> "denied" typos in RoleImpl (11 occurrences) Fix variable typos: duplicats, coniguration, bototm - Modernize toArray() calls to use method references - Simplify StringBuilder usage in SetBase - Remove stale TODO comments from package-info files Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
1 parent 7dd57ae commit 1b52108

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+61
-64
lines changed

common/src/main/java/org/eclipse/daanse/olap/access/CubeAccess.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,11 @@ public void addGrantCubeSlicer(
158158
*/
159159
public void normalizeCubeAccess() {
160160
if (!memberList.isEmpty()) {
161-
limitedMembers = memberList.toArray(new Member[memberList.size()]);
161+
limitedMembers = memberList.toArray(Member[]::new);
162162
hasRestrictions = true;
163163
}
164164
if (!hierarchyList.isEmpty()) {
165-
noAccessHierarchies =
166-
hierarchyList.toArray(
167-
new Hierarchy[hierarchyList.size()]);
165+
noAccessHierarchies = hierarchyList.toArray(Hierarchy[]::new);
168166
hasRestrictions = true;
169167
}
170168
}

common/src/main/java/org/eclipse/daanse/olap/access/RoleImpl.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public AccessCube getAccess(Cube cube) {
325325
}
326326
// Deny access
327327
LOGGER.trace(
328-
"Access denided to cube {}", cube.getName());
328+
"Access denied to cube {}", cube.getName());
329329
return AccessCube.NONE;
330330
}
331331

@@ -385,7 +385,7 @@ public AccessDimension getAccess(Dimension dimension) {
385385
return AccessDimension.CUSTOM;
386386
} else {
387387
LOGGER.trace(
388-
"Access denided to dimension {} because there are no hierarchies accessible.", dimension.getUniqueName());
388+
"Access denied to dimension {} because there are no hierarchies accessible.", dimension.getUniqueName());
389389
return AccessDimension.NONE;
390390
}
391391
} else if (access != null) {
@@ -417,7 +417,7 @@ public AccessDimension getAccess(Dimension dimension) {
417417
return AccessDimension.NONE;
418418
default:
419419
LOGGER.trace(
420-
"Access denided to dimension {} because of the access level of schema {}",
420+
"Access denied to dimension {} because of the access level of schema {}",
421421
dimension.getUniqueName(),
422422
dimension.getCatalog().getName());
423423
return AccessDimension.NONE;
@@ -570,7 +570,7 @@ public AccessHierarchy getAccess(Hierarchy hierarchy) {
570570
// Access denied, since we know that the dimension check has
571571
// checked for its parents as well.
572572
LOGGER.trace(
573-
"Access denided to hierarchy {}", hierarchy.getUniqueName());
573+
"Access denied to hierarchy {}", hierarchy.getUniqueName());
574574
return AccessHierarchy.NONE;
575575
}
576576

@@ -594,7 +594,7 @@ public AccessDatabaseSchema getAccess(DatabaseSchema databaseSchema, Catalog cat
594594
}
595595
// Deny access
596596
LOGGER.trace(
597-
"Access denided to database schema {}", databaseSchema.getName());
597+
"Access denied to database schema {}", databaseSchema.getName());
598598
return AccessDatabaseSchema.NONE;
599599
}
600600

@@ -616,7 +616,7 @@ public AccessDatabaseTable getAccess(DatabaseTable databaseTable, AccessDatabase
616616
}
617617
// Deny access
618618
LOGGER.trace(
619-
"Access denided to database table {}", databaseTable.getName());
619+
"Access denied to database table {}", databaseTable.getName());
620620
return AccessDatabaseTable.NONE;
621621
}
622622

@@ -638,7 +638,7 @@ public AccessDatabaseColumn getAccess(DatabaseColumn databaseColumn, AccessDatab
638638
}
639639
// Deny access
640640
LOGGER.trace(
641-
"Access denided to database column {}", databaseColumn.getName());
641+
"Access denied to database column {}", databaseColumn.getName());
642642
return AccessDatabaseColumn.NONE;
643643
}
644644

@@ -718,7 +718,7 @@ private static boolean checkLevelIsOkWithRestrictions(
718718
HierarchyAccessImpl hierarchyAccess,
719719
Level level)
720720
{
721-
// Check if this level is explicitly excluded by top/bototm
721+
// Check if this level is explicitly excluded by top/bottom
722722
// level restrictions.
723723
if (level.getDepth() < hierarchyAccess.topLevel.getDepth()) {
724724
return false;
@@ -1083,7 +1083,7 @@ public AccessMember getAccess(Member member) {
10831083
// Check for an explicit deny.
10841084
if (accessInner == AccessMember.NONE) {
10851085
LOGGER.trace(
1086-
"Access level {} granted to member {} because it is explicitly denided.",
1086+
"Access level {} granted to member {} because it is explicitly denied.",
10871087
AccessMember.NONE, member.getUniqueName());
10881088
return AccessMember.NONE;
10891089
}
@@ -1106,7 +1106,7 @@ public AccessMember getAccess(Member member) {
11061106
// defined by topLevel and bottomLevel
11071107
if (!checkLevelIsOkWithRestrictions(this, member.getLevel())) {
11081108
LOGGER.trace(
1109-
"Access denided to member {} because its level {} is out of the permitted bounds of between {} and {}",
1109+
"Access denied to member {} because its level {} is out of the permitted bounds of between {} and {}",
11101110
member.getUniqueName(), member.getLevel().getUniqueName(),
11111111
this.topLevel.getUniqueName(), this.bottomLevel.getUniqueName());
11121112
return AccessMember.NONE;
@@ -1131,7 +1131,7 @@ public AccessMember getAccess(Member member) {
11311131
|| parentAccess == AccessMember.CUSTOM)
11321132
{
11331133
LOGGER.trace(
1134-
"Access denided to member {} because its parent {} is of access level {}",
1134+
"Access denied to member {} because its parent {} is of access level {}",
11351135
member.getUniqueName(), m.getUniqueName(), parentAccess);
11361136
return AccessMember.NONE;
11371137
}
@@ -1162,7 +1162,7 @@ public AccessMember getAccess(Member member) {
11621162
}
11631163
// No access
11641164
LOGGER.trace(
1165-
"Access denided to member {} because none of its parents allow access to it.",
1165+
"Access denied to member {} because none of its parents allow access to it.",
11661166
member.getUniqueName());
11671167
return AccessMember.NONE;
11681168
}

common/src/main/java/org/eclipse/daanse/olap/access/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.access;

common/src/main/java/org/eclipse/daanse/olap/calc/base/cache/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base.cache;

common/src/main/java/org/eclipse/daanse/olap/calc/base/constant/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base.constant;

common/src/main/java/org/eclipse/daanse/olap/calc/base/nested/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base.nested;

common/src/main/java/org/eclipse/daanse/olap/calc/base/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base;

common/src/main/java/org/eclipse/daanse/olap/calc/base/profile/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base.profile;

common/src/main/java/org/eclipse/daanse/olap/calc/base/type/booleanx/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base.type.booleanx;

common/src/main/java/org/eclipse/daanse/olap/calc/base/type/datetime/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SmartCity Jena - initial
1212
* Stefan Bischof (bipolis.org) - initial
1313
*/
14-
//TODO: RM EXPORT
14+
1515
@org.osgi.annotation.bundle.Export
1616
@org.osgi.annotation.versioning.Version("0.0.1")
1717
package org.eclipse.daanse.olap.calc.base.type.datetime;

0 commit comments

Comments
 (0)