Skip to content

Commit ac65dbc

Browse files
committed
Prepare for 1.1.1 release, with fixed OSGi metadata, inclusion of util classes
1 parent 64e41e7 commit ac65dbc

File tree

12 files changed

+27
-22
lines changed

12 files changed

+27
-22
lines changed

VERSION.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ Licence: Apache 2.0
55
Releases
66
======================================================================
77

8-
1.1.1 (not yet released)
9-
10-
- Add missing OSGi export for "com.fasterxml.util.membuf.util"
11-
12-
1.1.0 (05-Nov-2014)
8+
1.1.1 (05-Nov-2014)
139

1410
#21: Add `com.fasterxml.util.membuf.util.BufferRecycler` to help with buffer reuse
1511
#22: Add convenience class for UTF-8 encoding/decoding, `com.fasterxml.util.membuf.util.UTF8Mate`
1612

13+
(1.1.0 was released, but was broken wrt OSGi metadata -- do not use)
14+
1715
1.0.0 (22-Oct-2013)
1816

1917
The first official release -- library has been used in high-traffic

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ garbage collection overhead (especially latency)
6161
<plugins>
6262
<plugin>
6363
<artifactId>maven-compiler-plugin</artifactId>
64-
<version>2.3.2</version>
64+
<version>3.1</version>
6565
<configuration>
6666
<source>1.6</source>
6767
<target>1.6</target>
@@ -70,7 +70,7 @@ garbage collection overhead (especially latency)
7070
<plugin>
7171
<groupId>org.apache.maven.plugins</groupId>
7272
<artifactId>maven-release-plugin</artifactId>
73-
<version>2.1</version>
73+
<version>2.4.2</version>
7474
<configuration>
7575
<mavenExecutorId>forked-path</mavenExecutorId>
7676
</configuration>
@@ -91,7 +91,7 @@ garbage collection overhead (especially latency)
9191
<plugin>
9292
<groupId>org.apache.maven.plugins</groupId>
9393
<artifactId>maven-javadoc-plugin</artifactId>
94-
<version>2.6.1</version>
94+
<version>2.8.1</version>
9595
<configuration>
9696
<source>1.6</source>
9797
<target>1.6</target>
@@ -116,7 +116,7 @@ garbage collection overhead (especially latency)
116116
<plugin>
117117
<groupId>org.apache.felix</groupId>
118118
<artifactId>maven-bundle-plugin</artifactId>
119-
<version>2.3.6</version>
119+
<version>2.5.3</version>
120120
<extensions>true</extensions>
121121
<configuration>
122122
<instructions>

src/main/java/com/fasterxml/util/membuf/MemBufferDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Interface that defines decorators that may be registered to
5-
* decorate {@like MemBuffer} instances created.
5+
* decorate {@link MemBuffer} instances created.
66
* Decoration is typically used to add features such as auto-closing,
77
* or logging.
88
*

