Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Initial release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nibix committed Jun 14, 2024
1 parent ea3e87c commit af4c96c
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target/
/.project
/.classpath
/.settings/
/.settings/
/settings.xml
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ whether your check list or check table is complete - and when not, what is missi

A check list is a one-dimensional list, a check table is a two-dimensional matrix.

One typical use case for these data structures are complex access control rules. You can use
a check table to tick off what privileges are present and which are not present. The tabular
`toString()` representation helps quickly identifying what privileges are missing:

```
| indices:data/read/search |
index_a11| ok |
index_a12| MISSING |
index_a13| MISSING |
index_a14| MISSING |
```


## License

This code is licensed under the Apache 2.0 License.
Expand Down
58 changes: 57 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
<groupId>com.selectivem</groupId>
<artifactId>checklists</artifactId>
<packaging>jar</packaging>
<name>Selective M Check Lists</name>
<name>${project.groupId}:${project.artifactId}</name>
<description>Dedicated check list and check table data structures</description>
<url>https://github.com/nibix/checklists</url>
<version>1.0.0</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<licenses>
Expand All @@ -24,6 +27,31 @@
</license>
</licenses>

<developers>
<developer>
<name>Nils Bandener</name>
<email>[email protected]</email>
<organizationUrl>https://github.com/nibix</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/nibix/checklists.git</connection>
<developerConnection>scm:git:ssh://github.com/nibix/checklists.git</developerConnection>
<url>https://github.com/nibix/checklists/tree/main</url>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -107,6 +135,34 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.4.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
</plugins>
</build>
</project>
3 changes: 0 additions & 3 deletions src/main/java/com/selectivem/check/BackingCollections.java
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,9 @@ public IndexedUnmodifiableSet<E> build() {
return new TwoElementSet<>(this.flat[0], this.flat[1]);
} else {
E[] flat = this.flat;
int [] indices = this.indices;
if (size != flat.length) {
flat = createEArray(size);
System.arraycopy(this.flat, 0, flat, 0, size);
indices = new int[size];
System.arraycopy(this.indices, 0, indices, 0, size);
}
return new HashArrayBackedSet<>(tableSize, size, table, indices, flat);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static Collection<Object[]> seeds() {
result.add(new Object[] { i, 2, 2 });
}

for (int i = 111; i < 240; i++) {
for (int i = 111; i < 150; i++) {
result.add(new Object[] { i, randomSize(random), randomSize(random) });
}

Expand Down
1 change: 0 additions & 1 deletion src/test/java/com/selectivem/check/CheckTableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

@RunWith(Parameterized.class)
public class CheckTableTest {

@Test
Expand Down

0 comments on commit af4c96c

Please sign in to comment.