Index: OsgiJarMojo.java =================================================================== --- OsgiJarMojo.java (revision 484659) +++ OsgiJarMojo.java (working copy) @@ -692,17 +692,15 @@ if (!matcher.lookingAt()) return version; - final StringBuffer sb = new StringBuffer(version.length()); + // Leave extra space for worst-case additional insertion: + final StringBuffer sb = new StringBuffer(version.length() + 4); sb.append(matcher.group(1)); - int count = 0; - for ( int i = matcher.groupCount(); i != 0; --i ) - if ( null != matcher.group( i ) ) - ++count; + if (null == matcher.group(3)) { + final int count = null != matcher.group(2) ? 2 : 1; + sb.append(versionCompleters[count - 1]); + } - if ( 3 != count ) - sb.append(versionCompleters[count - 1]); - sb.append('.'); sb.append(version.substring(matcher.end(), version.length())); return sb.toString();
- Re: Problems with bundle version strings produced by mave... Richard S. Hall
- Re: Problems with bundle version strings produced by mave... Steven E. Harris
- Re: Problems with bundle version strings produced by... Richard S. Hall
- Re: Problems with bundle version strings produce... Steven E. Harris
- Re: Problems with bundle version strings pro... Richard S. Hall
- Re: Problems with bundle version strings produced by... Richard S. Hall
- Re: Problems with bundle version strings produce... Steven E. Harris
- Re: Problems with bundle version strings pro... Richard S. Hall
- Re: Problems with bundle version strings... Steven E. Harris
- Re: Problems with bundle version st... Richard S. Hall
- Re: Problems with bundle versio... Steven E. Harris
- Re: Problems with bundle versio... Richard S. Hall
- Re: Problems with bundle versio... Steven E. Harris
- Re: Problems with bundle versio... Richard S. Hall