src/main/java/com/fasterxml/util/membuf/SegmentAllocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public abstract class SegmentAllocator<T extends Segment<T>>
6161
/**
6262
* Constructor for creating simple allocator instances.
6363
* Basic configuration is used to limit amount of memory that will
64-
* be used (by {@link maxSegments}), as well as degree to which
64+
* be used (by <code>maxSegments</code>), as well as degree to which
6565
* allocator can reuse released segments (to reduce churn by freeing
6666
* and reallocating segments, as segments typically use native
6767
* {@link java.nio.ByteBuffer}s that may be costly to allocate.

src/main/java/com/fasterxml/util/membuf/base/BytesSegment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.fasterxml.util.membuf.base;
22

33
/**
4-
* Intermediate base class for {@link Segment}s used to store
5-
* byte sequence values.
4+
* Intermediate base class for {@link com.fasterxml.util.membuf.Segment}s
5+
* used to store byte sequence values.
66
*/
77
public abstract class BytesSegment extends SegmentBase<BytesSegment>
88
{

src/main/java/com/fasterxml/util/membuf/base/LongsSegment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.fasterxml.util.membuf.base;
22

33
/**
4-
* Intermediate base class for {@link Segment}s used to store
4+
* Intermediate base class for {@link com.fasterxml.util.membuf.Segment}s used to store
55
* long-valued sequences.
66
*/
77
public abstract class LongsSegment extends SegmentBase<LongsSegment>
@@ -26,6 +26,7 @@ public abstract class LongsSegment extends SegmentBase<LongsSegment>
2626
/**
2727
* Method for trying to skip up to specified number of bytes.
2828
*/
29+
@Override
2930
public abstract int skip(int length);
3031

3132
/*

src/main/java/com/fasterxml/util/membuf/base/MemBuffersBase.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public final CB createChunkyBuffer(int minSegmentsForBuffer, int maxSegmentsForB
109109
* If construction fails (due to allocation limits),
110110
* null will be returned.
111111
*/
112+
@SuppressWarnings("resource")
112113
public final CB tryCreateChunkyBuffer(int minSegmentsForBuffer, int maxSegmentsForBuffer)
113114
{
114115
S initialSegments = _segmentAllocator.allocateSegments(minSegmentsForBuffer, null);
@@ -151,6 +152,7 @@ public final SB createStreamyBuffer(int minSegmentsForBuffer, int maxSegmentsFor
151152
* If construction fails (due to allocation limits),
152153
* null will be returned.
153154
*/
155+
@SuppressWarnings("resource")
154156
public final SB tryCreateStreamyBuffer(int minSegmentsForBuffer, int maxSegmentsForBuffer)
155157
{
156158
S initialSegments = _segmentAllocator.allocateSegments(minSegmentsForBuffer, null);

src/main/java/com/fasterxml/util/membuf/base/SegmentAllocatorBase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public abstract class SegmentAllocatorBase<S extends Segment<S>>
3636
/**
3737
* Constructor for creating simple allocator instances.
3838
* Basic configuration is used to limit amount of memory that will
39-
* be used (by {@link maxSegments}), as well as degree to which
39+
* be used (by <code>maxSegments</code>), as well as degree to which
4040
* allocator can reuse released segments (to reduce churn by freeing
4141
* and reallocating segments, as segments typically use native
4242
* {@link java.nio.ByteBuffer}s that may be costly to allocate.
@@ -77,6 +77,7 @@ public SegmentAllocatorBase(int segmentSize, int minSegmentsToRetain, int maxSeg
7777
* @return Head of segment list (with newly allocated entries as first
7878
* entries) if allocation succeeded; null if not
7979
*/
80+
@Override
8081
public synchronized S allocateSegments(int count, S segmentList)
8182
{
8283
if (count < 1) {
@@ -96,6 +97,7 @@ public synchronized S allocateSegments(int count, S segmentList)
9697
* contents of a segment and do not want to hold on to it for local
9798
* reuse.
9899
*/
100+
@Override
99101
public synchronized void releaseSegment(S segToRelease)
100102
{
101103
if (--_bufferOwnedSegmentCount < 0) { // sanity check; not needed in perfect world

src/main/java/com/fasterxml/util/membuf/base/SegmentBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public abstract class SegmentBase<S extends Segment<S>>
4040
/**********************************************************************
4141
*/
4242

43-
public SegmentBase()
44-
{
43+
public SegmentBase() {
4544
_state = State.FREE;
4645
}
4746

47+
@Override
4848
public final State state() { return _state; }
4949

5050
/*

src/main/java/com/fasterxml/util/membuf/impl/ArrayLongsSegment.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public ArrayLongsSegment(int size)
2727
}
2828

2929
/**
30-
* Factory method for construction {@link LongsSegmentAllocator} that
30+
* Factory method for constructing an {@link Allocator} that
3131
* constructs instances of this segment type
3232
*/
3333
public static Allocator allocator(int segmentSize, int minSegmentsToRetain, int maxSegments) {
@@ -196,7 +196,8 @@ public static class Allocator extends SegmentAllocatorBase<LongsSegment>
196196
public Allocator(int segmentSize, int minSegmentsToRetain, int maxSegments) {
197197
super(segmentSize, minSegmentsToRetain, maxSegments);
198198
}
199-
199+
200+
@Override
200201
protected LongsSegment _allocateSegment()
201202
{
202203
// can reuse a segment returned earlier?

0 commit comments

Comments
 (0)